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

Side by Side Diff: content/renderer/input/input_handler_proxy.cc

Issue 1129693002: Make Mac pinch thresholding apply only to zoom (Chromium side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 5 years, 7 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
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/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
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 DROP_EVENT;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698