| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 virtual void OnUserScriptsUpdated( |
| 58 const std::set<std::string>& changed_extensions, | 58 const std::set<std::string>& changed_extensions, |
| 59 const std::vector<UserScript*>& scripts) OVERRIDE; | 59 const std::vector<UserScript*>& scripts) override; |
| 60 | 60 |
| 61 // Notifies that an RVOHelper should be removed. | 61 // Notifies that an RVOHelper should be removed. |
| 62 void RemoveObserver(RVOHelper* helper); | 62 void RemoveObserver(RVOHelper* helper); |
| 63 | 63 |
| 64 // Invalidate any pending tasks associated with |frame|. | 64 // Invalidate any pending tasks associated with |frame|. |
| 65 void InvalidateForFrame(blink::WebFrame* frame); | 65 void InvalidateForFrame(blink::WebFrame* frame); |
| 66 | 66 |
| 67 // Inject appropriate scripts into |frame|. | 67 // Inject appropriate scripts into |frame|. |
| 68 void InjectScripts(blink::WebFrame* frame, | 68 void InjectScripts(blink::WebFrame* frame, |
| 69 UserScript::RunLocation run_location); | 69 UserScript::RunLocation run_location); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 102 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
| 103 user_script_set_manager_observer_; | 103 user_script_set_manager_observer_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 105 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace extensions | 108 } // namespace extensions |
| 109 | 109 |
| 110 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 110 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
| OLD | NEW |