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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 private: | 48 private: |
49 // A RenderViewObserver implementation which watches the various render views | 49 // A RenderViewObserver implementation which watches the various render views |
50 // in order to notify the ScriptInjectionManager of different document load | 50 // in order to notify the ScriptInjectionManager of different document load |
51 // states. | 51 // states. |
52 class RVOHelper; | 52 class RVOHelper; |
53 | 53 |
54 typedef std::map<blink::WebFrame*, UserScript::RunLocation> FrameStatusMap; | 54 typedef std::map<blink::WebFrame*, UserScript::RunLocation> FrameStatusMap; |
55 | 55 |
56 // UserScriptSetManager::Observer implementation. | 56 // UserScriptSetManager::Observer implementation. |
57 virtual void OnUserScriptsUpdated( | 57 void OnUserScriptsUpdated(const std::set<std::string>& changed_extensions, |
58 const std::set<std::string>& changed_extensions, | 58 const std::vector<UserScript*>& scripts) override; |
59 const std::vector<UserScript*>& scripts) override; | |
60 | 59 |
61 // Notifies that an RVOHelper should be removed. | 60 // Notifies that an RVOHelper should be removed. |
62 void RemoveObserver(RVOHelper* helper); | 61 void RemoveObserver(RVOHelper* helper); |
63 | 62 |
64 // Invalidate any pending tasks associated with |frame|. | 63 // Invalidate any pending tasks associated with |frame|. |
65 void InvalidateForFrame(blink::WebFrame* frame); | 64 void InvalidateForFrame(blink::WebFrame* frame); |
66 | 65 |
67 // Inject appropriate scripts into |frame|. | 66 // Inject appropriate scripts into |frame|. |
68 void InjectScripts(blink::WebFrame* frame, | 67 void InjectScripts(blink::WebFrame* frame, |
69 UserScript::RunLocation run_location); | 68 UserScript::RunLocation run_location); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 100 |
102 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 101 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
103 user_script_set_manager_observer_; | 102 user_script_set_manager_observer_; |
104 | 103 |
105 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 104 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
106 }; | 105 }; |
107 | 106 |
108 } // namespace extensions | 107 } // namespace extensions |
109 | 108 |
110 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 109 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
OLD | NEW |