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

Unified Diff: extensions/renderer/script_context.h

Issue 831423005: Split out the extensions gin::Runner implementation into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.h
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h
index 862c0b510d2bde9b26e9c0c7b1cfbb82f3e8a0eb..5fd87df9b807c3717829ff089f762cb21349e70d 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -32,7 +32,7 @@ namespace extensions {
class Extension;
// Extensions wrapper for a v8 context.
-class ScriptContext : public RequestSender::Source, public gin::Runner {
+class ScriptContext : public RequestSender::Source {
public:
ScriptContext(const v8::Handle<v8::Context>& context,
blink::WebFrame* frame,
@@ -142,15 +142,6 @@ class ScriptContext : public RequestSender::Source, public gin::Runner {
const base::ListValue& response,
const std::string& error) override;
- // gin::Runner overrides.
- void Run(const std::string& source,
- const std::string& resource_name) override;
- v8::Handle<v8::Value> Call(v8::Handle<v8::Function> function,
- v8::Handle<v8::Value> receiver,
- int argc,
- v8::Handle<v8::Value> argv[]) override;
- gin::ContextHolder* GetContextHolder() override;
-
// Grants a set of content capabilities to this context.
void SetContentCapabilities(const APIPermissionSet& permissions);
@@ -165,6 +156,8 @@ class ScriptContext : public RequestSender::Source, public gin::Runner {
ScopedPersistent<v8::Context> v8_context_;
private:
+ class Runner;
+
// The WebFrame associated with this context. This can be NULL because this
// object can outlive is destroyed asynchronously.
blink::WebFrame* web_frame_;
@@ -197,6 +190,8 @@ class ScriptContext : public RequestSender::Source, public gin::Runner {
GURL url_;
+ scoped_ptr<Runner> runner_;
+
DISALLOW_COPY_AND_ASSIGN(ScriptContext);
};
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698