Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: ash/wm/ash_native_cursor_manager.h

Issue 2780623002: exo: Fix multi-display hardware cursor (Closed)
Patch Set: Remove capture on mouse enter Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
« no previous file with comments | « ash/shell.h ('k') | ash/wm/ash_native_cursor_manager.cc » ('j') | components/exo/pointer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698