diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 22:22:55 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 22:22:55 +0000 |
commit | 1307901f3bb5ab694530551f05e3898596acd854 (patch) | |
tree | 8a47789504223edce1995ee19afba3dcb7426f93 /chrome/chrome.gyp | |
parent | 95ff808aa05c3de690fed32e92a940a6877cd3ed (diff) | |
download | chromium_src-1307901f3bb5ab694530551f05e3898596acd854.zip chromium_src-1307901f3bb5ab694530551f05e3898596acd854.tar.gz chromium_src-1307901f3bb5ab694530551f05e3898596acd854.tar.bz2 |
Add stub functions for chrome.* APIs in content scripts.
Most of the extensions API is not supported in content scripts for security
purposes. Instead the typical pattern is to use messaging between content
scripts and a background page which executes them on behalf of the script.
This is not immediately obvious to many extension developers, so this
change adds an error message to help them better understand what's going on.
BUG=26128
TEST=Try writing a content script that uses some of the extensions API stuff
in chrome.tabs, chrome.windows, etc. You should see errors in the console
telling you that it isn't supported in content scripts.
Review URL: http://codereview.chromium.org/366024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31958 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome.gyp')
-rwxr-xr-x | chrome/chrome.gyp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 5cc7e42..f0b31a0 100755 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -75,6 +75,7 @@ 'browser/extensions/extension_toolstrip_apitest.cc', 'browser/extensions/isolated_world_apitest.cc', 'browser/extensions/page_action_apitest.cc', + 'browser/extensions/stubs_apitest.cc', 'browser/gtk/bookmark_manager_browsertest.cc', 'browser/net/ftp_browsertest.cc', 'browser/privacy_blacklist/blacklist_manager_browsertest.cc', @@ -122,6 +123,7 @@ 'browser/extensions/extension_toolstrip_apitest.cc', 'browser/extensions/isolated_world_apitest.cc', 'browser/extensions/page_action_apitest.cc', + 'browser/extensions/stubs_apitest.cc', 'browser/privacy_blacklist/blacklist_manager_browsertest.cc', 'browser/ssl/ssl_browser_tests.cc', ], |