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

Unified Diff: components/mus/ws/event_dispatcher.h

Issue 1465803003: mus: Let clients set the cursor of their window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move code. Created 5 years 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: components/mus/ws/event_dispatcher.h
diff --git a/components/mus/ws/event_dispatcher.h b/components/mus/ws/event_dispatcher.h
index a6ffd62524026aba1c6f8dcc379ff51cf8fb9597..505713cc52360fedd77e81c8002962664a3f2a74 100644
--- a/components/mus/ws/event_dispatcher.h
+++ b/components/mus/ws/event_dispatcher.h
@@ -33,6 +33,11 @@ class EventDispatcher : public ServerWindowObserver {
void set_surface_id(cc::SurfaceId surface_id) { surface_id_ = surface_id; }
+ // Retrieves the ServerWindow of the last mouse move.
+ ServerWindow* mouse_cursor_source_window() const {
+ return mouse_cursor_source_window_;
+ }
+
// Adds an accelerator with the given id and event-matcher. If an accelerator
// already exists with the same id or the same matcher, then the accelerator
// is not added. Returns whether adding the accelerator was successful or not.
@@ -95,6 +100,9 @@ class EventDispatcher : public ServerWindowObserver {
EventDispatcherDelegate* delegate_;
ServerWindow* root_;
+ bool mouse_button_down_;
+ ServerWindow* mouse_cursor_source_window_;
+
cc::SurfaceId surface_id_;
using Entry = std::pair<uint32_t, EventMatcher>;

Powered by Google App Engine
This is Rietveld 408576698