summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authormitchelljones <mitchelljones@chromium.org>2014-12-18 21:01:37 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-19 05:02:28 +0000
commit3bc6ced32ae6e4ae294cb23fd179cb1084e9a0bb (patch)
tree4c296391bfed24e17fafbc8eff3a909d9f134126 /chrome/browser/app_controller_mac.mm
parent73c209621e823e68ef57a00bd15f5599bbf1ddd2 (diff)
downloadchromium_src-3bc6ced32ae6e4ae294cb23fd179cb1084e9a0bb.zip
chromium_src-3bc6ced32ae6e4ae294cb23fd179cb1084e9a0bb.tar.gz
chromium_src-3bc6ced32ae6e4ae294cb23fd179cb1084e9a0bb.tar.bz2
Added flag --enable-hosted-app-quit-notification.
Displays a notification for quitting Chrome with hosted apps running in the background on Mac. Currently, quitting Chrome will close all associated hosted app windows. BUG=442176 Review URL: https://codereview.chromium.org/801233002 Cr-Commit-Position: refs/heads/master@{#309150}
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index e86c79c..32e82339 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -430,6 +430,11 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
// sessions.
if (!browser_shutdown::IsTryingToQuit() && quitWithAppsController_.get() &&
!quitWithAppsController_->ShouldQuit()) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kHostedAppQuitNotification)) {
+ return NO;
+ }
+
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
content::NotificationService::AllSources(),