| 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> |
| 9 |
| 8 #include <map> | 10 #include <map> |
| 9 #include <set> | 11 #include <set> |
| 10 #include <string> | 12 #include <string> |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 13 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/macros.h" |
| 14 #include "base/scoped_observer.h" | 17 #include "base/scoped_observer.h" |
| 15 #include "extensions/common/user_script.h" | 18 #include "extensions/common/user_script.h" |
| 16 #include "extensions/renderer/script_injection.h" | 19 #include "extensions/renderer/script_injection.h" |
| 17 #include "extensions/renderer/user_script_set_manager.h" | 20 #include "extensions/renderer/user_script_set_manager.h" |
| 18 | 21 |
| 19 struct ExtensionMsg_ExecuteCode_Params; | 22 struct ExtensionMsg_ExecuteCode_Params; |
| 20 | 23 |
| 21 namespace content { | 24 namespace content { |
| 22 class RenderFrame; | 25 class RenderFrame; |
| 23 } | 26 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 content::RenderFrame* render_frame); | 86 content::RenderFrame* render_frame); |
| 84 | 87 |
| 85 // Handle the ExecuteDeclarativeScript extension message. | 88 // Handle the ExecuteDeclarativeScript extension message. |
| 86 void HandleExecuteDeclarativeScript(content::RenderFrame* web_frame, | 89 void HandleExecuteDeclarativeScript(content::RenderFrame* web_frame, |
| 87 int tab_id, | 90 int tab_id, |
| 88 const ExtensionId& extension_id, | 91 const ExtensionId& extension_id, |
| 89 int script_id, | 92 int script_id, |
| 90 const GURL& url); | 93 const GURL& url); |
| 91 | 94 |
| 92 // Handle the GrantInjectionPermission extension message. | 95 // Handle the GrantInjectionPermission extension message. |
| 93 void HandlePermitScriptInjection(int64 request_id); | 96 void HandlePermitScriptInjection(int64_t request_id); |
| 94 | 97 |
| 95 // The map of active web frames to their corresponding statuses. The | 98 // The map of active web frames to their corresponding statuses. The |
| 96 // RunLocation of the frame corresponds to the last location that has ran. | 99 // RunLocation of the frame corresponds to the last location that has ran. |
| 97 FrameStatusMap frame_statuses_; | 100 FrameStatusMap frame_statuses_; |
| 98 | 101 |
| 99 // The frames currently being injected into, so long as that frame is valid. | 102 // The frames currently being injected into, so long as that frame is valid. |
| 100 std::set<content::RenderFrame*> active_injection_frames_; | 103 std::set<content::RenderFrame*> active_injection_frames_; |
| 101 | 104 |
| 102 // The collection of RFOHelpers. | 105 // The collection of RFOHelpers. |
| 103 std::vector<scoped_ptr<RFOHelper>> rfo_helpers_; | 106 std::vector<scoped_ptr<RFOHelper>> rfo_helpers_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 114 | 117 |
| 115 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> | 118 ScopedObserver<UserScriptSetManager, UserScriptSetManager::Observer> |
| 116 user_script_set_manager_observer_; | 119 user_script_set_manager_observer_; |
| 117 | 120 |
| 118 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); | 121 DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager); |
| 119 }; | 122 }; |
| 120 | 123 |
| 121 } // namespace extensions | 124 } // namespace extensions |
| 122 | 125 |
| 123 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ | 126 #endif // EXTENSIONS_RENDERER_SCRIPT_INJECTION_MANAGER_H_ |
| OLD | NEW |