| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 ? ¤t_tab->controller() : NULL; | 2992 return current_tab ? ¤t_tab->controller() : NULL; |
| 2993 } | 2993 } |
| OLD | NEW |