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

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

Issue 304793003: use enum to specify deviceSource for fling animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed desired #include 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 | 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/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 void InputRouterImpl::SendGestureEvent( 176 void InputRouterImpl::SendGestureEvent(
177 const GestureEventWithLatencyInfo& original_gesture_event) { 177 const GestureEventWithLatencyInfo& original_gesture_event) {
178 event_stream_validator_.OnEvent(original_gesture_event.event); 178 event_stream_validator_.OnEvent(original_gesture_event.event);
179 GestureEventWithLatencyInfo gesture_event(original_gesture_event); 179 GestureEventWithLatencyInfo gesture_event(original_gesture_event);
180 180
181 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event)) 181 if (touch_action_filter_.FilterGestureEvent(&gesture_event.event))
182 return; 182 return;
183 183
184 if (gesture_event.event.sourceDevice == WebGestureEvent::Touchscreen) 184 if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchpad)
185 touch_event_queue_.OnGestureScrollEvent(gesture_event); 185 touch_event_queue_.OnGestureScrollEvent(gesture_event);
186 186
187 if (!IsInOverscrollGesture() && 187 if (!IsInOverscrollGesture() &&
188 !gesture_event_queue_.ShouldForward(gesture_event)) { 188 !gesture_event_queue_.ShouldForward(gesture_event)) {
189 OverscrollController* controller = client_->GetOverscrollController(); 189 OverscrollController* controller = client_->GetOverscrollController();
190 if (controller) 190 if (controller)
191 controller->DiscardingGestureEvent(gesture_event.event); 191 controller->DiscardingGestureEvent(gesture_event.event);
192 return; 192 return;
193 } 193 }
194 194
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // to send a touch-action response without racing against the ack timeout. 232 // to send a touch-action response without racing against the ack timeout.
233 UpdateTouchAckTimeoutEnabled(); 233 UpdateTouchAckTimeoutEnabled();
234 } 234 }
235 235
236 FilterAndSendWebInputEvent(touch_event.event, touch_event.latency, false); 236 FilterAndSendWebInputEvent(touch_event.event, touch_event.latency, false);
237 } 237 }
238 238
239 void InputRouterImpl::SendGestureEventImmediately( 239 void InputRouterImpl::SendGestureEventImmediately(
240 const GestureEventWithLatencyInfo& gesture_event) { 240 const GestureEventWithLatencyInfo& gesture_event) {
241 if (gesture_event.event.type == WebInputEvent::GesturePinchUpdate && 241 if (gesture_event.event.type == WebInputEvent::GesturePinchUpdate &&
242 gesture_event.event.sourceDevice == WebGestureEvent::Touchpad) { 242 gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchpad) {
243 SendSyntheticWheelEventForPinch(gesture_event); 243 SendSyntheticWheelEventForPinch(gesture_event);
244 return; 244 return;
245 } 245 }
246 246
247 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false); 247 FilterAndSendWebInputEvent(gesture_event.event, gesture_event.latency, false);
248 } 248 }
249 249
250 const NativeWebKeyboardEvent* InputRouterImpl::GetLastKeyboardEvent() const { 250 const NativeWebKeyboardEvent* InputRouterImpl::GetLastKeyboardEvent() const {
251 if (key_queue_.empty()) 251 if (key_queue_.empty())
252 return NULL; 252 return NULL;
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 InputRouterImpl::QueuedWheelEvent::QueuedWheelEvent( 756 InputRouterImpl::QueuedWheelEvent::QueuedWheelEvent(
757 const MouseWheelEventWithLatencyInfo& event, 757 const MouseWheelEventWithLatencyInfo& event,
758 bool synthesized_from_pinch) 758 bool synthesized_from_pinch)
759 : event(event), synthesized_from_pinch(synthesized_from_pinch) { 759 : event(event), synthesized_from_pinch(synthesized_from_pinch) {
760 } 760 }
761 761
762 InputRouterImpl::QueuedWheelEvent::~QueuedWheelEvent() { 762 InputRouterImpl::QueuedWheelEvent::~QueuedWheelEvent() {
763 } 763 }
764 764
765 } // namespace content 765 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698