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

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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 04d2bc4729bb31e32145eb245d3165e9cc1c5105..2b93d0d930b9d1d0192ae564a8315e5babd49606 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 the minimum scale. Used to
+ // determine if pinch gestures need to be thresholded.
+ bool page_at_minimum_scale_;
+
NSWindow* pepper_fullscreen_window() const {
return pepper_fullscreen_window_;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698