| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 5 #ifndef EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
| 6 #define EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 6 #define EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 using FrameStatusMap = | 57 using FrameStatusMap = |
| 58 std::map<content::RenderFrame*, UserScript::RunLocation>; | 58 std::map<content::RenderFrame*, UserScript::RunLocation>; |
| 59 | 59 |
| 60 using ScriptInjectionVector = std::vector<std::unique_ptr<ScriptInjection>>; | 60 using ScriptInjectionVector = std::vector<std::unique_ptr<ScriptInjection>>; |
| 61 | 61 |
| 62 // Notifies that an injection has been finished. | 62 // Notifies that an injection has been finished. |
| 63 void OnInjectionFinished(ScriptInjection* injection); | 63 void OnInjectionFinished(ScriptInjection* injection); |
| 64 | 64 |
| 65 // UserScriptSetManager::Observer implementation. | 65 // UserScriptSetManager::Observer implementation. |
| 66 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, | 66 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) override; |
| 67 const std::vector<UserScript*>& scripts) override; | |
| 68 | 67 |
| 69 // Notifies that an RFOHelper should be removed. | 68 // Notifies that an RFOHelper should be removed. |
| 70 void RemoveObserver(RFOHelper* helper); | 69 void RemoveObserver(RFOHelper* helper); |
| 71 | 70 |
| 72 // Invalidate any pending tasks associated with |frame|. | 71 // Invalidate any pending tasks associated with |frame|. |
| 73 void InvalidateForFrame(content::RenderFrame* frame); | 72 void InvalidateForFrame(content::RenderFrame* frame); |
| 74 | 73 |
| 75 // Starts the process to inject appropriate scripts into |frame|. | 74 // Starts the process to inject appropriate scripts into |frame|. |
| 76 void StartInjectScripts(content::RenderFrame* frame, | 75 void StartInjectScripts(content::RenderFrame* frame, |
| 77 UserScript::RunLocation run_location); | 76 UserScript::RunLocation run_location); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 123 |
| 125 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 124 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
| 126 user_script_set_manager_observer_; | 125 user_script_set_manager_observer_; |
| 127 | 126 |
| 128 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 127 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
| 129 }; | 128 }; |
| 130 | 129 |
| 131 } // namespace extensions | 130 } // namespace extensions |
| 132 | 131 |
| 133 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 132 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
| OLD | NEW |