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

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

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/mus/ws/display_manager_delegate.h ('k') | components/mus/ws/event_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/event_dispatcher.h
diff --git a/components/mus/ws/event_dispatcher.h b/components/mus/ws/event_dispatcher.h
index 2451a3a1cbd32586028f431f148440827b86aa1e..814cf3723d2b04a14113ed9b5ff65fbd8fb86bfa 100644
--- a/components/mus/ws/event_dispatcher.h
+++ b/components/mus/ws/event_dispatcher.h
@@ -36,6 +36,12 @@ class EventDispatcher : public ServerWindowObserver {
void set_surface_id(cc::SurfaceId surface_id) { surface_id_ = surface_id; }
+ // |capture_window_| will receive all input. See window_tree.mojom for
+ // details.
+ ServerWindow* capture_window() { return capture_window_; }
+ const ServerWindow* capture_window() const { return capture_window_; }
+ void SetCaptureWindow(ServerWindow* capture_window, bool in_nonclient_area);
+
// Retrieves the ServerWindow of the last mouse move.
ServerWindow* mouse_cursor_source_window() const {
return mouse_cursor_source_window_;
@@ -57,6 +63,8 @@ class EventDispatcher : public ServerWindowObserver {
void ProcessEvent(mojom::EventPtr event);
private:
+ friend class EventDispatcherTest;
+
// Keeps track of state associated with an active pointer.
struct PointerTarget {
PointerTarget()
@@ -135,7 +143,9 @@ class EventDispatcher : public ServerWindowObserver {
EventDispatcherDelegate* delegate_;
ServerWindow* root_;
+ ServerWindow* capture_window_;
+ bool capture_window_in_nonclient_area_;
bool mouse_button_down_;
ServerWindow* mouse_cursor_source_window_;
« no previous file with comments | « components/mus/ws/display_manager_delegate.h ('k') | components/mus/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698