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> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
18 #include "extensions/common/user_script.h" | 18 #include "extensions/common/user_script.h" |
19 #include "extensions/renderer/script_injection.h" | 19 #include "extensions/renderer/script_injection.h" |
20 #include "extensions/renderer/user_script_set_manager.h" | 20 #include "extensions/renderer/user_script_set_manager.h" |
21 | 21 |
22 struct ExtensionMsg_ExecuteCode_Params; | 22 struct ExtensionMsg_ExecuteCode_Params; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 class RenderFrame; | 25 class RenderFrame; |
26 } | 26 } |
27 | 27 |
28 namespace extensions { | 28 namespace extensions { |
29 class Extension; | |
30 | 29 |
31 // The ScriptInjectionManager manages extensions injecting scripts into frames | 30 // The ScriptInjectionManager manages extensions injecting scripts into frames |
32 // via both content/user scripts and tabs.executeScript(). It is responsible for | 31 // via both content/user scripts and tabs.executeScript(). It is responsible for |
33 // maintaining any pending injections awaiting permission or the appropriate | 32 // maintaining any pending injections awaiting permission or the appropriate |
34 // load point, and injecting them when ready. | 33 // load point, and injecting them when ready. |
35 class ScriptInjectionManager : public UserScriptSetManager::Observer { | 34 class ScriptInjectionManager : public UserScriptSetManager::Observer { |
36 public: | 35 public: |
37 explicit ScriptInjectionManager( | 36 explicit ScriptInjectionManager( |
38 UserScriptSetManager* user_script_set_manager); | 37 UserScriptSetManager* user_script_set_manager); |
39 virtual ~ScriptInjectionManager(); | 38 virtual ~ScriptInjectionManager(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 122 |
124 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 123 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
125 user_script_set_manager_observer_; | 124 user_script_set_manager_observer_; |
126 | 125 |
127 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 126 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
128 }; | 127 }; |
129 | 128 |
130 } // namespace extensions | 129 } // namespace extensions |
131 | 130 |
132 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 131 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
OLD | NEW |