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

Side by Side Diff: content/browser/renderer_host/web_input_event_aurax11.cc

Issue 10806092: Expose bounding-rectangle for the touch-points in a gesture event in WebGestureEvent (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Portions based heavily on: 5 // Portions based heavily on:
6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp 6 // third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.cpp
7 // 7 //
8 /* 8 /*
9 * Copyright (C) 2006-2011 Google Inc. All rights reserved. 9 * Copyright (C) 2006-2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 gesture_event.type = WebKit::WebInputEvent::GestureTwoFingerTap; 402 gesture_event.type = WebKit::WebInputEvent::GestureTwoFingerTap;
403 break; 403 break;
404 case ui::ET_GESTURE_BEGIN: 404 case ui::ET_GESTURE_BEGIN:
405 case ui::ET_GESTURE_END: 405 case ui::ET_GESTURE_END:
406 case ui::ET_GESTURE_MULTIFINGER_SWIPE: 406 case ui::ET_GESTURE_MULTIFINGER_SWIPE:
407 break; 407 break;
408 default: 408 default:
409 NOTREACHED() << "Unknown gesture type: " << event->type(); 409 NOTREACHED() << "Unknown gesture type: " << event->type();
410 } 410 }
411 411
412 gesture_event.boundingBox = event->details().bounding_box();
412 gesture_event.deltaX = event->details().generic_x(); 413 gesture_event.deltaX = event->details().generic_x();
413 gesture_event.deltaY = event->details().generic_y(); 414 gesture_event.deltaY = event->details().generic_y();
414 gesture_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); 415 gesture_event.modifiers = EventFlagsToWebEventModifiers(event->flags());
415 416
416 // WebKit gesture events do not have bounding-boxes yet, and expect the data 417 // WebKit gesture events do not have bounding-boxes yet, and expect the data
417 // in deltaX/deltaY instead (and instead of bounding box, WebKit expects the 418 // in deltaX/deltaY instead (and instead of bounding box, WebKit expects the
418 // radius). This is currently used only for tap events. So special case this 419 // radius). This is currently used only for tap events. So special case this
419 // particular case. 420 // particular case.
420 // http://crbug.com/138572 421 // http://crbug.com/138572
421 if (event->type() == ui::ET_GESTURE_TAP) { 422 if (event->type() == ui::ET_GESTURE_TAP) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 492
492 // Update the type of the touch event. 493 // Update the type of the touch event.
493 web_event->type = TouchEventTypeFromEvent(event); 494 web_event->type = TouchEventTypeFromEvent(event);
494 web_event->timeStampSeconds = event->time_stamp().InSecondsF(); 495 web_event->timeStampSeconds = event->time_stamp().InSecondsF();
495 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags()); 496 web_event->modifiers = EventFlagsToWebEventModifiers(event->flags());
496 497
497 return point; 498 return point;
498 } 499 }
499 500
500 } // namespace content 501 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698