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 "content/renderer/input/input_handler_proxy.h" | 5 #include "content/renderer/input/input_handler_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 input_handler_->PinchGestureEnd(); | 273 input_handler_->PinchGestureEnd(); |
274 return DID_HANDLE; | 274 return DID_HANDLE; |
275 } else { | 275 } else { |
276 return DID_NOT_HANDLE; | 276 return DID_NOT_HANDLE; |
277 } | 277 } |
278 | 278 |
279 case WebInputEvent::GesturePinchUpdate: { | 279 case WebInputEvent::GesturePinchUpdate: { |
280 if (gesture_pinch_on_impl_thread_) { | 280 if (gesture_pinch_on_impl_thread_) { |
281 const WebGestureEvent& gesture_event = | 281 const WebGestureEvent& gesture_event = |
282 static_cast<const WebGestureEvent&>(event); | 282 static_cast<const WebGestureEvent&>(event); |
283 if (gesture_event.data.pinchUpdate.zoomDisabled) | |
284 return DID_HANDLE; | |
jdduke (slow)
2015/05/07 01:53:50
What about DROP_EVENT? Should have a similar effec
ccameron
2015/05/07 17:09:06
Sure -- updated. I was originally thinking DROP, b
| |
283 input_handler_->PinchGestureUpdate( | 285 input_handler_->PinchGestureUpdate( |
284 gesture_event.data.pinchUpdate.scale, | 286 gesture_event.data.pinchUpdate.scale, |
285 gfx::Point(gesture_event.x, gesture_event.y)); | 287 gfx::Point(gesture_event.x, gesture_event.y)); |
286 return DID_HANDLE; | 288 return DID_HANDLE; |
287 } else { | 289 } else { |
288 return DID_NOT_HANDLE; | 290 return DID_NOT_HANDLE; |
289 } | 291 } |
290 } | 292 } |
291 | 293 |
292 case WebInputEvent::GestureFlingStart: | 294 case WebInputEvent::GestureFlingStart: |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
951 // trigger a scroll, e.g., with a trivial time delta between fling updates. | 953 // trigger a scroll, e.g., with a trivial time delta between fling updates. |
952 // Return true in this case to prevent early fling termination. | 954 // Return true in this case to prevent early fling termination. |
953 if (std::abs(clipped_increment.width) < kScrollEpsilon && | 955 if (std::abs(clipped_increment.width) < kScrollEpsilon && |
954 std::abs(clipped_increment.height) < kScrollEpsilon) | 956 std::abs(clipped_increment.height) < kScrollEpsilon) |
955 return true; | 957 return true; |
956 | 958 |
957 return did_scroll; | 959 return did_scroll; |
958 } | 960 } |
959 | 961 |
960 } // namespace content | 962 } // namespace content |
OLD | NEW |