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

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: TODO 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..6c9682a4be248dd059e4d4672567addd9774d3bf 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 != gfx::Point()) {
sadrul 2017/03/14 16:08:32 Use PointF::IsOrigin() instead
riajiang 2017/03/14 19:03:26 Done.
+ result +=
+ base::StringPrintf(" event_root_location=%s",
+ change.event_root_location.ToString().c_str());
+ }
return result;
}
@@ -220,6 +225,7 @@ Change::Change()
window_id3(0),
event_action(0),
matches_pointer_watcher(false),
+ event_root_location(gfx::Point()),
sadrul 2017/03/14 16:08:32 Don't need this
riajiang 2017/03/14 19:03:26 Done.
direction(mojom::OrderDirection::ABOVE),
bool_value(false),
float_value(0.f),
@@ -365,6 +371,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