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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 private: | 54 private: |
55 // A RenderViewObserver implementation which watches the various render views | 55 // A RenderViewObserver implementation which watches the various render views |
56 // in order to notify the ScriptInjectionManager of different document load | 56 // in order to notify the ScriptInjectionManager of different document load |
57 // states. | 57 // states. |
58 class RVOHelper; | 58 class RVOHelper; |
59 | 59 |
60 typedef std::map<blink::WebFrame*, UserScript::RunLocation> FrameStatusMap; | 60 typedef std::map<blink::WebFrame*, UserScript::RunLocation> FrameStatusMap; |
61 | 61 |
62 // UserScriptSetManager::Observer implementation. | 62 // UserScriptSetManager::Observer implementation. |
63 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, | 63 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, |
64 const std::vector<UserScript*>& scripts) override; | 64 const std::vector<UserScript*>& scripts) override; |
65 | 65 |
66 // Notifies that an RVOHelper should be removed. | 66 // Notifies that an RVOHelper should be removed. |
67 void RemoveObserver(RVOHelper* helper); | 67 void RemoveObserver(RVOHelper* helper); |
68 | 68 |
69 // Invalidate any pending tasks associated with |frame|. | 69 // Invalidate any pending tasks associated with |frame|. |
70 void InvalidateForFrame(blink::WebFrame* frame); | 70 void InvalidateForFrame(blink::WebFrame* frame); |
71 | 71 |
72 // Starts the process to inject appropriate scripts into |frame|. | 72 // Starts the process to inject appropriate scripts into |frame|. |
73 void StartInjectScripts(blink::WebFrame* frame, | 73 void StartInjectScripts(blink::WebFrame* frame, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 119 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
120 user_script_set_manager_observer_; | 120 user_script_set_manager_observer_; |
121 | 121 |
122 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 122 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
123 }; | 123 }; |
124 | 124 |
125 } // namespace extensions | 125 } // namespace extensions |
126 | 126 |
127 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 127 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
OLD | NEW |