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

Unified Diff: extensions/renderer/script_injection.h

Issue 2134613002: Stop injection when injections are invalidated Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expand scope of ScriptInjectionWatchers Created 4 years, 5 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/script_injection.h
diff --git a/extensions/renderer/script_injection.h b/extensions/renderer/script_injection.h
index 7b501f40e1da0bd0240760647cfd708a6616071c..af71f7a87f07ece84a2db7255fc0c2fa869c895a 100644
--- a/extensions/renderer/script_injection.h
+++ b/extensions/renderer/script_injection.h
@@ -41,6 +41,7 @@ class ScriptInjection {
enum InjectionResult {
INJECTION_FINISHED,
INJECTION_BLOCKED,
+ INJECTION_CANCELED,
INJECTION_WAITING
};
@@ -95,6 +96,8 @@ class ScriptInjection {
// Injects the script. Returns INJECTION_FINISHED if injection has finished,
// otherwise INJECTION_BLOCKED.
+ // The caller must not destruct this ScriptInjection instance during the call.
+ // Similarly, this instance must not delete itself during the call.
InjectionResult Inject(ScriptsRunInfo* scripts_run_info);
// Inject any JS scripts into the frame for the injection.
« no previous file with comments | « no previous file | extensions/renderer/script_injection.cc » ('j') | extensions/renderer/script_injection_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698