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

Unified Diff: extensions/renderer/script_injection.h

Issue 906493004: Refactoring: de-couple Extensions from "script injection System" [render side]:2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_1
Patch Set: Devlin's comments and rebase. Created 5 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
« no previous file with comments | « extensions/renderer/extension_injection_host.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_injection.h
diff --git a/extensions/renderer/script_injection.h b/extensions/renderer/script_injection.h
index a8835457d95312b220ded68cba089261eb05e745..53d612337b19b8c426267ab9dfffa3f901beb294 100644
--- a/extensions/renderer/script_injection.h
+++ b/extensions/renderer/script_injection.h
@@ -30,11 +30,13 @@ class ScriptInjection {
// Remove the isolated world associated with the given injection host.
static void RemoveIsolatedWorld(const std::string& host_id);
- ScriptInjection(scoped_ptr<ScriptInjector> injector,
- blink::WebLocalFrame* web_frame,
- const HostID& host_id,
- UserScript::RunLocation run_location,
- int tab_id);
+ ScriptInjection(
+ scoped_ptr<ScriptInjector> injector,
+ blink::WebLocalFrame* web_frame,
+ const HostID& host_id,
+ UserScript::ConsumerInstanceType consumer_instance_type,
+ UserScript::RunLocation run_location,
+ int tab_id);
~ScriptInjection();
// Try to inject the script at the |current_location|. This returns true if
@@ -86,6 +88,9 @@ class ScriptInjection {
// The id of the associated injection_host.
HostID host_id_;
+ // The type of the instance on which the host will inject the script.
+ UserScript::ConsumerInstanceType consumer_instance_type_;
+
Devlin 2015/02/25 17:14:38 When is this used?
Xi Han 2015/02/27 19:36:19 The get function consumer_instance_type() is used
Devlin 2015/02/27 21:52:42 Doesn't that check UserScript::consumer_instance_t
Xi Han 2015/02/27 22:10:02 Oh, you are absolutely right. I took it as the one
// The location in the document load at which we inject the script.
UserScript::RunLocation run_location_;
« no previous file with comments | « extensions/renderer/extension_injection_host.cc ('k') | extensions/renderer/script_injection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698