Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6317)

Unified Diff: chrome/browser/extensions/extension_host.h

Issue 11117011: Keep browser process alive while there are platform apps with background pages running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And another test Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_host.h
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 9c0e247edbde463b6c5c8d13070f2ed54617f4c1..0e5bdbc985c30a8f88b186748a18019dfa8d4c8a 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -129,6 +129,12 @@ class ExtensionHost : public content::WebContentsDelegate,
void WillRunJavaScriptDialog();
void DidCloseJavaScriptDialog();
+ // This is called on hosts which need to keep the browser process alive. This
+ // function will add a browser process keep-alive, if it hasn't already been
+ // added. Hosts which have had this called will remove the keep-alive when
+ // they are destroyed.
+ void SetKeepsBrowserProcessAlive();
+
// content::WebContentsObserver
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual void RenderViewCreated(
@@ -245,6 +251,9 @@ class ExtensionHost : public content::WebContentsDelegate,
// True if the main frame has finished parsing.
bool document_element_available_;
+ // If true, the browser process has had a keep-alive added for this host.
+ bool keeping_browser_process_alive_;
+
// The original URL of the page being hosted.
GURL initial_url_;
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698