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

Unified Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 13977008: Chrome AURA/ASH on Windows 8 should not attempt to shutdown the browser if there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 months 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/lifetime/application_lifetime.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/application_lifetime.cc
===================================================================
--- chrome/browser/lifetime/application_lifetime.cc (revision 194196)
+++ chrome/browser/lifetime/application_lifetime.cc (working copy)
@@ -384,4 +384,20 @@
HandleAppExitingForPlatform();
}
+bool ShouldStartShutdown(Browser* browser) {
+ if (BrowserList::GetInstance(browser->host_desktop_type())->size() > 1)
+ return false;
+#if defined(OS_WIN) && defined(USE_AURA)
+ // On Windows 8 browser windows could be open in ASH and in the desktop. We
+ // should not start the shutdown process if browser windows are open in the
+ // other environment.
+ chrome::HostDesktopType other_desktop =
+ (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE ?
+ chrome::HOST_DESKTOP_TYPE_ASH : chrome::HOST_DESKTOP_TYPE_NATIVE);
+ if (!BrowserList::GetInstance(other_desktop)->empty())
+ return false;
+#endif
+ return true;
+}
+
} // namespace chrome
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698