diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 18:43:01 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 18:43:01 +0000 |
commit | cf06a4ae0a4313622ffcecc6a3520405128d230d (patch) | |
tree | 285b3160e6bea58f55390eef874fd6e2b109ea8e /content | |
parent | d0aff40acbcf6714daef11e343f409bb11ea7678 (diff) | |
download | chromium_src-cf06a4ae0a4313622ffcecc6a3520405128d230d.zip chromium_src-cf06a4ae0a4313622ffcecc6a3520405128d230d.tar.gz chromium_src-cf06a4ae0a4313622ffcecc6a3520405128d230d.tar.bz2 |
Inform the browser about mouse input in windowed plugins to ensure that we expect actions
which correspond to user gesture like downloads, external protocol launches, etc. Actions
occurring in the context of user input need to be allowed. To achieve this we send over
the WM_PARENTNOTIFY message to the RVH window which turns on user gesture. As per msdn
this message should be received automatically which does not appear to be the case.
All this means that we trust the plugin. However this does not add a new attack vector
as the plugin can send messages to other windows in the desktop anyway.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=41157
BUG=41157
TEST=As described in the bug.
Review URL: http://codereview.chromium.org/6592092
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/render_widget_host.cc | 5 | ||||
-rw-r--r-- | content/browser/renderer_host/render_widget_host.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc index 2d081d5..f6daf41 100644 --- a/content/browser/renderer_host/render_widget_host.cc +++ b/content/browser/renderer_host/render_widget_host.cc @@ -1285,3 +1285,8 @@ void RenderWidgetHost::ActivateDeferredPluginHandles() { deferred_plugin_handles_.clear(); } + +void RenderWidgetHost::StartUserGesture() { + OnUserGesture(); +} + diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h index d3598dd..149f5f9 100644 --- a/content/browser/renderer_host/render_widget_host.h +++ b/content/browser/renderer_host/render_widget_host.h @@ -395,6 +395,10 @@ class RenderWidgetHost : public IPC::Channel::Listener, const gfx::Point& last_scroll_offset() const { return last_scroll_offset_; } + // Notification that the user has made some kind of input that could + // perform an action. See OnUserGesture for more details. + void StartUserGesture(); + protected: // Internal implementation of the public Forward*Event() methods. void ForwardInputEvent(const WebKit::WebInputEvent& input_event, |