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 cb02412116ccdc0974b6bb3a0ed32f3ab73b0097..c9ad41d24aa20bcb7e999a5f36361328c4f687cc 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 |
@@ -17,18 +17,10 @@ |
@end |
namespace history_swiper { |
- |
enum NavigationDirection { |
kBackwards = 0, |
kForwards, |
}; |
- |
-enum GestureHandledState { |
- kPending, // Still waiting to determine whether the gesture was handled. |
- kHandled, // At least 1 event in the gesture was handled by blink. |
- kUnhandled, // No events so far have been handled by blink. |
-}; |
- |
} // history_swiper |
// Responsible for maintaining state for 2-finger swipe history navigation. |
@@ -41,10 +33,20 @@ |
@class HistoryOverlayController; |
@interface HistorySwiper : NSObject { |
@private |
- // Whether blink has handled the gesture. This enum gets reset to kPending |
- // whenever a new gesture starts. History swiping is only enabled if blink |
- // has never handled any of the events in the gesture. |
- history_swiper::GestureHandledState gestureHandledState_; |
+ // If the viewport is scrolled all the way to the left or right. |
+ // Used for history swiping. |
+ BOOL isPinnedLeft_; |
+ BOOL isPinnedRight_; |
+ |
+ // If the main frame has a horizontal scrollbar. |
+ // Used for history swiping. |
+ BOOL hasHorizontalScrollbar_; |
+ |
+ // If a scroll event came back unhandled from the renderer. Set to |NO| at |
+ // the start of a scroll gesture, and then to |YES| if a scroll event comes |
+ // back unhandled from the renderer. |
+ // Used for history swiping. |
+ BOOL gotUnhandledWheelEvent_; |
// This controller will exist if and only if the UI is in history swipe mode. |
HistoryOverlayController* historyOverlay_; |
@@ -93,7 +95,9 @@ |
// NSScrollWheel. We look at the phase to determine whether to trigger history |
// swiping |
- (BOOL)handleEvent:(NSEvent*)event; |
-- (void)gotWheelEventConsumed:(BOOL)consumed; |
+- (void)gotUnhandledWheelEvent; |
+- (void)scrollOffsetPinnedToLeft:(BOOL)left toRight:(BOOL)right; |
+- (void)setHasHorizontalScrollbar:(BOOL)hasHorizontalScrollbar; |
// The event passed in is a gesture event, and has touch data associated with |
// the trackpad. |