diff options
66 files changed, 200 insertions, 50 deletions
diff --git a/chrome/browser/extensions/extension_context_menu_api.h b/chrome/browser/extensions/extension_context_menu_api.h index 3362aae..bfd0d12 100644 --- a/chrome/browser/extensions/extension_context_menu_api.h +++ b/chrome/browser/extensions/extension_context_menu_api.h @@ -46,25 +46,25 @@ class ExtensionContextMenuFunction : public SyncExtensionFunction { class CreateContextMenuFunction : public ExtensionContextMenuFunction { ~CreateContextMenuFunction() {} virtual bool RunImpl(); - DECLARE_EXTENSION_FUNCTION_NAME("experimental.contextMenus.create") + DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.create") }; class UpdateContextMenuFunction : public ExtensionContextMenuFunction { ~UpdateContextMenuFunction() {} virtual bool RunImpl(); - DECLARE_EXTENSION_FUNCTION_NAME("experimental.contextMenus.update") + DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.update") }; class RemoveContextMenuFunction : public ExtensionContextMenuFunction { ~RemoveContextMenuFunction() {} virtual bool RunImpl(); - DECLARE_EXTENSION_FUNCTION_NAME("experimental.contextMenus.remove") + DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.remove") }; class RemoveAllContextMenusFunction : public ExtensionContextMenuFunction { ~RemoveAllContextMenusFunction() {} virtual bool RunImpl(); - DECLARE_EXTENSION_FUNCTION_NAME("experimental.contextMenus.removeAll") + DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.removeAll") }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_API_H__ diff --git a/chrome/browser/extensions/extension_context_menu_apitest.cc b/chrome/browser/extensions/extension_context_menu_apitest.cc index ac8b114..1ae6edf 100644 --- a/chrome/browser/extensions/extension_context_menu_apitest.cc +++ b/chrome/browser/extensions/extension_context_menu_apitest.cc @@ -7,10 +7,6 @@ #include "chrome/common/chrome_switches.h" IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContextMenus) { - // TODO(asargent): Remove when context menu API is no longer experimental - // (http://crbug.com/39508). - CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnableExperimentalExtensionApis); - - ASSERT_TRUE(RunExtensionTest("context_menus")) << message_; + ASSERT_TRUE(RunExtensionTest("context_menus/basics")) << message_; + ASSERT_TRUE(RunExtensionTest("context_menus/no_perms")) << message_; } diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index d2bf7f9..fcc1e61 100644 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -2502,7 +2502,7 @@ "events": [] }, { - "namespace": "experimental.contextMenus", + "namespace": "contextMenus", "types": [], "functions": [ { diff --git a/chrome/common/extensions/docs/a11y.html b/chrome/common/extensions/docs/a11y.html index 67a0694..45721ff 100644 --- a/chrome/common/extensions/docs/a11y.html +++ b/chrome/common/extensions/docs/a11y.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/api_index.html b/chrome/common/extensions/docs/api_index.html index a7cad32..ebd983a 100644 --- a/chrome/common/extensions/docs/api_index.html +++ b/chrome/common/extensions/docs/api_index.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> @@ -295,7 +296,7 @@ Here are the supported chrome.* APIs: </p> <ul> - <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="cookies.html" js="">cookies</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li> + <li><a href="bookmarks.html" js="">bookmarks</a></li><li><a href="browserAction.html" js="">browserAction</a></li><li><a href="contextMenus.html" js="">contextMenus</a></li><li><a href="cookies.html" js="">cookies</a></li><li><a href="extension.html" js="">extension</a></li><li><a href="history.html" js="">history</a></li><li><a href="i18n.html" js="">i18n</a></li><li><a href="idle.html" js="">idle</a></li><li><a href="pageAction.html" js="">pageAction</a></li><li><a href="tabs.html" js="">tabs</a></li><li><a href="windows.html" js="">windows</a></li> </ul> <h2 id="experimental">Experimental APIs</h2> diff --git a/chrome/common/extensions/docs/api_other.html b/chrome/common/extensions/docs/api_other.html index 7e036c4..84dec79 100644 --- a/chrome/common/extensions/docs/api_other.html +++ b/chrome/common/extensions/docs/api_other.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/autoupdate.html b/chrome/common/extensions/docs/autoupdate.html index 0d1a1d5..0e5919d 100644 --- a/chrome/common/extensions/docs/autoupdate.html +++ b/chrome/common/extensions/docs/autoupdate.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/background_pages.html b/chrome/common/extensions/docs/background_pages.html index 76bb393..5a0d35a 100644 --- a/chrome/common/extensions/docs/background_pages.html +++ b/chrome/common/extensions/docs/background_pages.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/bookmarks.html b/chrome/common/extensions/docs/bookmarks.html index e3414acb..2d5e1d7 100644 --- a/chrome/common/extensions/docs/bookmarks.html +++ b/chrome/common/extensions/docs/bookmarks.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/browserAction.html b/chrome/common/extensions/docs/browserAction.html index 5c74487..e182058 100644 --- a/chrome/common/extensions/docs/browserAction.html +++ b/chrome/common/extensions/docs/browserAction.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li class="leftNavSelected">Browser Actions</li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html index 6e288bc..12ec46a 100644 --- a/chrome/common/extensions/docs/content_scripts.html +++ b/chrome/common/extensions/docs/content_scripts.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/experimental.contextMenus.html b/chrome/common/extensions/docs/contextMenus.html index 10e9a72..704c09d 100644 --- a/chrome/common/extensions/docs/experimental.contextMenus.html +++ b/chrome/common/extensions/docs/contextMenus.html @@ -15,7 +15,7 @@ </script> <script type="text/javascript" src="js/api_page_generator.js"></script> <script type="text/javascript" src="js/bootstrap.js"></script> - <title>chrome.experimental.contextMenus - Google Chrome Extensions - Google Code</title></head><body> <div id="gc-container" class="labs"> + <title>chrome.contextMenus - Google Chrome Extensions - Google Code</title></head><body> <div id="gc-container" class="labs"> <div id="devModeWarning"> You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files. </div> @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li class="leftNavSelected">Context Menus</li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> @@ -209,22 +210,22 @@ <div class="g-unit" id="gc-pagecontent"> <div id="pageTitle"> - <h1 class="page_title">chrome.experimental.contextMenus</h1> + <h1 class="page_title">chrome.contextMenus</h1> </div> <!-- TABLE OF CONTENTS --> <div id="toc"> <h2>Contents</h2> <ol> - <li style="display: none; "> - <a>h2Name</a> + <li> + <a href="#manifest">Manifest</a> <ol> - <li> + <li style="display: none; "> <a>h3Name</a> </li> </ol> </li> <li> - <a href="#apiReference">API reference: chrome.experimental.contextMenus</a> + <a href="#apiReference">API reference: chrome.contextMenus</a> <ol> <li style="display: none; "> <a href="#properties">Properties</a> @@ -272,18 +273,54 @@ <!-- STATIC CONTENT PLACEHOLDER --> <div id="static"><!-- BEGIN AUTHORED CONTENT --> -<p id="classSummary"> -For information on how to use experimental APIs, -see the <a href="experimental.html">chrome.experimental.* APIs</a> page. +<p> +The context menus module allows you +to add items to Google Chrome's context menu. </p> +<p> +You can choose what types of objects +your context menu additions apply to, +such as images, hyperlinks, and pages. +</p> + +<p> +You can create as many context menu items +as you need, but if more than one +from your extension is visible at once, +Google Chrome automatically collapses them +into a single parent menu. +</p> + +<h2 id="manifest">Manifest</h2> +<p>You must declare the "contextMenus" permission +in your extension's manifest to use the API. +Also, you should specify a 16x16-pixel icon +for display next to your menu item. +For example: +</p> + +<pre>{ + "name": "My extension", + ... + "permissions": [ + <b>"contextMenus"</b> + ], + "icons": { + <b>"16": "icon-bitty.png",</b> + "48": "icon-small.png", + "128": "icon-large.png" + }, + ... +}</pre> + <!-- END AUTHORED CONTENT --> </div> <!-- API PAGE --> <div class="apiPage"> <a name="apiReference"></a> - <h2>API reference: chrome.experimental.contextMenus</h2> + <h2>API reference: chrome.contextMenus</h2> <!-- PROPERTIES --> <div class="apiGroup" style="display: none; "> @@ -315,7 +352,7 @@ see the <a href="experimental.html">chrome.experimental.* APIs</a> page. <div class="summary"><span>integer</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.experimental.contextMenus.create</span>(<span class="null"><span style="display: none; ">, </span><span>object</span> + <span>chrome.contextMenus.create</span>(<span class="null"><span style="display: none; ">, </span><span>object</span> <var><span>createProperties</span></var></span><span class="optional"><span>, </span><span>function</span> <var><span>callback</span></var></span>)</div> @@ -852,7 +889,7 @@ see the <a href="experimental.html">chrome.experimental.* APIs</a> page. <div class="summary"><span style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.experimental.contextMenus.remove</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> + <span>chrome.contextMenus.remove</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> <var><span>menuItemId</span></var></span><span class="optional"><span>, </span><span>function</span> <var><span>callback</span></var></span>)</div> @@ -1018,7 +1055,7 @@ see the <a href="experimental.html">chrome.experimental.* APIs</a> page. <div class="summary"><span style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.experimental.contextMenus.removeAll</span>(<span class="optional"><span style="display: none; ">, </span><span>function</span> + <span>chrome.contextMenus.removeAll</span>(<span class="optional"><span style="display: none; ">, </span><span>function</span> <var><span>callback</span></var></span>)</div> <div class="description"> @@ -1131,7 +1168,7 @@ see the <a href="experimental.html">chrome.experimental.* APIs</a> page. <div class="summary"><span style="display: none; ">void</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.experimental.contextMenus.update</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> + <span>chrome.contextMenus.update</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> <var><span>id</span></var></span><span class="null"><span>, </span><span>object</span> <var><span>updateProperties</span></var></span><span class="optional"><span>, </span><span>function</span> <var><span>callback</span></var></span>)</div> diff --git a/chrome/common/extensions/docs/devguide.html b/chrome/common/extensions/docs/devguide.html index 191c072..4d45aa9 100644 --- a/chrome/common/extensions/docs/devguide.html +++ b/chrome/common/extensions/docs/devguide.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/docs.html b/chrome/common/extensions/docs/docs.html index d8696b9..fd683f5 100644 --- a/chrome/common/extensions/docs/docs.html +++ b/chrome/common/extensions/docs/docs.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/events.html b/chrome/common/extensions/docs/events.html index 80a3f8d..daef9af 100644 --- a/chrome/common/extensions/docs/events.html +++ b/chrome/common/extensions/docs/events.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/experimental.clipboard.html b/chrome/common/extensions/docs/experimental.clipboard.html index 167f4cb..ecfd14c 100644 --- a/chrome/common/extensions/docs/experimental.clipboard.html +++ b/chrome/common/extensions/docs/experimental.clipboard.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/experimental.html b/chrome/common/extensions/docs/experimental.html index 5850c16..227fd36 100644 --- a/chrome/common/extensions/docs/experimental.html +++ b/chrome/common/extensions/docs/experimental.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> @@ -275,7 +276,6 @@ on the following experimental APIs: <ul> <li> <a href="experimental.clipboard.html">experimental.clipboard</a></li><li> - <a href="experimental.contextMenus.html">experimental.contextMenus</a></li><li> <a href="experimental.infobars.html">experimental.infobars</a></li><li> <a href="experimental.omnibox.html">experimental.omnibox</a></li><li> <a href="experimental.processes.html">experimental.processes</a></li> diff --git a/chrome/common/extensions/docs/experimental.infobars.html b/chrome/common/extensions/docs/experimental.infobars.html index 78382f3..af4ace4 100644 --- a/chrome/common/extensions/docs/experimental.infobars.html +++ b/chrome/common/extensions/docs/experimental.infobars.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/experimental.omnibox.html b/chrome/common/extensions/docs/experimental.omnibox.html index 1d61f4d..5030014 100644 --- a/chrome/common/extensions/docs/experimental.omnibox.html +++ b/chrome/common/extensions/docs/experimental.omnibox.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/experimental.processes.html b/chrome/common/extensions/docs/experimental.processes.html index 38136e3..d70fee0 100644 --- a/chrome/common/extensions/docs/experimental.processes.html +++ b/chrome/common/extensions/docs/experimental.processes.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/extension.html b/chrome/common/extensions/docs/extension.html index ea55b3a..a68a66f 100644 --- a/chrome/common/extensions/docs/extension.html +++ b/chrome/common/extensions/docs/extension.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/external_extensions.html b/chrome/common/extensions/docs/external_extensions.html index 838299a..0fa39e7 100644 --- a/chrome/common/extensions/docs/external_extensions.html +++ b/chrome/common/extensions/docs/external_extensions.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/faq.html b/chrome/common/extensions/docs/faq.html index 357bfe4..6368cab 100644 --- a/chrome/common/extensions/docs/faq.html +++ b/chrome/common/extensions/docs/faq.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/getstarted.html b/chrome/common/extensions/docs/getstarted.html index 6ebf025..db717f1 100644 --- a/chrome/common/extensions/docs/getstarted.html +++ b/chrome/common/extensions/docs/getstarted.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/history.html b/chrome/common/extensions/docs/history.html index d6ce36a..ee93a37 100644 --- a/chrome/common/extensions/docs/history.html +++ b/chrome/common/extensions/docs/history.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/hosting.html b/chrome/common/extensions/docs/hosting.html index 9830f67..685cbc2 100644 --- a/chrome/common/extensions/docs/hosting.html +++ b/chrome/common/extensions/docs/hosting.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/i18n-messages.html b/chrome/common/extensions/docs/i18n-messages.html index e252eab..6f0ebaa 100644 --- a/chrome/common/extensions/docs/i18n-messages.html +++ b/chrome/common/extensions/docs/i18n-messages.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/i18n.html b/chrome/common/extensions/docs/i18n.html index c84a8e9..5c90177 100644 --- a/chrome/common/extensions/docs/i18n.html +++ b/chrome/common/extensions/docs/i18n.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/idle.html b/chrome/common/extensions/docs/idle.html index e368c0e..a2ea042 100644 --- a/chrome/common/extensions/docs/idle.html +++ b/chrome/common/extensions/docs/idle.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/index.html b/chrome/common/extensions/docs/index.html index f329bdd..e2f8259 100644 --- a/chrome/common/extensions/docs/index.html +++ b/chrome/common/extensions/docs/index.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html index a1a67cb..e476ee9 100644 --- a/chrome/common/extensions/docs/manifest.html +++ b/chrome/common/extensions/docs/manifest.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> @@ -549,6 +550,11 @@ The following table lists the permissions an extension can use. </td> </tr> <tr> + <td> "contextMenus" </td> + <td> Required if the extension uses the + <a href="contextMenus.html">context menus</a> module. </td> +</tr> +<tr> <td> "cookies" </td> <td> Required if the extension uses the <a href="cookies.html">chrome.cookies</a> module. </td> diff --git a/chrome/common/extensions/docs/match_patterns.html b/chrome/common/extensions/docs/match_patterns.html index a1f8f0c..7d49525 100644 --- a/chrome/common/extensions/docs/match_patterns.html +++ b/chrome/common/extensions/docs/match_patterns.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/messaging.html b/chrome/common/extensions/docs/messaging.html index b421bd5..b5a209f 100644 --- a/chrome/common/extensions/docs/messaging.html +++ b/chrome/common/extensions/docs/messaging.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/notifications.html b/chrome/common/extensions/docs/notifications.html index 1cc70c0..810a1dd 100644 --- a/chrome/common/extensions/docs/notifications.html +++ b/chrome/common/extensions/docs/notifications.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li class="leftNavSelected">Desktop Notifications</li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/npapi.html b/chrome/common/extensions/docs/npapi.html index f72740c..7b8e852 100644 --- a/chrome/common/extensions/docs/npapi.html +++ b/chrome/common/extensions/docs/npapi.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/options.html b/chrome/common/extensions/docs/options.html index 47846e9..01f4c3f 100644 --- a/chrome/common/extensions/docs/options.html +++ b/chrome/common/extensions/docs/options.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li class="leftNavSelected">Options Pages</li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/override.html b/chrome/common/extensions/docs/override.html index 9856cf6..4449c10 100644 --- a/chrome/common/extensions/docs/override.html +++ b/chrome/common/extensions/docs/override.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li class="leftNavSelected">Override Pages</li> diff --git a/chrome/common/extensions/docs/overview.html b/chrome/common/extensions/docs/overview.html index 63ebf4c..cd60bdf 100644 --- a/chrome/common/extensions/docs/overview.html +++ b/chrome/common/extensions/docs/overview.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/packaging.html b/chrome/common/extensions/docs/packaging.html index c7f8783..d9f64de 100644 --- a/chrome/common/extensions/docs/packaging.html +++ b/chrome/common/extensions/docs/packaging.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/pageAction.html b/chrome/common/extensions/docs/pageAction.html index 2c1917fb..d6e9b7e8 100644 --- a/chrome/common/extensions/docs/pageAction.html +++ b/chrome/common/extensions/docs/pageAction.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html index 698d4a0..ed6e24b 100644 --- a/chrome/common/extensions/docs/samples.html +++ b/chrome/common/extensions/docs/samples.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/static/contextMenus.html b/chrome/common/extensions/docs/static/contextMenus.html new file mode 100644 index 0000000..e75fdf6 --- /dev/null +++ b/chrome/common/extensions/docs/static/contextMenus.html @@ -0,0 +1,43 @@ +<!-- BEGIN AUTHORED CONTENT --> +<p> +The context menus module allows you +to add items to Google Chrome's context menu. +</p> + +<p> +You can choose what types of objects +your context menu additions apply to, +such as images, hyperlinks, and pages. +</P> + +<p> +You can create as many context menu items +as you need, but if more than one +from your extension is visible at once, +Google Chrome automatically collapses them +into a single parent menu. +</p> + +<h2 id="manifest">Manifest</h2> +<p>You must declare the "contextMenus" permission +in your extension's manifest to use the API. +Also, you should specify a 16x16-pixel icon +for display next to your menu item. +For example: +</p> + +<pre>{ + "name": "My extension", + ... + "permissions": [ + <b>"contextMenus"</b> + ], + "icons": { + <b>"16": "icon-bitty.png",</b> + "48": "icon-small.png", + "128": "icon-large.png" + }, + ... +}</pre> + +<!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/static/experimental.contextMenus.html b/chrome/common/extensions/docs/static/experimental.contextMenus.html deleted file mode 100644 index bc07cad..0000000 --- a/chrome/common/extensions/docs/static/experimental.contextMenus.html +++ /dev/null @@ -1,7 +0,0 @@ -<!-- BEGIN AUTHORED CONTENT --> -<p id="classSummary"> -For information on how to use experimental APIs, -see the <a href="experimental.html">chrome.experimental.* APIs</a> page. -</p> - -<!-- END AUTHORED CONTENT --> diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html index 1cb3ce4..2842ef3 100644 --- a/chrome/common/extensions/docs/static/manifest.html +++ b/chrome/common/extensions/docs/static/manifest.html @@ -264,6 +264,11 @@ The following table lists the permissions an extension can use. </td> </tr> <tr> + <td> "contextMenus" </td> + <td> Required if the extension uses the + <a href="contextMenus.html">context menus</a> module. </td> +</tr> +<tr> <td> "cookies" </td> <td> Required if the extension uses the <a href="cookies.html">chrome.cookies</a> module. </td> diff --git a/chrome/common/extensions/docs/tabs.html b/chrome/common/extensions/docs/tabs.html index faca514..4a98988 100644 --- a/chrome/common/extensions/docs/tabs.html +++ b/chrome/common/extensions/docs/tabs.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html index 643c20b..01b8ed5 100644 --- a/chrome/common/extensions/docs/template/api_template.html +++ b/chrome/common/extensions/docs/template/api_template.html @@ -133,6 +133,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/themes.html b/chrome/common/extensions/docs/themes.html index 988ad74..649cd20 100644 --- a/chrome/common/extensions/docs/themes.html +++ b/chrome/common/extensions/docs/themes.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/tut_analytics.html b/chrome/common/extensions/docs/tut_analytics.html index 132efe5..4ae0740 100644 --- a/chrome/common/extensions/docs/tut_analytics.html +++ b/chrome/common/extensions/docs/tut_analytics.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/tut_debugging.html b/chrome/common/extensions/docs/tut_debugging.html index e14df2e..153fb3e 100644 --- a/chrome/common/extensions/docs/tut_debugging.html +++ b/chrome/common/extensions/docs/tut_debugging.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/tut_oauth.html b/chrome/common/extensions/docs/tut_oauth.html index 63b6fcc..cea580b 100644 --- a/chrome/common/extensions/docs/tut_oauth.html +++ b/chrome/common/extensions/docs/tut_oauth.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/tutorials.html b/chrome/common/extensions/docs/tutorials.html index 4a93974..fb26df3 100644 --- a/chrome/common/extensions/docs/tutorials.html +++ b/chrome/common/extensions/docs/tutorials.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/windows.html b/chrome/common/extensions/docs/windows.html index 3cebe1e..f5ea6250 100644 --- a/chrome/common/extensions/docs/windows.html +++ b/chrome/common/extensions/docs/windows.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/docs/xhr.html b/chrome/common/extensions/docs/xhr.html index 3ce681e..72cd980 100644 --- a/chrome/common/extensions/docs/xhr.html +++ b/chrome/common/extensions/docs/xhr.html @@ -146,6 +146,7 @@ <li>Browser UI <ul> <li><a href="browserAction.html">Browser Actions</a></li> + <li><a href="contextMenus.html">Context Menus</a></li> <li><a href="notifications.html">Desktop Notifications</a></li> <li><a href="options.html">Options Pages</a></li> <li><a href="override.html">Override Pages</a></li> diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 2e5932a..609617c 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -113,6 +113,7 @@ const int Extension::kPageActionIconMaxSize = 19; const int Extension::kBrowserActionIconMaxSize = 19; const char* Extension::kBackgroundPermission = "background"; +const char* Extension::kContextMenusPermission = "contextMenus"; const char* Extension::kBookmarkPermission = "bookmarks"; const char* Extension::kCookiePermission = "cookies"; const char* Extension::kExperimentalPermission = "experimental"; @@ -126,6 +127,7 @@ const char* Extension::kUnlimitedStoragePermission = "unlimited_storage"; const char* Extension::kPermissionNames[] = { Extension::kBackgroundPermission, Extension::kBookmarkPermission, + Extension::kContextMenusPermission, Extension::kCookiePermission, Extension::kExperimentalPermission, Extension::kGeolocationPermission, diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index b109909..8e55fa2 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -96,6 +96,7 @@ class Extension { // - ExtensionInstallUI::GetV2Warnings() static const char* kBackgroundPermission; static const char* kBookmarkPermission; + static const char* kContextMenusPermission; static const char* kCookiePermission; static const char* kExperimentalPermission; static const char* kGeolocationPermission; diff --git a/chrome/renderer/extensions/extension_process_bindings.cc b/chrome/renderer/extensions/extension_process_bindings.cc index f999e54..5e99f80 100644 --- a/chrome/renderer/extensions/extension_process_bindings.cc +++ b/chrome/renderer/extensions/extension_process_bindings.cc @@ -82,7 +82,6 @@ const char* kNonPermissionExtensionPackages[] = { "pageActions", "browserAction", "browserActions", - "contextMenus", // TODO(asargent) remove when the permission is added "i18n", "devtools", "test" diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js index 108577b..6e1689c 100644 --- a/chrome/renderer/resources/extension_process_bindings.js +++ b/chrome/renderer/resources/extension_process_bindings.js @@ -601,7 +601,7 @@ var chrome = chrome || {}; details, this.name, this.definition.parameters, "page action"); }; - apiFunctions["experimental.contextMenus.create"].handleRequest = + apiFunctions["contextMenus.create"].handleRequest = function() { var args = arguments; var id = chromeHidden.contextMenus.nextId++; @@ -611,7 +611,7 @@ var chrome = chrome || {}; return id; }; - apiFunctions["experimental.contextMenus.create"].customCallback = + apiFunctions["contextMenus.create"].customCallback = function(name, request, response) { if (chrome.extension.lastError) { return; @@ -627,7 +627,7 @@ var chrome = chrome || {}; } }; - apiFunctions["experimental.contextMenus.remove"].customCallback = + apiFunctions["contextMenus.remove"].customCallback = function(name, request, response) { if (chrome.extension.lastError) { return; @@ -636,7 +636,7 @@ var chrome = chrome || {}; delete chromeHidden.contextMenus.handlers[id]; }; - apiFunctions["experimental.contextMenus.update"].customCallback = + apiFunctions["contextMenus.update"].customCallback = function(name, request, response) { if (chrome.extension.lastError) { return; @@ -647,7 +647,7 @@ var chrome = chrome || {}; } }; - apiFunctions["experimental.contextMenus.removeAll"].customCallback = + apiFunctions["contextMenus.removeAll"].customCallback = function(name, request, response) { if (chrome.extension.lastError) { return; diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js index c03c841..731da47 100644 --- a/chrome/renderer/resources/renderer_extension_bindings.js +++ b/chrome/renderer/resources/renderer_extension_bindings.js @@ -243,12 +243,12 @@ var chrome = chrome || {}; // Entire namespaces. "bookmarks", "browserAction", + "contextMenus", "cookies", "devtools", "experimental.accessibility", "experimental.bookmarkManager", "experimental.clipboard", - "experimental.contextMenus", "experimental.extension", "experimental.infobars", "experimental.metrics", diff --git a/chrome/test/data/extensions/api_test/context_menus/manifest.json b/chrome/test/data/extensions/api_test/context_menus/basics/manifest.json index 4659441..c59fe30 100644 --- a/chrome/test/data/extensions/api_test/context_menus/manifest.json +++ b/chrome/test/data/extensions/api_test/context_menus/basics/manifest.json @@ -3,5 +3,5 @@ "version": "0.1", "description": "end-to-end browser test for chrome.contextMenus API", "background_page": "test.html", - "permissions": ["experimental", "tabs"] + "permissions": ["contextMenus", "tabs"] } diff --git a/chrome/test/data/extensions/api_test/context_menus/test.html b/chrome/test/data/extensions/api_test/context_menus/basics/test.html index 46f4d74..46f4d74 100644 --- a/chrome/test/data/extensions/api_test/context_menus/test.html +++ b/chrome/test/data/extensions/api_test/context_menus/basics/test.html diff --git a/chrome/test/data/extensions/api_test/context_menus/test.js b/chrome/test/data/extensions/api_test/context_menus/basics/test.js index 65ca7d9..b1e5c1c 100644 --- a/chrome/test/data/extensions/api_test/context_menus/test.js +++ b/chrome/test/data/extensions/api_test/context_menus/basics/test.js @@ -2,10 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -if (!chrome.contextMenus) { - chrome.contextMenus = chrome.experimental.contextMenus; -} - var assertNoLastError = chrome.test.assertNoLastError; var tests = [ @@ -88,4 +84,3 @@ for (var i in contexts) { } chrome.test.runTests(tests); - diff --git a/chrome/test/data/extensions/api_test/context_menus/no_perms/manifest.json b/chrome/test/data/extensions/api_test/context_menus/no_perms/manifest.json new file mode 100644 index 0000000..20aaeb8 --- /dev/null +++ b/chrome/test/data/extensions/api_test/context_menus/no_perms/manifest.json @@ -0,0 +1,7 @@ +{ + "name": "chrome.contextMenus", + "version": "0.1", + "description": "Tests that the contextMenus permission is required to use the context menus api.", + "background_page": "test.html", + "permissions": ["tabs"] +} diff --git a/chrome/test/data/extensions/api_test/context_menus/no_perms/test.html b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.html new file mode 100644 index 0000000..46f4d74 --- /dev/null +++ b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.html @@ -0,0 +1 @@ +<script src="test.js"></script> diff --git a/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js new file mode 100644 index 0000000..ca9a60e --- /dev/null +++ b/chrome/test/data/extensions/api_test/context_menus/no_perms/test.js @@ -0,0 +1,21 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +var tests = [ + function simple() { + try { + chrome.contextMenus.create({"title":"1"}, function() { + }); + } catch (e) { + chrome.test.assertTrue(e.message.indexOf( + "You do not have permission to use 'contextMenus.create'") == 0); + chrome.test.succeed(); + return; + } + + chrome.test.fail("Should have gotten access error."); + } +]; + +chrome.test.runTests(tests); diff --git a/chrome/test/data/extensions/context_menus/manifest.json b/chrome/test/data/extensions/context_menus/manifest.json index 5efbbfe..fb2bf65 100644 --- a/chrome/test/data/extensions/context_menus/manifest.json +++ b/chrome/test/data/extensions/context_menus/manifest.json @@ -1,6 +1,6 @@ { "name" : "Context Menus Test Extension", "version" : "0.1", - "permissions": [ "experimental", "tabs" ], + "permissions": [ "contextMenus", "tabs" ], "background_page": "background.html" } diff --git a/chrome/test/data/extensions/context_menus/test.js b/chrome/test/data/extensions/context_menus/test.js index 778b42c..8389ad0 100644 --- a/chrome/test/data/extensions/context_menus/test.js +++ b/chrome/test/data/extensions/context_menus/test.js @@ -25,8 +25,8 @@ function onclick(info) { } window.onload = function() { - chrome.experimental.contextMenus.create({"title":"Extension Item 1", - "onclick": onclick}, function() { + chrome.contextMenus.create({"title":"Extension Item 1", + "onclick": onclick}, function() { if (!chrome.extension.lastError) { navigateCurrentTab(chrome.extension.getURL("test.html")); } |