OLD | NEW |
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 "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 static_cast<const WebGestureEvent&>(event)); | 281 static_cast<const WebGestureEvent&>(event)); |
282 | 282 |
283 case WebInputEvent::GestureScrollEnd: | 283 case WebInputEvent::GestureScrollEnd: |
284 return HandleGestureScrollEnd(static_cast<const WebGestureEvent&>(event)); | 284 return HandleGestureScrollEnd(static_cast<const WebGestureEvent&>(event)); |
285 | 285 |
286 case WebInputEvent::GesturePinchBegin: { | 286 case WebInputEvent::GesturePinchBegin: { |
287 DCHECK(!gesture_pinch_on_impl_thread_); | 287 DCHECK(!gesture_pinch_on_impl_thread_); |
288 const WebGestureEvent& gesture_event = | 288 const WebGestureEvent& gesture_event = |
289 static_cast<const WebGestureEvent&>(event); | 289 static_cast<const WebGestureEvent&>(event); |
290 if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad && | 290 if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad && |
291 input_handler_->HaveWheelEventHandlersAt( | 291 input_handler_->HaveWheelEventHandlers()) { |
292 gfx::Point(gesture_event.x, gesture_event.y))) { | |
293 return DID_NOT_HANDLE; | 292 return DID_NOT_HANDLE; |
294 } else { | 293 } else { |
295 input_handler_->PinchGestureBegin(); | 294 input_handler_->PinchGestureBegin(); |
296 gesture_pinch_on_impl_thread_ = true; | 295 gesture_pinch_on_impl_thread_ = true; |
297 return DID_HANDLE; | 296 return DID_HANDLE; |
298 } | 297 } |
299 } | 298 } |
300 | 299 |
301 case WebInputEvent::GesturePinchEnd: | 300 case WebInputEvent::GesturePinchEnd: |
302 if (gesture_pinch_on_impl_thread_) { | 301 if (gesture_pinch_on_impl_thread_) { |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 // trigger a scroll, e.g., with a trivial time delta between fling updates. | 1168 // trigger a scroll, e.g., with a trivial time delta between fling updates. |
1170 // Return true in this case to prevent early fling termination. | 1169 // Return true in this case to prevent early fling termination. |
1171 if (std::abs(clipped_increment.width) < kScrollEpsilon && | 1170 if (std::abs(clipped_increment.width) < kScrollEpsilon && |
1172 std::abs(clipped_increment.height) < kScrollEpsilon) | 1171 std::abs(clipped_increment.height) < kScrollEpsilon) |
1173 return true; | 1172 return true; |
1174 | 1173 |
1175 return did_scroll; | 1174 return did_scroll; |
1176 } | 1175 } |
1177 | 1176 |
1178 } // namespace ui | 1177 } // namespace ui |
OLD | NEW |