| Index: extensions/browser/process_manager.h
|
| diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
|
| index de23f1ec0dcf36aaa3aeca6a9d08702d7c476a3f..afabd2e7a380d1cdf33407c0d6e32ef0f6a801f3 100644
|
| --- a/extensions/browser/process_manager.h
|
| +++ b/extensions/browser/process_manager.h
|
| @@ -17,6 +17,7 @@
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| +#include "extensions/browser/event_page_tracker.h"
|
| #include "extensions/browser/extension_registry_observer.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/view_type.h"
|
| @@ -43,7 +44,8 @@ class ProcessManagerObserver;
|
| // track of split-mode extensions only.
|
| class ProcessManager : public KeyedService,
|
| public content::NotificationObserver,
|
| - public ExtensionRegistryObserver {
|
| + public ExtensionRegistryObserver,
|
| + public EventPageTracker {
|
| public:
|
| using ExtensionHostSet = std::set<extensions::ExtensionHost*>;
|
|
|
| @@ -83,10 +85,6 @@ class ProcessManager : public KeyedService,
|
| // loaded.
|
| void MaybeCreateStartupBackgroundHosts();
|
|
|
| - // Gets the ExtensionHost for the background page for an extension, or null if
|
| - // the extension isn't running or doesn't have a background page.
|
| - ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id);
|
| -
|
| // Returns true if the (lazy) background host for the given extension has
|
| // already been sent the unload event and is shutting down.
|
| bool IsBackgroundHostClosing(const std::string& extension_id);
|
| @@ -145,6 +143,12 @@ class ProcessManager : public KeyedService,
|
| void SetKeepaliveImpulseDecrementCallbackForTesting(
|
| const ImpulseCallbackForTesting& callback);
|
|
|
| + // EventPageTracker implementation.
|
| + ExtensionHost* GetBackgroundHostForExtension(
|
| + const std::string& extension_id) override;
|
| + bool WakeExtension(const std::string& extension_id,
|
| + const base::Callback<void(bool)>& callback) override;
|
| +
|
| // Sets the time in milliseconds that an extension event page can
|
| // be idle before it is shut down; must be > 0.
|
| static void SetEventPageIdleTimeForTesting(unsigned idle_time_msec);
|
|
|