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

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: fix koz bool thing Created 8 years, 10 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 eb3ef643f8140818d2456cf6a5f2834bc46e4de6..8d7a89ab5cce0af024358cabe43b0974184101c7 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";
@@ -23,11 +25,13 @@ const char kChromeHidden[] = "chromeHidden";
const char kValidateCallbacks[] = "validateCallbacks";
#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 "";
@@ -38,7 +42,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),

Powered by Google App Engine
This is Rietveld 408576698