diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 23:06:56 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 23:06:56 +0000 |
commit | 581b87eb99683237b52cf727178c0492cf273eeb (patch) | |
tree | 516cf6d1b75dc380fa179d72f95579300d9fdfcb /chrome/renderer/render_view.cc | |
parent | c72d7f9099a607ed546404a04a50402a9c3eeeb6 (diff) | |
download | chromium_src-581b87eb99683237b52cf727178c0492cf273eeb.zip chromium_src-581b87eb99683237b52cf727178c0492cf273eeb.tar.gz chromium_src-581b87eb99683237b52cf727178c0492cf273eeb.tar.bz2 |
Allow the browser to send actions back to the render for media element context menus.
Also renamed ContextNodeType per fishd's suggestion.
BUG=15686
TEST=none
Review URL: http://codereview.chromium.org/155954
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21466 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index fd8f61a..6af62ef 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -59,6 +59,7 @@ #include "webkit/api/public/WebDragData.h" #include "webkit/api/public/WebForm.h" #include "webkit/api/public/WebHistoryItem.h" +#include "webkit/api/public/WebNode.h" #include "webkit/api/public/WebPoint.h" #include "webkit/api/public/WebRect.h" #include "webkit/api/public/WebScriptSource.h" @@ -423,6 +424,7 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_EnableIntrinsicWidthChangedMode, OnEnableIntrinsicWidthChangedMode) IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) + IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) // Have the super handle all other messages. @@ -1977,7 +1979,7 @@ void RenderView::SyncNavigationState() { } void RenderView::ShowContextMenu(WebView* webview, - ContextNode node, + ContextNodeType node_type, int x, int y, const GURL& link_url, @@ -1991,7 +1993,7 @@ void RenderView::ShowContextMenu(WebView* webview, const std::string& security_info, const std::string& frame_charset) { ContextMenuParams params; - params.node = node; + params.node_type = node_type; params.x = x; params.y = y; params.src_url = src_url; @@ -2635,6 +2637,15 @@ void RenderView::OnSetRendererPrefs(const RendererPreferences& renderer_prefs) { // and |subpixel_rendering| through to Skia. } +void RenderView::OnMediaPlayerActionAt(int x, + int y, + const MediaPlayerAction& action) { + if (!webview()) + return; + + webview()->MediaPlayerActionAt(x, y, action); +} + void RenderView::OnUpdateBackForwardListCount(int back_list_count, int forward_list_count) { history_back_list_count_ = back_list_count; |