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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 12096060: browser: Start moving application_lifetime.h functions into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/ui/ash/ash_init.cc ('k') | chrome/browser/ui/browser_list_impl.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 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 628
629 void Browser::OnWindowClosing() { 629 void Browser::OnWindowClosing() {
630 if (!ShouldCloseWindow()) 630 if (!ShouldCloseWindow())
631 return; 631 return;
632 632
633 // Application should shutdown on last window close if the user is explicitly 633 // Application should shutdown on last window close if the user is explicitly
634 // trying to quit, or if there is nothing keeping the browser alive (such as 634 // trying to quit, or if there is nothing keeping the browser alive (such as
635 // AppController on the Mac, or BackgroundContentsService for background 635 // AppController on the Mac, or BackgroundContentsService for background
636 // pages). 636 // pages).
637 bool should_quit_if_last_browser = 637 bool should_quit_if_last_browser =
638 browser_shutdown::IsTryingToQuit() || !browser::WillKeepAlive(); 638 browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive();
639 639
640 if (should_quit_if_last_browser && BrowserList::size() == 1) 640 if (should_quit_if_last_browser && BrowserList::size() == 1)
641 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE); 641 browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
642 642
643 // Don't use GetForProfileIfExisting here, we want to force creation of the 643 // Don't use GetForProfileIfExisting here, we want to force creation of the
644 // session service so that user can restore what was open. 644 // session service so that user can restore what was open.
645 SessionService* session_service = 645 SessionService* session_service =
646 SessionServiceFactory::GetForProfile(profile()); 646 SessionServiceFactory::GetForProfile(profile());
647 if (session_service) 647 if (session_service)
648 session_service->WindowClosing(session_id()); 648 session_service->WindowClosing(session_id());
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 if (contents && !allow_js_access) { 2332 if (contents && !allow_js_access) {
2333 contents->web_contents()->GetController().LoadURL( 2333 contents->web_contents()->GetController().LoadURL(
2334 target_url, 2334 target_url,
2335 content::Referrer(), 2335 content::Referrer(),
2336 content::PAGE_TRANSITION_LINK, 2336 content::PAGE_TRANSITION_LINK,
2337 std::string()); // No extra headers. 2337 std::string()); // No extra headers.
2338 } 2338 }
2339 2339
2340 return contents != NULL; 2340 return contents != NULL;
2341 } 2341 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/browser_list_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698