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

Side by Side 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: 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurfaceAPI.h> 9 #include <IOSurface/IOSurfaceAPI.h>
10 #include <list> 10 #include <list>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 id endWheelMonitor_; 152 id endWheelMonitor_;
153 153
154 // When a gesture starts, the system does not inform the view of which type 154 // When a gesture starts, the system does not inform the view of which type
155 // of gesture is happening (magnify, rotate, etc), rather, it just informs 155 // of gesture is happening (magnify, rotate, etc), rather, it just informs
156 // the view that some as-yet-undefined gesture is starting. Capture the 156 // the view that some as-yet-undefined gesture is starting. Capture the
157 // information about the gesture's beginning event here. It will be used to 157 // information about the gesture's beginning event here. It will be used to
158 // create a specific gesture begin event later. 158 // create a specific gesture begin event later.
159 scoped_ptr<blink::WebGestureEvent> gestureBeginEvent_; 159 scoped_ptr<blink::WebGestureEvent> gestureBeginEvent_;
160 160
161 // To avoid accidental pinches, require that a certain zoom threshold be 161 // To avoid accidental pinches, require that a certain zoom threshold be
162 // reached before forwarding it to the browser. Use |unusedPinchAmount_| to 162 // reached before forwarding it to the browser. Use |pinchUnusedAmount_| to
163 // hold this value. If the user reaches this value, don't re-require the 163 // hold this value. If the user reaches this value, don't re-require the
164 // threshold be reached until a certain time has passed since the last 164 // threshold be reached until a certain time has passed since the last
165 // zoom. Store the time of the last zoom in |lastUsedPinchEventTimestamp_|. 165 // zoom. Store the time of the last zoom in |pinchLastGestureTimestamp_|.
166 float unusedPinchAmount_; 166 bool pinchHasReachedZoomThreshold_;
167 NSTimeInterval lastUsedPinchEventTimestamp_; 167 float pinchUnusedAmount_;
168 NSTimeInterval pinchLastGestureTimestamp_;
168 169
169 // This is set if a GesturePinchBegin event has been sent in the lifetime of 170 // This is set if a GesturePinchBegin event has been sent in the lifetime of
170 // |gestureBeginEvent_|. If set, a GesturePinchEnd will be sent when the 171 // |gestureBeginEvent_|. If set, a GesturePinchEnd will be sent when the
171 // gesture ends. 172 // gesture ends.
172 BOOL gestureBeginPinchSent_; 173 BOOL gestureBeginPinchSent_;
173 174
174 // If true then escape key down events are suppressed until the first escape 175 // If true then escape key down events are suppressed until the first escape
175 // key up event. (The up event is suppressed as well). This is used by the 176 // key up event. (The up event is suppressed as well). This is used by the
176 // flash fullscreen code to avoid sending a key up event without a matching 177 // flash fullscreen code to avoid sending a key up event without a matching
177 // key down event. 178 // key down event.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 588
588 // Factory used to safely scope delayed calls to ShutdownHost(). 589 // Factory used to safely scope delayed calls to ShutdownHost().
589 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 590 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
590 591
591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 592 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
592 }; 593 };
593 594
594 } // namespace content 595 } // namespace content
595 596
596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 597 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698