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

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

Issue 269048: SIGTERM should cause the application to exit on the Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/automation/automation_provider.cc ('k') | chrome/browser/browser_list.h » ('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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/keyboard_codes.h" 10 #include "base/keyboard_codes.h"
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 window_->SetFullscreen(!window_->IsFullscreen()); 884 window_->SetFullscreen(!window_->IsFullscreen());
885 // On Linux, setting fullscreen mode is an async call to the X server, which 885 // On Linux, setting fullscreen mode is an async call to the X server, which
886 // may or may not support fullscreen mode. 886 // may or may not support fullscreen mode.
887 #if !defined(OS_LINUX) 887 #if !defined(OS_LINUX)
888 UpdateCommandsForFullscreenMode(window_->IsFullscreen()); 888 UpdateCommandsForFullscreenMode(window_->IsFullscreen());
889 #endif 889 #endif
890 } 890 }
891 891
892 void Browser::Exit() { 892 void Browser::Exit() {
893 UserMetrics::RecordAction(L"Exit", profile_); 893 UserMetrics::RecordAction(L"Exit", profile_);
894 BrowserList::CloseAllBrowsers(true); 894 BrowserList::CloseAllBrowsersAndExit();
895 } 895 }
896 896
897 void Browser::BookmarkCurrentPage() { 897 void Browser::BookmarkCurrentPage() {
898 UserMetrics::RecordAction(L"Star", profile_); 898 UserMetrics::RecordAction(L"Star", profile_);
899 899
900 BookmarkModel* model = profile()->GetBookmarkModel(); 900 BookmarkModel* model = profile()->GetBookmarkModel();
901 if (!model || !model->IsLoaded()) 901 if (!model || !model->IsLoaded())
902 return; // Ignore requests until bookmarks are loaded. 902 return; // Ignore requests until bookmarks are loaded.
903 903
904 GURL url; 904 GURL url;
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 /////////////////////////////////////////////////////////////////////////////// 2984 ///////////////////////////////////////////////////////////////////////////////
2985 // BrowserToolbarModel (private): 2985 // BrowserToolbarModel (private):
2986 2986
2987 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2987 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2988 // This |current_tab| can be NULL during the initialization of the 2988 // This |current_tab| can be NULL during the initialization of the
2989 // toolbar during window creation (i.e. before any tabs have been added 2989 // toolbar during window creation (i.e. before any tabs have been added
2990 // to the window). 2990 // to the window).
2991 TabContents* current_tab = browser_->GetSelectedTabContents(); 2991 TabContents* current_tab = browser_->GetSelectedTabContents();
2992 return current_tab ? &current_tab->controller() : NULL; 2992 return current_tab ? &current_tab->controller() : NULL;
2993 } 2993 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698