summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/extensions/chrome_v8_context.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 07:51:29 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 07:51:29 +0000
commitc7f74e7ca7e2b2428fb7434b0ef0b7a9b4bfbff8 (patch)
treed69b0da7ab33542edaae9788d8e7d07ca13c98b6 /chrome/renderer/extensions/chrome_v8_context.cc
parent9b83ab913c7a8574d5b50b9113df93cc1fcb7083 (diff)
downloadchromium_src-c7f74e7ca7e2b2428fb7434b0ef0b7a9b4bfbff8.zip
chromium_src-c7f74e7ca7e2b2428fb7434b0ef0b7a9b4bfbff8.tar.gz
chromium_src-c7f74e7ca7e2b2428fb7434b0ef0b7a9b4bfbff8.tar.bz2
Revert 125811 - 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 Review URL: http://codereview.chromium.org/9460002 TBR=kalman@chromium.org Review URL: https://chromiumcodereview.appspot.com/9653022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125813 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/extensions/chrome_v8_context.cc')
-rw-r--r--chrome/renderer/extensions/chrome_v8_context.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/renderer/extensions/chrome_v8_context.cc b/chrome/renderer/extensions/chrome_v8_context.cc
index 6d59a19..7db10ed 100644
--- a/chrome/renderer/extensions/chrome_v8_context.cc
+++ b/chrome/renderer/extensions/chrome_v8_context.cc
@@ -15,8 +15,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "v8/include/v8.h"
-using extensions::Feature;
-
namespace {
const char kChromeHidden[] = "chromeHidden";
@@ -26,13 +24,11 @@ const char kValidateCallbacks[] = "validateCallbacks";
const char kValidateAPI[] = "validateAPI";
#endif
-std::string GetContextTypeDescription(Feature::Context context_type) {
+std::string GetContextTypeDescription(
+ ChromeV8Context::ContextType context_type) {
switch (context_type) {
- 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";
+ case ChromeV8Context::OTHER: return "other";
+ case ChromeV8Context::CONTENT_SCRIPT: return "content script";
}
NOTREACHED();
return "";
@@ -43,7 +39,7 @@ std::string GetContextTypeDescription(Feature::Context context_type) {
ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context,
WebKit::WebFrame* web_frame,
const std::string& extension_id,
- Feature::Context context_type)
+ ChromeV8Context::ContextType context_type)
: v8_context_(v8::Persistent<v8::Context>::New(v8_context)),
web_frame_(web_frame),
extension_id_(extension_id),