Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: chrome/renderer/extensions/chrome_v8_context.cc

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make test extension ID tests pass Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/chrome_v8_context.cc
diff --git a/chrome/renderer/extensions/chrome_v8_context.cc b/chrome/renderer/extensions/chrome_v8_context.cc
index 7db10eddf431dab9d0ae22a7e14400c7a93cda84..6d59a19c5189f0f14ab27e99586abf66fb9452da 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),
« no previous file with comments | « chrome/renderer/extensions/chrome_v8_context.h ('k') | chrome/renderer/extensions/chrome_v8_context_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698