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

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

Issue 7618036: mac: Only let two-finger-scrolling trigger history if web doesn't swallow gesture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 4 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/render_widget_host_view_mac.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 42e295d638e22587622c51dae39a820faee89e71..4f8188c69726150fad581eeb903bb750dfa9fe15 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -117,9 +117,30 @@ class RWHVMEditCommandHelper;
// Whether the previous mouse event was ignored due to hitTest check.
BOOL mouseEventWasIgnored_;
+
+ // If a scroll event came back unhandled from the renderer.
+ // Used for history swiping.
+ BOOL gotUnhandledWheelEvent_;
Mark Mentovai 2011/08/15 14:43:57 Document which of these fields (I guess gotUnhandl
+
+ // Cummulative scroll delta since scroll gesture start.
+ // Used for history swiping.
+ NSSize totalScrollDelta_;
+
+ // 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_;
}
@property(nonatomic, readonly) NSRange selectedRange;
+@property(nonatomic) BOOL gotUnhandledWheelEvent;
+@property(nonatomic, setter=setPinnedLeft:) BOOL isPinnedLeft;
+@property(nonatomic, setter=setPinnedRight:) BOOL isPinnedRight;
+@property(nonatomic) BOOL hasHorizontalScrollbar;
- (void)setCanBeKeyView:(BOOL)can;
- (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
@@ -280,6 +301,13 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void SetVisuallyDeemphasized(const SkColor* color, bool animate);
+ virtual void UnhandledWheelEvent(
+ const WebKit::WebMouseWheelEvent& event) OVERRIDE;
+ virtual void SetHasHorizontalScrollbar(
+ bool has_horizontal_scrollbar) OVERRIDE;
+ virtual void SetScrollOffsetPinning(
+ bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
+
void KillSelf();
void SetTextInputActive(bool active);

Powered by Google App Engine
This is Rietveld 408576698