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

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

Issue 302463004: Implementing the dispatch of the swipe gesture for one-finger touch swipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementing review feedback. Created 6 years, 7 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 | « ash/wm/toplevel_window_event_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 #include "content/browser/renderer_host/ui_events_helper.h" 5 #include "content/browser/renderer_host/ui_events_helper.h"
6 6
7 #include "content/common/input/web_touch_event_traits.h" 7 #include "content/common/input/web_touch_event_traits.h"
8 #include "third_party/WebKit/public/web/WebInputEvent.h" 8 #include "third_party/WebKit/public/web/WebInputEvent.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 break; 219 break;
220 case ui::ET_GESTURE_TWO_FINGER_TAP: 220 case ui::ET_GESTURE_TWO_FINGER_TAP:
221 gesture_event.type = blink::WebInputEvent::GestureTwoFingerTap; 221 gesture_event.type = blink::WebInputEvent::GestureTwoFingerTap;
222 gesture_event.data.twoFingerTap.firstFingerWidth = 222 gesture_event.data.twoFingerTap.firstFingerWidth =
223 event.details().first_finger_width(); 223 event.details().first_finger_width();
224 gesture_event.data.twoFingerTap.firstFingerHeight = 224 gesture_event.data.twoFingerTap.firstFingerHeight =
225 event.details().first_finger_height(); 225 event.details().first_finger_height();
226 break; 226 break;
227 case ui::ET_GESTURE_BEGIN: 227 case ui::ET_GESTURE_BEGIN:
228 case ui::ET_GESTURE_END: 228 case ui::ET_GESTURE_END:
229 case ui::ET_GESTURE_MULTIFINGER_SWIPE: 229 case ui::ET_GESTURE_SWIPE:
230 gesture_event.type = blink::WebInputEvent::Undefined; 230 gesture_event.type = blink::WebInputEvent::Undefined;
231 break; 231 break;
232 default: 232 default:
233 NOTREACHED() << "Unknown gesture type: " << event.type(); 233 NOTREACHED() << "Unknown gesture type: " << event.type();
234 } 234 }
235 235
236 gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen; 236 gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen;
237 gesture_event.modifiers = EventFlagsToWebEventModifiers(event.flags()); 237 gesture_event.modifiers = EventFlagsToWebEventModifiers(event.flags());
238 gesture_event.timeStampSeconds = event.time_stamp().InSecondsF(); 238 gesture_event.timeStampSeconds = event.time_stamp().InSecondsF();
239 239
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Update the type of the touch event. 328 // Update the type of the touch event.
329 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event), 329 WebTouchEventTraits::ResetType(TouchEventTypeFromEvent(event),
330 event.time_stamp().InSecondsF(), 330 event.time_stamp().InSecondsF(),
331 web_event); 331 web_event);
332 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags()); 332 web_event->modifiers = EventFlagsToWebEventModifiers(event.flags());
333 333
334 return point; 334 return point;
335 } 335 }
336 336
337 } // namespace content 337 } // namespace content
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698