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

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 | « chrome/browser/lifetime/application_lifetime.cc ('k') | 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 if (!ShouldCloseWindow()) 607 if (!ShouldCloseWindow())
608 return; 608 return;
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 && chrome::ShouldStartShutdown(this))
618 BrowserList::GetInstance(host_desktop_type_)->size() == 1) {
619 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE); 618 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
620 }
621 619
622 // Don't use GetForProfileIfExisting here, we want to force creation of the 620 // Don't use GetForProfileIfExisting here, we want to force creation of the
623 // session service so that user can restore what was open. 621 // session service so that user can restore what was open.
624 SessionService* session_service = 622 SessionService* session_service =
625 SessionServiceFactory::GetForProfile(profile()); 623 SessionServiceFactory::GetForProfile(profile());
626 if (session_service) 624 if (session_service)
627 session_service->WindowClosing(session_id()); 625 session_service->WindowClosing(session_id());
628 626
629 TabRestoreService* tab_restore_service = 627 TabRestoreService* tab_restore_service =
630 TabRestoreServiceFactory::GetForProfile(profile()); 628 TabRestoreServiceFactory::GetForProfile(profile());
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 if (contents && !allow_js_access) { 2253 if (contents && !allow_js_access) {
2256 contents->web_contents()->GetController().LoadURL( 2254 contents->web_contents()->GetController().LoadURL(
2257 target_url, 2255 target_url,
2258 content::Referrer(), 2256 content::Referrer(),
2259 content::PAGE_TRANSITION_LINK, 2257 content::PAGE_TRANSITION_LINK,
2260 std::string()); // No extra headers. 2258 std::string()); // No extra headers.
2261 } 2259 }
2262 2260
2263 return contents != NULL; 2261 return contents != NULL;
2264 } 2262 }
OLDNEW
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698