Index: ash/wm/ash_native_cursor_manager.cc |
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc |
index 45a3ef82f59b4d8ffeabbd7e72ab466b331897da..dfaa74d882d782cf5601bf6b262646f9ec9cb1a8 100644 |
--- a/ash/wm/ash_native_cursor_manager.cc |
+++ b/ash/wm/ash_native_cursor_manager.cc |
@@ -57,6 +57,14 @@ AshNativeCursorManager::AshNativeCursorManager() |
AshNativeCursorManager::~AshNativeCursorManager() {} |
+void AshNativeCursorManager::AddObserver(Observer* observer) { |
+ observers_.AddObserver(observer); |
+} |
+ |
+void AshNativeCursorManager::RemoveObserver(Observer* observer) { |
+ observers_.RemoveObserver(observer); |
+} |
+ |
void AshNativeCursorManager::SetNativeCursorEnabled(bool enabled) { |
native_cursor_enabled_ = enabled; |
@@ -68,6 +76,11 @@ void AshNativeCursorManager::SetDisplay( |
const display::Display& display, |
::wm::NativeCursorManagerDelegate* delegate) { |
DCHECK(display.is_valid()); |
+ cursor_display_ = display; |
+ |
+ for (Observer& observer : observers_) |
+ observer.OnCursorDisplayChanged(display); |
+ |
// Use the platform's device scale factor instead of the display's, which |
// might have been adjusted for the UI scale. |
const float original_scale = Shell::Get() |