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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.h

Issue 9549020: Improve switch between gestures and touch mode when kEnableTouchEvents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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: content/browser/renderer_host/render_widget_host_view_win.h
diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h
index 839fdde98c7ac59ff92c0be46577b3630f2e37f1..736eeda64d3e02cf277f8fcd317c5cccc1ab1bbe 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.h
+++ b/content/browser/renderer_host/render_widget_host_view_win.h
@@ -197,7 +197,8 @@ class RenderWidgetHostViewWin
virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE;
virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
- virtual void ProcessTouchAck(bool processed) OVERRIDE;
+ virtual void ProcessTouchAck(WebKit::WebInputEvent::Type type,
+ bool processed) OVERRIDE;
virtual void SetHasHorizontalScrollbar(
bool has_horizontal_scrollbar) OVERRIDE;
virtual void SetScrollOffsetPinning(
@@ -368,6 +369,16 @@ class RenderWidgetHostViewWin
// a WM_POINTERDOWN message.
void ResetPointerDownContext();
+ // Switches between raw-touches mode and gesture mode. Currently touch mode
+ // will only take effect when kEnableTouchEvents is in effect.
+ void UpdateDesiredTouchMode(bool touch);
+
+ // Set window to receive gestures.
+ void SetToGestureMode();
+
+ // Set window to raw touch events. Returns whether registering was successful.
+ bool SetToTouchMode();
+
// The associated Model. While |this| is being Destroyed,
// |render_widget_host_| is NULL and the Windows message loop is run one last
// time. Message handlers must check for a NULL |render_widget_host_|.
@@ -546,6 +557,9 @@ class RenderWidgetHostViewWin
// Region in which the view will be transparent to clicks.
gfx::ScopedSkRegion transparent_region_;
+ // Are touch events currently enabled?
+ bool touch_events_enabled_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin);
};

Powered by Google App Engine
This is Rietveld 408576698