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

Side by Side Diff: content/browser/renderer_host/input/web_input_event_util.cc

Issue 223673006: Support GestureBegin and GestureEnd in ui::GestureProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address jdduke's comments. Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/browser/renderer_host/input/web_input_event_util.h" 5 #include "content/browser/renderer_host/input/web_input_event_util.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "ui/events/gesture_detection/gesture_event_data.h" 8 #include "ui/events/gesture_detection/gesture_event_data.h"
9 #include "ui/events/gesture_detection/motion_event.h" 9 #include "ui/events/gesture_detection/motion_event.h"
10 10
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 case ui::ET_GESTURE_TAP_CANCEL: 324 case ui::ET_GESTURE_TAP_CANCEL:
325 gesture.type = WebInputEvent::GestureTapCancel; 325 gesture.type = WebInputEvent::GestureTapCancel;
326 break; 326 break;
327 case ui::ET_GESTURE_TAP_DOWN: 327 case ui::ET_GESTURE_TAP_DOWN:
328 gesture.type = WebInputEvent::GestureTapDown; 328 gesture.type = WebInputEvent::GestureTapDown;
329 gesture.data.tapDown.width = 329 gesture.data.tapDown.width =
330 data.details.bounding_box_f().width() * scale; 330 data.details.bounding_box_f().width() * scale;
331 gesture.data.tapDown.height = 331 gesture.data.tapDown.height =
332 data.details.bounding_box_f().height() * scale; 332 data.details.bounding_box_f().height() * scale;
333 break; 333 break;
334 case ui::ET_GESTURE_BEGIN:
335 case ui::ET_GESTURE_END:
336 NOTREACHED() << "ET_GESTURE_BEGIN and ET_GESTURE_END are only produced "
337 << "in Aura, and should never end up here.";
338 break;
334 default: 339 default:
335 NOTREACHED() << "ui::EventType provided wasn't a valid gesture event."; 340 NOTREACHED() << "ui::EventType provided wasn't a valid gesture event.";
336 break; 341 break;
337 } 342 }
338 343
339 return gesture; 344 return gesture;
340 } 345 }
341 346
342 } // namespace content 347 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698