diff options
author | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-10 12:12:05 +0000 |
---|---|---|
committer | lazyboy@chromium.org <lazyboy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-10 12:12:05 +0000 |
commit | 6f9d2c65f825f2a68502333722910061ef9678e7 (patch) | |
tree | 47b20dad077795b3e2ba15cef7d6eb5115fc9060 /printing | |
parent | f6ca12ef10248c5fd648825e61695b2769c4ddc3 (diff) | |
download | chromium_src-6f9d2c65f825f2a68502333722910061ef9678e7.zip chromium_src-6f9d2c65f825f2a68502333722910061ef9678e7.tar.gz chromium_src-6f9d2c65f825f2a68502333722910061ef9678e7.tar.bz2 |
<webview>: Context menu API implementation CL.
Very Similar to chrome.contextMenus API, only applies to the <webview> that it is called upon.
var w = document.querySelector('webview');
w.contextMenus.OnClicked.addListener(function() { .. });
w.contextMenus.create({id: '1', title: 'one'});
w.contextMenus.update({id: '2', title: 'new', onclick: ...});
w.contextMenus.remove('1');
w.contextMenus.removeAll('1');
This CL adds the actual implementation to the previously exposed skeleton API.
Docs/snippets here:
https://docs.google.com/a/chromium.org/document/d/1AoMD6kF8ui1dikzTrwK-weVHegSqQaLV2zx4xJSh_fQ/edit
TBR=stevenjb@chromium.org
BUG=140315
Test=Can be tested inside a chrome apps <webview>.
<webview>.contextMenus.create(...) to create custom context menu items.
The API is similar to chrome.contextMenus API. Similarly .update,
.remove, .removeAll is also supported.
Click event handler can be specified as
<webview>.contextMenus.onClick.addListener(...).
Review URL: https://codereview.chromium.org/186213003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
0 files changed, 0 insertions, 0 deletions