diff options
author | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-18 02:05:25 +0000 |
---|---|---|
committer | kalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-18 02:05:25 +0000 |
commit | 8774f4b65b6a970dd98e5000888b0c83358f4229 (patch) | |
tree | e139fb9d0b4724ff92968f55ffc2ebed50ecd5a8 /chrome/renderer/extensions/chrome_v8_context.cc | |
parent | 14acb5764b5a947975d7b7905a1ecdde2b91abad (diff) | |
download | chromium_src-8774f4b65b6a970dd98e5000888b0c83358f4229.zip chromium_src-8774f4b65b6a970dd98e5000888b0c83358f4229.tar.gz chromium_src-8774f4b65b6a970dd98e5000888b0c83358f4229.tar.bz2 |
Convert app_bindings.js to the schema_generated_bindings.js infrastructure.
This involves opening up *all* custom bindings to web pages, where access is
controlled content-script style using a URL-matches property in the API schema.
BUG=104100,117282
TEST=unit_tests,browser_tests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=125811
Review URL: http://codereview.chromium.org/9460002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/chrome_v8_context.cc')
-rw-r--r-- | chrome/renderer/extensions/chrome_v8_context.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chrome/renderer/extensions/chrome_v8_context.cc b/chrome/renderer/extensions/chrome_v8_context.cc index 7db10ed..6d59a19 100644 --- a/chrome/renderer/extensions/chrome_v8_context.cc +++ b/chrome/renderer/extensions/chrome_v8_context.cc @@ -15,6 +15,8 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "v8/include/v8.h" +using extensions::Feature; + namespace { const char kChromeHidden[] = "chromeHidden"; @@ -24,11 +26,13 @@ const char kValidateCallbacks[] = "validateCallbacks"; const char kValidateAPI[] = "validateAPI"; #endif -std::string GetContextTypeDescription( - ChromeV8Context::ContextType context_type) { +std::string GetContextTypeDescription(Feature::Context context_type) { switch (context_type) { - case ChromeV8Context::OTHER: return "other"; - case ChromeV8Context::CONTENT_SCRIPT: return "content script"; + case Feature::UNSPECIFIED_CONTEXT: return "unspecified"; + case Feature::PRIVILEGED_CONTEXT: return "privileged"; + case Feature::UNPRIVILEGED_CONTEXT: return "unprivileged"; + case Feature::CONTENT_SCRIPT_CONTEXT: return "content script"; + case Feature::WEB_PAGE_CONTEXT: return "web page"; } NOTREACHED(); return ""; @@ -39,7 +43,7 @@ std::string GetContextTypeDescription( ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context, WebKit::WebFrame* web_frame, const std::string& extension_id, - ChromeV8Context::ContextType context_type) + Feature::Context context_type) : v8_context_(v8::Persistent<v8::Context>::New(v8_context)), web_frame_(web_frame), extension_id_(extension_id), |