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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.h

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: Threshold at zoom level one 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index f29fcefcb40dc9942eb66a96c0175dc914b8086f..14604e48f000eb457defda04c63a1f3bdc3e9662 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -159,12 +159,13 @@ class Layer;
scoped_ptr<blink::WebGestureEvent> gestureBeginEvent_;
// To avoid accidental pinches, require that a certain zoom threshold be
- // reached before forwarding it to the browser. Use |unusedPinchAmount_| to
+ // reached before forwarding it to the browser. Use |pinchUnusedAmount_| to
// hold this value. If the user reaches this value, don't re-require the
- // threshold be reached until a certain time has passed since the last
- // zoom. Store the time of the last zoom in |lastUsedPinchEventTimestamp_|.
- float unusedPinchAmount_;
- NSTimeInterval lastUsedPinchEventTimestamp_;
+ // threshold be reached until the page has been zoomed back to page scale of
+ // one.
+ bool pinchHasReachedZoomThreshold_;
+ float pinchUnusedAmount_;
+ NSTimeInterval pinchLastGestureTimestamp_;
// This is set if a GesturePinchBegin event has been sent in the lifetime of
// |gestureBeginEvent_|. If set, a GesturePinchEnd will be sent when the
@@ -450,6 +451,10 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
scoped_ptr<BrowserCompositorMacPlaceholder>
browser_compositor_placeholder_;
+ // Set when the currently-displayed frame is at page scale one. Used to
+ // determine if pinch gestures need to be thresholded.
+ bool page_is_at_scale_one_;
+
NSWindow* pepper_fullscreen_window() const {
return pepper_fullscreen_window_;
}

Powered by Google App Engine
This is Rietveld 408576698