summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background_contents_service.h
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 20:52:20 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 20:52:20 +0000
commitc984d9f8b393418f26c8a3a90ceaff17f2d421af (patch)
tree1e6d691629226bee23228b87b435957a01587c82 /chrome/browser/background_contents_service.h
parenta82ac135a3453615f7289b5fbacc512576858639 (diff)
downloadchromium_src-c984d9f8b393418f26c8a3a90ceaff17f2d421af.zip
chromium_src-c984d9f8b393418f26c8a3a90ceaff17f2d421af.tar.gz
chromium_src-c984d9f8b393418f26c8a3a90ceaff17f2d421af.tar.bz2
Moved code that generates APP_TERMINATING notification into BrowserList so it can be used on all platforms. Updated observers (ExtensionProcessManager,
BackgroundContents) to listen for APP_TERMINATING instead of listening for BROWSER_CLOSED on some platforms. APP_TERMINATING is now sent just before the main message loop exits rather than just after, but no code depends on this timing. Updated Mac code to always call BrowserList::CloseAllBrowsers() even if there are no open browsers, to ensure that APP_TERMINATING is always fired. Changed BackgroundContentsService to keep the browser process alive when there are BackgroundContents running and updated the unit tests. Renamed BrowserList::IsInPersistentMode() => WillShutdownWhenLastBrowserCloses() and AllBrowsersClosed() => AllBrowsersClosedAndAppExiting() to more precisely indicate their true functions. Exposed BrowserProcess::ModuleRefCount() so BrowserList can determine when the application is going to exit so the right notifications/callbacks can be generated. Updated background-auto-update-restart code to use new BrowserList APIs to determine whether the application is running "in the background". Added code to cancel shutdown on all plaforms if the user selects cancel in an onbeforeunload dialog. BUG=45275 TEST=RunInBackgroundTest (ui_test) Review URL: http://codereview.chromium.org/2866034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background_contents_service.h')
-rw-r--r--chrome/browser/background_contents_service.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/background_contents_service.h b/chrome/browser/background_contents_service.h
index 48a9a3c..73d9944 100644
--- a/chrome/browser/background_contents_service.h
+++ b/chrome/browser/background_contents_service.h
@@ -108,6 +108,10 @@ class BackgroundContentsService : private NotificationObserver {
typedef std::map<string16, BackgroundContentsInfo> BackgroundContentsMap;
BackgroundContentsMap contents_map_;
+ // If true, should always keep the browser process alive regardless of whether
+ // there are any BackgroundContents (used for manual/automated testing).
+ bool always_keep_alive_;
+
DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService);
};