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

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

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
Index: content/browser/renderer_host/render_widget_host.cc
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc
index 1a6b65ede587719e84a45679d8cfd9096d8930f2..20cb3c638454e5fc15319c2536f35a30a2f619ea 100644
--- a/content/browser/renderer_host/render_widget_host.cc
+++ b/content/browser/renderer_host/render_widget_host.cc
@@ -103,6 +103,7 @@ RenderWidgetHost::RenderWidgetHost(content::RenderProcessHost* process,
text_direction_canceled_(false),
suppress_next_char_events_(false),
pending_mouse_lock_request_(false),
+ has_touch_handler_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
if (routing_id_ == MSG_ROUTING_NONE) {
routing_id_ = process_->GetNextRoutingID();
@@ -220,6 +221,8 @@ bool RenderWidgetHost::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_HandleInputEvent_ACK, OnMsgInputEventAck)
IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnMsgFocus)
IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumTouchEvents,
+ OnMsgDidChangeNumTouchEvents)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor)
IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
OnMsgTextInputStateChanged)
@@ -1207,6 +1210,10 @@ void RenderWidgetHost::OnMsgBlur() {
process()->ReceivedBadMessage();
}
+void RenderWidgetHost::OnMsgDidChangeNumTouchEvents(int count) {
+ has_touch_handler_ = count > 0;
+}
+
void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) {
if (!view_) {
return;
« no previous file with comments | « content/browser/renderer_host/render_widget_host.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698