Index: extensions/browser/process_manager.h |
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h |
index de23f1ec0dcf36aaa3aeca6a9d08702d7c476a3f..5eaabf63edcde3dd3c632952a76c93f861ea2886 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*>; |
@@ -85,7 +87,8 @@ class ProcessManager : public KeyedService, |
// 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); |
+ virtual ExtensionHost* GetBackgroundHostForExtension( |
not at google - send to devlin
2015/04/28 21:35:11
Doesn't need to be virtual anymore.
|
+ 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. |
@@ -145,6 +148,11 @@ class ProcessManager : public KeyedService, |
void SetKeepaliveImpulseDecrementCallbackForTesting( |
const ImpulseCallbackForTesting& callback); |
+ // EventPageTracker implementation. |
+ bool IsEventPageSuspended(const std::string& extension_id) override; |
+ bool WakeEventPage(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); |