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

Side by Side Diff: chrome/browser/ui/browser.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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 // Application should shutdown on last window close if the user is explicitly 610 // Application should shutdown on last window close if the user is explicitly
611 // trying to quit, or if there is nothing keeping the browser alive (such as 611 // trying to quit, or if there is nothing keeping the browser alive (such as
612 // AppController on the Mac, or BackgroundContentsService for background 612 // AppController on the Mac, or BackgroundContentsService for background
613 // pages). 613 // pages).
614 bool should_quit_if_last_browser = 614 bool should_quit_if_last_browser =
615 browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive(); 615 browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive();
616 616
617 if (should_quit_if_last_browser && 617 if (should_quit_if_last_browser &&
618 BrowserList::GetInstance(host_desktop_type_)->size() == 1) { 618 BrowserList::GetInstance(host_desktop_type_)->size() == 1) {
619 #if defined(OS_WIN) && defined(USE_AURA)
620 // On Windows 8 browser windows could be open in ASH and in the desktop. We
621 // should not start the shutdown process if browser windows are open in the
622 // other environment.
623 chrome::HostDesktopType other_desktop =
624 (host_desktop_type_ == chrome::HOST_DESKTOP_TYPE_NATIVE ?
625 chrome::HOST_DESKTOP_TYPE_ASH : chrome::HOST_DESKTOP_TYPE_NATIVE);
626 if (BrowserList::GetInstance(other_desktop)->empty())
cpu_(ooo_6.6-7.5) 2013/04/17 21:37:44 should this change go into chrome/browser/lifetime
ananta 2013/04/17 22:03:06 Done. Added a function ShouldStartShutdown in appl
627 #endif
619 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE); 628 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
620 } 629 }
621 630
622 // Don't use GetForProfileIfExisting here, we want to force creation of the 631 // Don't use GetForProfileIfExisting here, we want to force creation of the
623 // session service so that user can restore what was open. 632 // session service so that user can restore what was open.
624 SessionService* session_service = 633 SessionService* session_service =
625 SessionServiceFactory::GetForProfile(profile()); 634 SessionServiceFactory::GetForProfile(profile());
626 if (session_service) 635 if (session_service)
627 session_service->WindowClosing(session_id()); 636 session_service->WindowClosing(session_id());
628 637
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 if (contents && !allow_js_access) { 2264 if (contents && !allow_js_access) {
2256 contents->web_contents()->GetController().LoadURL( 2265 contents->web_contents()->GetController().LoadURL(
2257 target_url, 2266 target_url,
2258 content::Referrer(), 2267 content::Referrer(),
2259 content::PAGE_TRANSITION_LINK, 2268 content::PAGE_TRANSITION_LINK,
2260 std::string()); // No extra headers. 2269 std::string()); // No extra headers.
2261 } 2270 }
2262 2271
2263 return contents != NULL; 2272 return contents != NULL;
2264 } 2273 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698