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

Unified Diff: components/view_manager/gesture_manager.cc

Issue 1313353010: Overhaul Mandoline event transport code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments2 Created 5 years, 3 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: components/view_manager/gesture_manager.cc
diff --git a/components/view_manager/gesture_manager.cc b/components/view_manager/gesture_manager.cc
index 37bb4b01b4664e72570faa86f6d456b60f6cecc7..415048890878963a4aed7609c30455c13aac3c30 100644
--- a/components/view_manager/gesture_manager.cc
+++ b/components/view_manager/gesture_manager.cc
@@ -55,11 +55,12 @@ Views GetTouchTargets(const ServerView* deepest) {
mojo::EventPtr CloneEventForView(const mojo::Event& event,
const ServerView* view) {
mojo::EventPtr result(event.Clone());
- const gfx::PointF location(event.pointer_data->x, event.pointer_data->y);
+ const gfx::PointF location(event.pointer_data->where->x,
+ event.pointer_data->where->y);
const gfx::PointF target_location(
ConvertPointFBetweenViews(view->GetRoot(), view, location));
- result->pointer_data->x = target_location.x();
- result->pointer_data->y = target_location.y();
+ result->pointer_data->where->x = target_location.x();
+ result->pointer_data->where->y = target_location.y();
return result.Pass();
}
@@ -544,8 +545,8 @@ bool GestureManager::ProcessEvent(const mojo::Event& event) {
return false;
ScheduledDeleteProcessor delete_processor(this);
- const gfx::Point location(static_cast<int>(event.pointer_data->x),
- static_cast<int>(event.pointer_data->y));
+ const gfx::Point location(static_cast<int>(event.pointer_data->where->x),
+ static_cast<int>(event.pointer_data->where->y));
switch (event.action) {
case mojo::EVENT_TYPE_POINTER_DOWN: {
if (GetPointerById(event.pointer_data->pointer_id)) {

Powered by Google App Engine
This is Rietveld 408576698