OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_PROCESS_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // These are called when the extension transitions between idle and active. | 183 // These are called when the extension transitions between idle and active. |
184 // They control the process of closing the background page when idle. | 184 // They control the process of closing the background page when idle. |
185 void OnLazyBackgroundPageIdle(const std::string& extension_id, | 185 void OnLazyBackgroundPageIdle(const std::string& extension_id, |
186 int sequence_id); | 186 int sequence_id); |
187 void OnLazyBackgroundPageActive(const std::string& extension_id); | 187 void OnLazyBackgroundPageActive(const std::string& extension_id); |
188 void CloseLazyBackgroundPageNow(const std::string& extension_id, | 188 void CloseLazyBackgroundPageNow(const std::string& extension_id, |
189 int sequence_id); | 189 int sequence_id); |
190 | 190 |
191 // Potentially registers a RenderViewHost, if it is associated with an | 191 // Potentially registers a RenderViewHost, if it is associated with an |
192 // extension. Does nothing if this is not an extension renderer. | 192 // extension. Does nothing if this is not an extension renderer. |
193 void RegisterRenderViewHost(content::RenderViewHost* render_view_host); | 193 // Returns true, if render_view_host was registered (it is associated |
| 194 // with an extension). |
| 195 bool RegisterRenderViewHost(content::RenderViewHost* render_view_host); |
194 | 196 |
195 // Unregister RenderViewHosts and clear background page data for an extension | 197 // Unregister RenderViewHosts and clear background page data for an extension |
196 // which has been unloaded. | 198 // which has been unloaded. |
197 void UnregisterExtension(const std::string& extension_id); | 199 void UnregisterExtension(const std::string& extension_id); |
198 | 200 |
199 // Clears background page data for this extension. | 201 // Clears background page data for this extension. |
200 void ClearBackgroundPageData(const std::string& extension_id); | 202 void ClearBackgroundPageData(const std::string& extension_id); |
201 | 203 |
202 // Returns true if loading background pages should be deferred. | 204 // Returns true if loading background pages should be deferred. |
203 bool DeferLoadingBackgroundHosts() const; | 205 bool DeferLoadingBackgroundHosts() const; |
(...skipping 24 matching lines...) Expand all Loading... |
228 ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_; | 230 ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_; |
229 | 231 |
230 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; | 232 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; |
231 | 233 |
232 DISALLOW_COPY_AND_ASSIGN(ProcessManager); | 234 DISALLOW_COPY_AND_ASSIGN(ProcessManager); |
233 }; | 235 }; |
234 | 236 |
235 } // namespace extensions | 237 } // namespace extensions |
236 | 238 |
237 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 239 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
OLD | NEW |