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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « 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...) Expand 10 before | Expand all | Expand 10 after
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_ACK_RWH_COMPONENT); 94 ui::INPUT_EVENT_LATENCY_ACKED_TOUCH_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...) Expand all
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
This is Rietveld 408576698