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

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

Issue 9233058: Some touch-event forwarding optimization. (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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host.h
diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h
index 59f8eaf516c878b8755e8d03854acd4391c1c1f9..e222260b00665017982ef6d791d55762ffbe1d7d 100644
--- a/content/browser/renderer_host/render_widget_host.h
+++ b/content/browser/renderer_host/render_widget_host.h
@@ -399,6 +399,8 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
const gfx::Point& last_scroll_offset() const { return last_scroll_offset_; }
+ bool has_touch_handler() const { return has_touch_handler_; }
+
// Notification that the user has made some kind of input that could
// perform an action. See OnUserGesture for more details.
void StartUserGesture();
@@ -580,6 +582,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
bool processed);
virtual void OnMsgFocus();
virtual void OnMsgBlur();
+ void OnMsgDidChangeNumTouchEvents(int count);
void OnMsgSetCursor(const WebCursor& cursor);
void OnMsgTextInputStateChanged(ui::TextInputType type,
@@ -809,6 +812,11 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Channel::Listener,
bool pending_mouse_lock_request_;
+ // Keeps track of whether the webpage has any touch event handler. If it does,
+ // then touch events are sent to the renderer. Otherwise, the touch events are
+ // not sent to the renderer.
+ bool has_touch_handler_;
+
base::WeakPtrFactory<RenderWidgetHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost);
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698