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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/lifetime/application_lifetime.h" 5 #include "chrome/browser/lifetime/application_lifetime.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 378
379 void OnAppExiting() { 379 void OnAppExiting() {
380 static bool notified = false; 380 static bool notified = false;
381 if (notified) 381 if (notified)
382 return; 382 return;
383 notified = true; 383 notified = true;
384 HandleAppExitingForPlatform(); 384 HandleAppExitingForPlatform();
385 } 385 }
386 386
387 bool ShouldStartShutdown(Browser* browser) {
388 if (BrowserList::GetInstance(browser->host_desktop_type())->size() > 1)
389 return false;
390 #if defined(OS_WIN) && defined(USE_AURA)
391 // On Windows 8 browser windows could be open in ASH and in the desktop. We
392 // should not start the shutdown process if browser windows are open in the
393 // other environment.
394 chrome::HostDesktopType other_desktop =
395 (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE ?
396 chrome::HOST_DESKTOP_TYPE_ASH : chrome::HOST_DESKTOP_TYPE_NATIVE);
397 if (!BrowserList::GetInstance(other_desktop)->empty())
398 return false;
399 #endif
400 return true;
401 }
402
387 } // namespace chrome 403 } // namespace chrome
OLDNEW
« 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