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

Unified Diff: extensions/renderer/script_injection_manager.h

Issue 878513005: Extensions: suspend extension's scripts when V8 is paused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ActivityLogPrerenderTest.TestScriptInjected 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
Index: extensions/renderer/script_injection_manager.h
diff --git a/extensions/renderer/script_injection_manager.h b/extensions/renderer/script_injection_manager.h
index 8ec3d94ed142896f08fbe6f4f3d8c33f05f5e08b..73fb2a8458515088bbd2ab98109566b5704108e8 100644
--- a/extensions/renderer/script_injection_manager.h
+++ b/extensions/renderer/script_injection_manager.h
@@ -45,6 +45,10 @@ class ScriptInjectionManager : public UserScriptSetManager::Observer {
// Notifies that a new render view has been created.
void OnRenderViewCreated(content::RenderView* render_view);
+ // Notifies that an injection has been finished
+ void OnInjectionFinished(ScriptInjection* injection,
+ scoped_refptr<ScriptsRunInfo> scripts_run_info);
+
private:
// A RenderViewObserver implementation which watches the various render views
// in order to notify the ScriptInjectionManager of different document load
@@ -98,13 +102,6 @@ class ScriptInjectionManager : public UserScriptSetManager::Observer {
// The collection of RVOHelpers.
ScopedVector<RVOHelper> rvo_helpers_;
- // True when the manager is actively injecting scripts into a web frame.
- bool injecting_scripts_;
-
- // The set of extensions that have been updated (and thus any injections have
- // been invalidated) while the manager was |injecting_scripts_|.
- std::set<std::string> invalidated_while_injecting_;
-
// The set of UserScripts associated with extensions. Owned by the Dispatcher.
UserScriptSetManager* user_script_set_manager_;
@@ -112,6 +109,9 @@ class ScriptInjectionManager : public UserScriptSetManager::Observer {
// user consent.
ScopedVector<ScriptInjection> pending_injections_;
+ // Running injections which are waiting for async callbacks from blink
+ ScopedVector<ScriptInjection> running_injections_;
+
ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer>
user_script_set_manager_observer_;

Powered by Google App Engine
This is Rietveld 408576698