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

Unified Diff: extensions/renderer/user_script_injector.h

Issue 492133002: Renderer changes for wiring up shared memory with declarative injection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: extensions/renderer/user_script_injector.h
diff --git a/extensions/renderer/user_script_injector.h b/extensions/renderer/user_script_injector.h
index c214f60851e864b54f3959815cf910e9783133df..4ba1afcaa4b2ff3ec841fcf6b69e5c44057c26f0 100644
--- a/extensions/renderer/user_script_injector.h
+++ b/extensions/renderer/user_script_injector.h
@@ -25,9 +25,13 @@ class UserScriptInjector : public ScriptInjector,
public UserScriptSet::Observer {
public:
UserScriptInjector(const UserScript* user_script,
- UserScriptSet* user_script_set);
+ UserScriptSet* user_script_set,
+ bool is_declarative);
virtual ~UserScriptInjector();
+ // ScriptInjector implementation.
+ virtual bool is_declarative() const OVERRIDE;
Devlin 2014/08/21 17:06:17 why?
Mark Dittmer 2014/08/23 12:21:39 ditto (comment in programmatic_script_injector.h)
+
private:
// UserScriptSet::Observer implementation.
virtual void OnUserScriptsUpdated(
@@ -71,6 +75,10 @@ class UserScriptInjector : public ScriptInjector,
// The associated extension id, preserved for the same reason as |script_id|.
std::string extension_id_;
+ // Indicates whether or not this script is declarative. This influences which
+ // script permissions are checked before injection.
+ bool is_declarative_;
+
ScopedObserver<UserScriptSet, UserScriptSet::Observer>
user_script_set_observer_;

Powered by Google App Engine
This is Rietveld 408576698