| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_EXO_SURFACE_OBSERVER_H_ | 5 #ifndef COMPONENTS_EXO_SURFACE_OBSERVER_H_ |
| 6 #define COMPONENTS_EXO_SURFACE_OBSERVER_H_ | 6 #define COMPONENTS_EXO_SURFACE_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 namespace exo { | 10 namespace exo { |
| 9 class Surface; | 11 class Surface; |
| 10 | 12 |
| 11 // Observers can listen to various events on the Surfaces. | 13 // Observers can listen to various events on the Surfaces. |
| 12 class SurfaceObserver { | 14 class SurfaceObserver { |
| 13 public: | 15 public: |
| 14 // Called at the top of the surface's destructor, to give observers a | 16 // Called at the top of the surface's destructor, to give observers a |
| 15 // chance to remove themselves. | 17 // chance to remove themselves. |
| 16 virtual void OnSurfaceDestroying(Surface* surface) = 0; | 18 virtual void OnSurfaceDestroying(Surface* surface) = 0; |
| 17 | 19 |
| 20 // Called when a surface has an accessibility tree attached or detached. |
| 21 virtual void OnSurfaceAXTreeChanged(int32_t id) {} |
| 22 |
| 18 protected: | 23 protected: |
| 19 virtual ~SurfaceObserver() {} | 24 virtual ~SurfaceObserver() {} |
| 20 }; | 25 }; |
| 21 | 26 |
| 22 } // namespace exo | 27 } // namespace exo |
| 23 | 28 |
| 24 #endif // COMPONENTS_EXO_SURFACE_OBSERVER_H_ | 29 #endif // COMPONENTS_EXO_SURFACE_OBSERVER_H_ |
| OLD | NEW |