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

Side by Side Diff: ui/events/gesture_event_details.cc

Issue 321563002: Support minimum gesture bounds in GestureProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 6 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 | « ui/events/gesture_event_details.h ('k') | ui/events/gestures/gesture_provider_aura.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/events/gesture_event_details.h" 5 #include "ui/events/gesture_event_details.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 GestureEventDetails::GestureEventDetails() : type_(ET_UNKNOWN) {} 9 GestureEventDetails::GestureEventDetails() : type_(ET_UNKNOWN) {}
10 10
11 GestureEventDetails::GestureEventDetails(ui::EventType type, 11 GestureEventDetails::GestureEventDetails(ui::EventType type,
12 float delta_x, 12 float delta_x,
13 float delta_y) 13 float delta_y)
14 : type_(type), 14 : type_(type),
15 touch_points_(1) { 15 touch_points_(1) {
16 DCHECK_GE(type, ET_GESTURE_TYPE_START);
17 DCHECK_LE(type, ET_GESTURE_TYPE_END);
16 switch (type_) { 18 switch (type_) {
17 case ui::ET_GESTURE_SCROLL_BEGIN: 19 case ui::ET_GESTURE_SCROLL_BEGIN:
18 data.scroll_begin.x_hint = delta_x; 20 data.scroll_begin.x_hint = delta_x;
19 data.scroll_begin.y_hint = delta_y; 21 data.scroll_begin.y_hint = delta_y;
20 break; 22 break;
21 23
22 case ui::ET_GESTURE_SCROLL_UPDATE: 24 case ui::ET_GESTURE_SCROLL_UPDATE:
23 data.scroll_update.x = delta_x; 25 data.scroll_update.x = delta_x;
24 data.scroll_update.y = delta_y; 26 data.scroll_update.y = delta_y;
25 break; 27 break;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 62 }
61 break; 63 break;
62 } 64 }
63 } 65 }
64 66
65 GestureEventDetails::Details::Details() { 67 GestureEventDetails::Details::Details() {
66 memset(this, 0, sizeof(Details)); 68 memset(this, 0, sizeof(Details));
67 } 69 }
68 70
69 } // namespace ui 71 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_event_details.h ('k') | ui/events/gestures/gesture_provider_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698