diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 21:43:40 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-20 21:43:40 +0000 |
commit | c8ac905312f63f24f849de5d8e85bd603f17a5e7 (patch) | |
tree | e09e42704e86be0faf790bdd26f718c04d725cf1 /content/browser | |
parent | c1cfd8e2c81f68b0e8deb997ab289f1d28b387f6 (diff) | |
download | chromium_src-c8ac905312f63f24f849de5d8e85bd603f17a5e7.zip chromium_src-c8ac905312f63f24f849de5d8e85bd603f17a5e7.tar.gz chromium_src-c8ac905312f63f24f849de5d8e85bd603f17a5e7.tar.bz2 |
content: Make sure the renderer notifies the browser about touch-event handlers properly.
WebKit will soon stop sending the number of touch-event handlers, and instead
just send whether there are any touch-event hanlders on the page or not.
https://bugs.webkit.org/show_bug.cgi?id=91006
Once the change lands in WebKit and is gardened in, I will submit another
cleanup patch to remove the old numberOfTouchEventHandlersChanged and related
messages.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10797043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_impl.cc | 6 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host_impl.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 5ddb42d..038cfc5 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -289,6 +289,8 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_Blur, OnMsgBlur) IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumTouchEvents, OnMsgDidChangeNumTouchEvents) + IPC_MESSAGE_HANDLER(ViewHostMsg_HasTouchEventHandlers, + OnMsgHasTouchEventHandlers) IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnMsgSetCursor) IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, OnMsgTextInputStateChanged) @@ -1560,6 +1562,10 @@ void RenderWidgetHostImpl::OnMsgDidChangeNumTouchEvents(int count) { has_touch_handler_ = count > 0; } +void RenderWidgetHostImpl::OnMsgHasTouchEventHandlers(bool has_handlers) { + has_touch_handler_ = has_handlers; +} + void RenderWidgetHostImpl::OnMsgSetCursor(const WebCursor& cursor) { if (!view_) { return; diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index dd43f37..17593ff 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -498,6 +498,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, virtual void OnMsgFocus(); virtual void OnMsgBlur(); void OnMsgDidChangeNumTouchEvents(int count); + void OnMsgHasTouchEventHandlers(bool has_handlers); void OnMsgSetCursor(const WebCursor& cursor); void OnMsgTextInputStateChanged(ui::TextInputType type, |