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

Unified Diff: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h

Issue 1848063002: Fix page navigation being incorrectly fired on Mac OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename variable, add comments and remove ack in unittest Created 4 years, 9 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: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h
index 47fe073dff18a04bfcb37d393927d68358ae04a4..56313254e4a1b48f058c15a0b94c91a547bb1362 100644
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
namespace blink {
+class WebGestureEvent;
class WebMouseWheelEvent;
}
@@ -153,9 +154,19 @@ enum RecognitionState {
// the transition from kPending -> kPotential.
BOOL historySwipeDirectionInverted_;
- // Whether the event with phase NSEventPhaseBegan was not consumed by the
- // renderer. This variables defaults to NO for new gestures.
- BOOL beganEventUnconsumed_;
+ // Whether:
+ // 1) When wheel gestures are disabled if the wheel event with phase
+ // NSEventPhaseBegan was consumed by the renderer.
+ // 2) When wheel gestures are enabled and if the first gesture
+ // scroll was not consumed by the renderer.
+ // This variables defaults to NO for new gestures.
+ BOOL firstScrollUnconsumed_;
+
+ // Whether we have received a gesture scroll begin and are awiting on the
+ // first gesture scroll update to deteremine of the event was consumed by
+ // the renderer.
+ BOOL waitingForFirstGestureScroll_;
+
history_swiper::RecognitionState recognitionState_;
id<HistorySwiperDelegate> delegate_;
@@ -171,6 +182,8 @@ enum RecognitionState {
- (BOOL)handleEvent:(NSEvent*)event;
- (void)rendererHandledWheelEvent:(const blink::WebMouseWheelEvent&)event
consumed:(BOOL)consumed;
+- (void)rendererHandledGestureScrollEvent:(const blink::WebGestureEvent&)event
+ consumed:(BOOL)consumed;
// The event passed in is a gesture event, and has touch data associated with
// the trackpad.

Powered by Google App Engine
This is Rietveld 408576698