summaryrefslogtreecommitdiffstats
path: root/content/public/browser/browser_plugin_guest_delegate.h
diff options
context:
space:
mode:
authorlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-03 02:17:44 +0000
committerlazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-03 02:17:44 +0000
commit4bebcceebb6af85298c498e1ea9e4b6e32e290aa (patch)
tree4807180d81aa602b2e4d40674e86f1485cab7db9 /content/public/browser/browser_plugin_guest_delegate.h
parent7d67302a01daf37df42a5526654b84ccd7b244cd (diff)
downloadchromium_src-4bebcceebb6af85298c498e1ea9e4b6e32e290aa.zip
chromium_src-4bebcceebb6af85298c498e1ea9e4b6e32e290aa.tar.gz
chromium_src-4bebcceebb6af85298c498e1ea9e4b6e32e290aa.tar.bz2
Part 1/3 of http://crrev.com/225043005: Fire "contextmenu" event on
webview upon showing context menu. Fire an event "contextmenu" on <webview> when context menu is about to be shown. This CL only fires the event with menu items' info, doesn't do anything else. The doc (for the complete API) is here: https://docs.google.com/a/chromium.org/document/d/11pE2PRGSyLbZGVVP1pspViK_xLWv_A-1dJDY2kjjbgc/edit BUG=140315 Test= In a chrome app, create a <webview> element. Add contextmenu event listener to the element: var w = document.querySelector('webview'); w.addEventListener('contextmenu', function(e) { // e.items is an array of objects that represent menu items. // object = struct of .commandId = the id of the item, .label = the label of the itme. }); The event fires when you right-click on the <webview> to bring up context menu. Review URL: https://codereview.chromium.org/258533002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268007 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/browser/browser_plugin_guest_delegate.h')
-rw-r--r--content/public/browser/browser_plugin_guest_delegate.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/public/browser/browser_plugin_guest_delegate.h b/content/public/browser/browser_plugin_guest_delegate.h
index efb036c..7bd836b 100644
--- a/content/public/browser/browser_plugin_guest_delegate.h
+++ b/content/public/browser/browser_plugin_guest_delegate.h
@@ -19,6 +19,7 @@
namespace content {
class JavaScriptDialogManager;
+struct ContextMenuParams;
struct NativeWebKeyboardEvent;
// Objects implement this interface to get notified about changes in the guest
@@ -127,6 +128,9 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
// Returns a pointer to a service to manage JavaScript dialogs. May return
// NULL in which case dialogs aren't shown.
virtual JavaScriptDialogManager* GetJavaScriptDialogManager();
+
+ // Returns true if the context menu operation was handled by the delegate.
+ virtual bool HandleContextMenu(const ContextMenuParams& params);
};
} // namespace content