Daichi Hirono | 19ff588 | 2017-11-30 03:37:34 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_ |
| 6 | #define COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace exo { |
| 11 | |
| 12 | class DataSource; |
| 13 | |
| 14 | // Handles events on data devices in context-specific ways. |
| 15 | class DataSourceObserver { |
| 16 | public: |
| 17 | // Called at the top of the data device's destructor, to give observers a |
| 18 | // chance to remove themselves. |
| 19 | virtual void OnDataSourceDestroying(DataSource* source) = 0; |
| 20 | |
| 21 | protected: |
| 22 | virtual ~DataSourceObserver() {} |
| 23 | }; |
| 24 | |
| 25 | } // namespace exo |
| 26 | |
| 27 | #endif // COMPONENTS_EXO_DATA_SOURCE_OBSERVER_H_ |