| Index: extensions/browser/process_manager.h
|
| diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
|
| index e580bbd9335205b8b22ec164c25930d9e9853802..80736e4844b33e7f830a6834b27f6fab0345ef27 100644
|
| --- a/extensions/browser/process_manager.h
|
| +++ b/extensions/browser/process_manager.h
|
| @@ -33,6 +33,7 @@ namespace extensions {
|
|
|
| class Extension;
|
| class ExtensionHost;
|
| +class ProcessManagerDelegate;
|
| class ProcessManagerObserver;
|
|
|
| // Manages dynamic state of running Chromium extensions. There is one instance
|
| @@ -122,8 +123,9 @@ class ProcessManager : public content::NotificationObserver {
|
| // onSuspendCanceled() event to it.
|
| void CancelSuspend(const Extension* extension);
|
|
|
| - // Ensures background hosts are loaded for a new browser window.
|
| - void OnBrowserWindowReady();
|
| + // Creates background hosts if the embedder is ready and they are not already
|
| + // loaded.
|
| + void MaybeCreateStartupBackgroundHosts();
|
|
|
| // Gets the BrowserContext associated with site_instance_ and all other
|
| // related SiteInstances.
|
| @@ -144,6 +146,10 @@ class ProcessManager : public content::NotificationObserver {
|
| content::BrowserContext* original_context,
|
| ProcessManager* original_manager);
|
|
|
| + bool startup_background_hosts_created_for_test() const {
|
| + return startup_background_hosts_created_;
|
| + }
|
| +
|
| protected:
|
| // If |context| is incognito pass the master context as |original_context|.
|
| // Otherwise pass the same context for both.
|
| @@ -158,10 +164,6 @@ class ProcessManager : public content::NotificationObserver {
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| - // Load all background pages once the profile data is ready and the pages
|
| - // should be loaded.
|
| - void CreateBackgroundHostsForProfileStartup();
|
| -
|
| content::NotificationRegistrar registrar_;
|
|
|
| // The set of ExtensionHosts running viewless background extensions.
|
| @@ -182,6 +184,10 @@ class ProcessManager : public content::NotificationObserver {
|
| typedef std::map<content::RenderViewHost*,
|
| extensions::ViewType> ExtensionRenderViews;
|
|
|
| + // Load all background pages once the profile data is ready and the pages
|
| + // should be loaded.
|
| + void CreateStartupBackgroundHosts();
|
| +
|
| // Called just after |host| is created so it can be registered in our lists.
|
| void OnBackgroundHostCreated(ExtensionHost* host);
|
|
|
| @@ -216,9 +222,6 @@ class ProcessManager : public content::NotificationObserver {
|
| // Clears background page data for this extension.
|
| void ClearBackgroundPageData(const std::string& extension_id);
|
|
|
| - // Returns true if loading background pages should be deferred.
|
| - bool DeferLoadingBackgroundHosts() const;
|
| -
|
| void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached);
|
|
|
| // Contains all active extension-related RenderViewHost instances for all
|
|
|