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

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

Issue 1775133003: Moves EventDispatcher from Display to WindowManagerState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: todo Created 4 years, 9 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_unittest.cc ('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 432213e3b5143e7d6e47a968291975136c6fd26c..800ba8a195354471803079bca7636f8dfeba6001 100644
--- a/components/mus/ws/event_dispatcher.h
+++ b/components/mus/ws/event_dispatcher.h
@@ -30,6 +30,10 @@ class EventDispatcherDelegate;
class EventMatcher;
class ServerWindow;
+namespace test {
+class EventDispatcherTestApi;
+}
+
// Handles dispatching events to the right location as well as updating focus.
class EventDispatcher : public ServerWindowObserver {
public:
@@ -40,6 +44,15 @@ class EventDispatcher : public ServerWindowObserver {
void set_surface_id(cc::SurfaceId surface_id) { surface_id_ = surface_id; }
+ // Cancels capture and stops tracking any pointer events. This does not send
+ // any events to the delegate.
+ void Reset();
+
+ void SetMousePointerScreenLocation(const gfx::Point& screen_location);
+ const gfx::Point& mouse_pointer_last_location() const {
+ return mouse_pointer_last_location_;
+ }
+
// |capture_window_| will receive all input. See window_tree.mojom for
// details.
ServerWindow* capture_window() { return capture_window_; }
@@ -67,7 +80,7 @@ class EventDispatcher : public ServerWindowObserver {
void ProcessEvent(const ui::Event& event);
private:
- friend class EventDispatcherTest;
+ friend class test::EventDispatcherTestApi;
// Keeps track of state associated with an active pointer.
struct PointerTarget {
« no previous file with comments | « components/mus/ws/display_unittest.cc ('k') | components/mus/ws/event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698