diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 14:36:33 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 14:36:33 +0000 |
commit | a0c7153edf226726a86619119c68f5e660b3930e (patch) | |
tree | 97ea32cf90057ed1c75c45e3c3f6718f12e67a6b /chrome/renderer | |
parent | 33db7e323b9d6d1bd8cda94bc3fe5da1727c485a (diff) | |
download | chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.zip chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.tar.gz chromium_src-a0c7153edf226726a86619119c68f5e660b3930e.tar.bz2 |
Chromium: support custom WebCore context menu items in Chromium port (downstream).
Review URL: http://codereview.chromium.org/465123
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34154 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index c47cd25..4718a5c 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -505,9 +505,11 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent, - OnSetEditCommandsForNextKeyEvent); + OnSetEditCommandsForNextKeyEvent) IPC_MESSAGE_HANDLER(ViewMsg_ExecuteCode, OnExecuteCode) + IPC_MESSAGE_HANDLER(ViewMsg_CustomContextMenuAction, + OnCustomContextMenuAction) // Have the super handle all other messages. IPC_MESSAGE_UNHANDLED(RenderWidget::OnMessageReceived(message)) @@ -3167,6 +3169,10 @@ void RenderView::OnSetAltErrorPageURL(const GURL& url) { alternate_error_page_url_ = url; } +void RenderView::OnCustomContextMenuAction(unsigned action) { + webview()->performCustomContextMenuAction(action); +} + void RenderView::OnInstallMissingPlugin() { // This could happen when the first default plugin is deleted. if (first_default_plugin_) diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 57cc845..c69a601 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -674,6 +674,9 @@ class RenderView : public RenderWidget, // accordingly, etc.). void OnSetActive(bool active); + // Execute custom context menu action. + void OnCustomContextMenuAction(unsigned action); + // Exposes the DOMAutomationController object that allows JS to send // information to the browser process. void BindDOMAutomationController(WebKit::WebFrame* webframe); |