Chromium Code Reviews

Side by Side Diff: ui/events/gestures/gesture_provider_impl.cc

Issue 952893003: Update from https://crrev.com/317530 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix gn for nacl Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | ui/events/latency_info.h » ('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/gestures/gesture_provider_impl.h" 5 #include "ui/events/gestures/gesture_provider_impl.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/events/event.h" 9 #include "ui/events/event.h"
10 #include "ui/events/gesture_detection/gesture_config_helper.h" 10 #include "ui/events/gesture_detection/gesture_config_helper.h"
(...skipping 73 matching lines...)
84 gesture.time - base::TimeTicks(), details)); 84 gesture.time - base::TimeTicks(), details));
85 85
86 ui::LatencyInfo* gesture_latency = event->latency(); 86 ui::LatencyInfo* gesture_latency = event->latency();
87 87
88 gesture_latency->CopyLatencyFrom(last_touch_event_latency_info_, 88 gesture_latency->CopyLatencyFrom(last_touch_event_latency_info_,
89 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT); 89 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT);
90 gesture_latency->CopyLatencyFrom(last_touch_event_latency_info_, 90 gesture_latency->CopyLatencyFrom(last_touch_event_latency_info_,
91 ui::INPUT_EVENT_LATENCY_UI_COMPONENT); 91 ui::INPUT_EVENT_LATENCY_UI_COMPONENT);
92 gesture_latency->CopyLatencyFrom( 92 gesture_latency->CopyLatencyFrom(
93 last_touch_event_latency_info_, 93 last_touch_event_latency_info_,
94 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT); 94 ui::INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT);
95 95
96 if (!handling_event_) { 96 if (!handling_event_) {
97 // Dispatching event caused by timer. 97 // Dispatching event caused by timer.
98 client_->OnGestureEvent(event.get()); 98 client_->OnGestureEvent(event.get());
99 } else { 99 } else {
100 // Memory managed by ScopedVector pending_gestures_. 100 // Memory managed by ScopedVector pending_gestures_.
101 pending_gestures_.push_back(event.release()); 101 pending_gestures_.push_back(event.release());
102 } 102 }
103 } 103 }
104 104
(...skipping 18 matching lines...)
123 123
124 float double_tap_slop_square = 124 float double_tap_slop_square =
125 GestureConfiguration::max_distance_between_taps_for_double_tap(); 125 GestureConfiguration::max_distance_between_taps_for_double_tap();
126 double_tap_slop_square *= double_tap_slop_square; 126 double_tap_slop_square *= double_tap_slop_square;
127 const float delta_x = previous_tap.x - current_tap.x; 127 const float delta_x = previous_tap.x - current_tap.x;
128 const float delta_y = previous_tap.y - current_tap.y; 128 const float delta_y = previous_tap.y - current_tap.y;
129 return (delta_x * delta_x + delta_y * delta_y < double_tap_slop_square); 129 return (delta_x * delta_x + delta_y * delta_y < double_tap_slop_square);
130 } 130 }
131 131
132 } // namespace content 132 } // namespace content
OLDNEW
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | ui/events/latency_info.h » ('j') | no next file with comments »

Powered by Google App Engine