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

Unified Diff: chrome/browser/extensions/script_executor.h

Issue 226663003: Allow content script insertion on about:-URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use url of parent(s) instead of origin, more tests 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/browser/extensions/script_executor.h
diff --git a/chrome/browser/extensions/script_executor.h b/chrome/browser/extensions/script_executor.h
index 03c1f550c30a5161c56c33a54740f6c3dbd193fb..fd56bc7c7631abbfb95d534a7a1450ed19e3b7f9 100644
--- a/chrome/browser/extensions/script_executor.h
+++ b/chrome/browser/extensions/script_executor.h
@@ -49,6 +49,13 @@ class ScriptExecutor {
ALL_FRAMES,
};
+ // Whether to insert the script in about: frames when its origin matches
+ // the extension's host permissions.
+ enum MatchAboutBlank {
+ DONT_MATCH_ABOUT_BLANK,
+ MATCH_ABOUT_BLANK,
+ };
+
// The type of world to inject into (main world, or its own isolated world).
enum WorldType {
MAIN_WORLD,
@@ -83,6 +90,7 @@ class ScriptExecutor {
ScriptType script_type,
const std::string& code,
FrameScope frame_scope,
+ MatchAboutBlank match_about_blank,
UserScript::RunLocation run_at,
WorldType world_type,
ProcessType process_type,

Powered by Google App Engine
This is Rietveld 408576698