OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void OnLazyBackgroundPageIdle(const std::string& extension_id, | 192 void OnLazyBackgroundPageIdle(const std::string& extension_id, |
193 int sequence_id); | 193 int sequence_id); |
194 void OnLazyBackgroundPageActive(const std::string& extension_id); | 194 void OnLazyBackgroundPageActive(const std::string& extension_id); |
195 void CloseLazyBackgroundPageNow(const std::string& extension_id, | 195 void CloseLazyBackgroundPageNow(const std::string& extension_id, |
196 int sequence_id); | 196 int sequence_id); |
197 | 197 |
198 // Potentially registers a RenderViewHost, if it is associated with an | 198 // Potentially registers a RenderViewHost, if it is associated with an |
199 // extension. Does nothing if this is not an extension renderer. | 199 // extension. Does nothing if this is not an extension renderer. |
200 void RegisterRenderViewHost(content::RenderViewHost* render_view_host); | 200 void RegisterRenderViewHost(content::RenderViewHost* render_view_host); |
201 | 201 |
| 202 // Unregister RenderViewHosts and clear background page data for an extension |
| 203 // which has been unloaded. |
| 204 void UnregisterExtension(const std::string& extension_id); |
| 205 |
202 // Clears background page data for this extension. | 206 // Clears background page data for this extension. |
203 void ClearBackgroundPageData(const std::string& extension_id); | 207 void ClearBackgroundPageData(const std::string& extension_id); |
204 | 208 |
205 // Returns true if loading background pages should be deferred. This is | 209 // Returns true if loading background pages should be deferred. This is |
206 // true if there are no browser windows open and the browser process was | 210 // true if there are no browser windows open and the browser process was |
207 // started to show the app launcher, or if DeferBackgroundHostCreation was | 211 // started to show the app launcher, or if DeferBackgroundHostCreation was |
208 // called with true, or if the profile is not yet valid. | 212 // called with true, or if the profile is not yet valid. |
209 bool DeferLoadingBackgroundHosts() const; | 213 bool DeferLoadingBackgroundHosts() const; |
210 | 214 |
211 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached); | 215 void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached); |
(...skipping 17 matching lines...) Expand all Loading... |
229 bool defer_background_host_creation_; | 233 bool defer_background_host_creation_; |
230 | 234 |
231 base::WeakPtrFactory<ExtensionProcessManager> weak_ptr_factory_; | 235 base::WeakPtrFactory<ExtensionProcessManager> weak_ptr_factory_; |
232 | 236 |
233 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; | 237 base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_; |
234 | 238 |
235 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); | 239 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); |
236 }; | 240 }; |
237 | 241 |
238 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 242 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
OLD | NEW |