Index: ash/wm/ash_native_cursor_manager.h |
diff --git a/ash/wm/ash_native_cursor_manager.h b/ash/wm/ash_native_cursor_manager.h |
index fac694dd960fa93e45f9c3272d8ba0fbed57a71b..4e2f20d2ff97338ff24a54def8c4453cb9a1cbcf 100644 |
--- a/ash/wm/ash_native_cursor_manager.h |
+++ b/ash/wm/ash_native_cursor_manager.h |
@@ -10,6 +10,7 @@ |
#include "ash/ash_export.h" |
#include "base/compiler_specific.h" |
#include "base/macros.h" |
+#include "base/observer_list.h" |
#include "base/strings/string16.h" |
#include "ui/gfx/geometry/point.h" |
#include "ui/gfx/native_widget_types.h" |
@@ -32,9 +33,20 @@ class CursorManagerTestApi; |
// changes were acted on. |
class ASH_EXPORT AshNativeCursorManager : public ::wm::NativeCursorManager { |
public: |
+ class Observer { |
+ public: |
+ virtual void OnCursorDisplayChanging(const display::Display& display) = 0; |
+ |
+ protected: |
+ virtual ~Observer() {} |
+ }; |
+ |
AshNativeCursorManager(); |
~AshNativeCursorManager() override; |
+ void AddObserver(Observer* observer); |
+ void RemoveObserver(Observer* observer); |
+ |
// Toggle native cursor enabled/disabled. |
// The native cursor is enabled by default. When disabled, we hide the native |
// cursor regardless of visibility state, and let CursorWindowManager draw |
@@ -64,6 +76,8 @@ class ASH_EXPORT AshNativeCursorManager : public ::wm::NativeCursorManager { |
std::unique_ptr<ui::ImageCursors> image_cursors_; |
+ base::ObserverList<Observer> observers_; |
+ |
DISALLOW_COPY_AND_ASSIGN(AshNativeCursorManager); |
}; |