summaryrefslogtreecommitdiffstats
path: root/chromium/components/exo/data_source_observer.h
blob: cfaf548b7544f464ac568f38b81d7dea7b359179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_
#define COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_

#include "base/observer_list_types.h"

namespace exo {

class DataSource;

// Handles events on data devices in context-specific ways.
class DataSourceObserver : public base::CheckedObserver {
 public:
  // Called at the top of the data device's destructor, to give observers a
  // chance to remove themselves.
  virtual void OnDataSourceDestroying(DataSource* source) = 0;

 protected:
  ~DataSourceObserver() override = default;
};

}  // namespace exo

#endif  // COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_