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

Unified Diff: services/ui/ws/test_change_tracker.cc

Issue 2696873002: Change OnWindowInputEvent to use display_id to find the host and update event root_location in WS. (Closed)
Patch Set: nits Created 3 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
Index: services/ui/ws/test_change_tracker.cc
diff --git a/services/ui/ws/test_change_tracker.cc b/services/ui/ws/test_change_tracker.cc
index 172c9b81a49de01b22d4f914651b16a2bbcb992f..3bb89afcc2b3fcd434706f1e503b7ee0525ba2c2 100644
--- a/services/ui/ws/test_change_tracker.cc
+++ b/services/ui/ws/test_change_tracker.cc
@@ -106,6 +106,11 @@ std::string ChangeToDescription(const Change& change,
WindowIdToString(change.window_id).c_str(), change.event_action);
if (change.matches_pointer_watcher)
result += " matches_pointer_watcher";
+ if (!change.event_root_location.IsOrigin()) {
+ result +=
+ base::StringPrintf(" event_root_location=%s",
+ change.event_root_location.ToString().c_str());
+ }
return result;
}
@@ -365,6 +370,8 @@ void TestChangeTracker::OnWindowInputEvent(Id window_id,
change.window_id = window_id;
change.event_action = static_cast<int32_t>(event.type());
change.matches_pointer_watcher = matches_pointer_watcher;
+ if (event.IsLocatedEvent())
+ change.event_root_location = event.AsLocatedEvent()->root_location();
AddChange(change);
}

Powered by Google App Engine
This is Rietveld 408576698