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

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

Issue 240603003: Remove ChromeV8Extension & most of ChromeV8Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 8 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 f395051f0511d985ec344c11ba74628020e09992..bc36d78f38a1ff3d073230b55ab954693f795c28 100644
--- a/chrome/renderer/extensions/runtime_custom_bindings.cc
+++ b/chrome/renderer/extensions/runtime_custom_bindings.cc
@@ -8,8 +8,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/renderer/extensions/api_activity_logger.h"
-#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/dispatcher.h"
#include "chrome/renderer/extensions/extension_helper.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/v8_value_converter.h"
@@ -18,6 +16,7 @@
#include "extensions/common/features/feature.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/manifest.h"
+#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebView.h"
@@ -26,9 +25,8 @@ using content::V8ValueConverter;
namespace extensions {
-RuntimeCustomBindings::RuntimeCustomBindings(Dispatcher* dispatcher,
- ChromeV8Context* context)
- : ChromeV8Extension(dispatcher, context) {
+RuntimeCustomBindings::RuntimeCustomBindings(ScriptContext* context)
+ : ObjectBackedNativeHandler(context) {
RouteFunction("GetManifest",
base::Bind(&RuntimeCustomBindings::GetManifest,
base::Unretained(this)));
@@ -49,7 +47,7 @@ void RuntimeCustomBindings::OpenChannelToExtension(
const v8::FunctionCallbackInfo<v8::Value>& args) {
// Get the current RenderView so that we can send a routed IPC message from
// the correct source.
- content::RenderView* renderview = GetRenderView();
+ content::RenderView* renderview = context()->GetRenderView();
if (!renderview)
return;
@@ -81,17 +79,17 @@ void RuntimeCustomBindings::OpenChannelToNativeApp(
const v8::FunctionCallbackInfo<v8::Value>& args) {
// Verify that the extension has permission to use native messaging.
Feature::Availability availability =
- FeatureProvider::GetPermissionFeatures()->
- GetFeature("nativeMessaging")->IsAvailableToContext(
- GetExtensionForRenderView(),
- context()->context_type(),
- context()->GetURL());
+ FeatureProvider::GetPermissionFeatures()
+ ->GetFeature("nativeMessaging")
+ ->IsAvailableToContext(context()->extension(),
+ context()->context_type(),
+ context()->GetURL());
if (!availability.is_available())
return;
// Get the current RenderView so that we can send a routed IPC message from
// the correct source.
- content::RenderView* renderview = GetRenderView();
+ content::RenderView* renderview = context()->GetRenderView();
if (!renderview)
return;

Powered by Google App Engine
This is Rietveld 408576698