Index: extensions/browser/process_manager.h |
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h |
index 669ebe78557e4bfb6d71e252a367e54179ad2977..379c3648d527cd2e14e199abe4c12de960dea0ff 100644 |
--- a/extensions/browser/process_manager.h |
+++ b/extensions/browser/process_manager.h |
@@ -86,12 +86,17 @@ class ProcessManager : public content::NotificationObserver { |
// When this reaches 0, we will begin the process of shutting down the page. |
// "Things" include pending events, resource loads, and API calls. |
int GetLazyKeepaliveCount(const Extension* extension); |
- int IncrementLazyKeepaliveCount(const Extension* extension); |
- int DecrementLazyKeepaliveCount(const Extension* extension); |
+ void IncrementLazyKeepaliveCount(const Extension* extension); |
+ void DecrementLazyKeepaliveCount(const Extension* extension); |
void IncrementLazyKeepaliveCountForView( |
content::RenderViewHost* render_view_host); |
+ // Keeps a background page alive. Unlike IncrementLazyKeepaliveCount, these |
+ // impulses will only keep the page alive for a limited amount of time unless |
+ // called regularly. |
+ void KeepaliveImpulse(const Extension* extension); |
+ |
// Handles a response to the ShouldSuspend message, used for lazy background |
// pages. |
void OnShouldSuspendAck(const std::string& extension_id, int sequence_id); |
@@ -164,6 +169,13 @@ class ProcessManager : public content::NotificationObserver { |
// Close the given |host| iff it's a background page. |
void CloseBackgroundHost(ExtensionHost* host); |
+ // Internal implementation of DecrementLazyKeepaliveCount with an |
+ // |extension_id| known to have a lazy background page. |
+ void DecrementLazyKeepaliveCount(const std::string& extension_id); |
+ |
+ // Checks if keepalive impulses have occured, and adjusts keep alive count. |
+ void OnKeepaliveImpulseCheck(); |
+ |
// These are called when the extension transitions between idle and active. |
// They control the process of closing the background page when idle. |
void OnLazyBackgroundPageIdle(const std::string& extension_id, |