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

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

Issue 16032015: Extensions: pass ChromeV8Context around instead of v8::Handle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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/runtime_custom_bindings.cc
diff --git a/chrome/renderer/extensions/runtime_custom_bindings.cc b/chrome/renderer/extensions/runtime_custom_bindings.cc
index b41f43cc97c0d43a1e324e3dbc1d98bf93e702b9..0f4801fbc6ad3b93bb46297e8c3e7ca2bc92f2c4 100644
--- a/chrome/renderer/extensions/runtime_custom_bindings.cc
+++ b/chrome/renderer/extensions/runtime_custom_bindings.cc
@@ -24,8 +24,7 @@ namespace extensions {
RuntimeCustomBindings::RuntimeCustomBindings(Dispatcher* dispatcher,
ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context->v8_context()),
- context_(context) {
+ : ChromeV8Extension(dispatcher, context) {
RouteFunction("GetManifest",
base::Bind(&RuntimeCustomBindings::GetManifest,
base::Unretained(this)));
@@ -68,7 +67,7 @@ v8::Handle<v8::Value> RuntimeCustomBindings::OpenChannelToNativeApp(
const v8::Arguments& args) {
// Verify that the extension has permission to use native messaging.
if (!dispatcher()->CheckContextAccessToExtensionAPI(
- "nativeMessaging", context_)) {
+ "nativeMessaging", context())) {
return v8::Undefined();
}
@@ -97,11 +96,11 @@ v8::Handle<v8::Value> RuntimeCustomBindings::OpenChannelToNativeApp(
v8::Handle<v8::Value> RuntimeCustomBindings::GetManifest(
const v8::Arguments& args) {
- CHECK(context_->extension());
+ CHECK(context()->extension());
scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create());
- return converter->ToV8Value(context_->extension()->manifest()->value(),
- context_->v8_context());
+ return converter->ToV8Value(context()->extension()->manifest()->value(),
+ context()->v8_context());
}
} // extensions
« no previous file with comments | « chrome/renderer/extensions/runtime_custom_bindings.h ('k') | chrome/renderer/extensions/send_request_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698