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

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

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/event_dispatcher.h ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/event_dispatcher.cc
diff --git a/components/mus/ws/event_dispatcher.cc b/components/mus/ws/event_dispatcher.cc
index 71dea6063039e8877df57d356e8f2ba37b6b7f36..c7eca9ec50d4b1f5a6a7a1119c5bf07b656949e1 100644
--- a/components/mus/ws/event_dispatcher.cc
+++ b/components/mus/ws/event_dispatcher.cc
@@ -216,6 +216,25 @@ EventDispatcher::~EventDispatcher() {
pointer_targets_.clear();
}
+void EventDispatcher::Reset() {
+ if (capture_window_) {
+ CancelPointerEventsToTarget(capture_window_);
+ DCHECK(capture_window_ == nullptr);
+ }
+
+ while (!pointer_targets_.empty())
+ StopTrackingPointer(pointer_targets_.begin()->first);
+
+ mouse_button_down_ = false;
+}
+
+void EventDispatcher::SetMousePointerScreenLocation(
+ const gfx::Point& screen_location) {
+ DCHECK(pointer_targets_.empty());
+ mouse_pointer_last_location_ = screen_location;
+ UpdateCursorProviderByLastKnownLocation();
+}
+
void EventDispatcher::SetCaptureWindow(ServerWindow* window,
bool in_nonclient_area) {
if (window == capture_window_)
« no previous file with comments | « components/mus/ws/event_dispatcher.h ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698