diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 20:40:13 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 20:40:13 +0000 |
commit | f4f0459fb9b0a457f96062a081f9571c5ba11d57 (patch) | |
tree | b34a47474b6aa6b3a514ebc626436d3eaa3c8c5e /chrome/test/data/extensions/context_menus/test.js | |
parent | 31648ae08b34c0940a4aa5571314efdf7f3926b5 (diff) | |
download | chromium_src-f4f0459fb9b0a457f96062a081f9571c5ba11d57.zip chromium_src-f4f0459fb9b0a457f96062a081f9571c5ba11d57.tar.gz chromium_src-f4f0459fb9b0a457f96062a081f9571c5ba11d57.tar.bz2 |
More cleanup of extensions context menu API.
This changes the contextMenus.create method to synchronously return an id
instead of aysynchronously in the callback. This meant moving the generating of
id's from a globally unique integer in C++ code to an extension-unique integer
in javascript. The C++ unique id thus becomes a pair of <extension_id,int>.
Also a couple of small drive-by cleanups while I was in some of the files.
BUG=48198
TEST=The context menu API should work normally, given the changes described
above.
Review URL: http://codereview.chromium.org/2911007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/extensions/context_menus/test.js')
-rw-r--r-- | chrome/test/data/extensions/context_menus/test.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/test/data/extensions/context_menus/test.js b/chrome/test/data/extensions/context_menus/test.js index 9cab126..778b42c 100644 --- a/chrome/test/data/extensions/context_menus/test.js +++ b/chrome/test/data/extensions/context_menus/test.js @@ -26,7 +26,7 @@ function onclick(info) { window.onload = function() { chrome.experimental.contextMenus.create({"title":"Extension Item 1", - "onclick": onclick}, function(id) { + "onclick": onclick}, function() { if (!chrome.extension.lastError) { navigateCurrentTab(chrome.extension.getURL("test.html")); } |