Index: extensions/browser/process_manager.h |
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h |
index 669ebe78557e4bfb6d71e252a367e54179ad2977..9e4b07c392428f2604433b62347dcfb2f7df4b7b 100644 |
--- a/extensions/browser/process_manager.h |
+++ b/extensions/browser/process_manager.h |
@@ -92,6 +92,11 @@ class ProcessManager : public content::NotificationObserver { |
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. |
+ int DecrementLazyKeepaliveCount(std::string extension_id); |
tapted
2013/11/28 03:03:37
nit: const std::string& extension_id - seems more
scheib
2013/12/02 21:22:38
Done.
|
+ |
+ // 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, |