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/idle_timer.h" | 10 #include "base/idle_timer.h" |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1156 UserMetrics::RecordAction(L"ReportBug", profile_); | 1156 UserMetrics::RecordAction(L"ReportBug", profile_); |
1157 window_->ShowReportBugDialog(); | 1157 window_->ShowReportBugDialog(); |
1158 } | 1158 } |
1159 | 1159 |
1160 void Browser::ToggleBookmarkBar() { | 1160 void Browser::ToggleBookmarkBar() { |
1161 UserMetrics::RecordAction(L"ShowBookmarksBar", profile_); | 1161 UserMetrics::RecordAction(L"ShowBookmarksBar", profile_); |
1162 window_->ToggleBookmarkBar(); | 1162 window_->ToggleBookmarkBar(); |
1163 } | 1163 } |
1164 | 1164 |
1165 void Browser::ToggleExtensionShelf() { | 1165 void Browser::ToggleExtensionShelf() { |
1166 if (CommandLine::ForCurrentProcess()->HasSwitch(switches:: | |
1167 kShowExtensionsOnTop)) { | |
Finnur
2009/09/08 18:28:51
I wouldn't split up switches:: and kShowExtensions
| |
1168 return; | |
1169 } | |
1166 UserMetrics::RecordAction(L"ToggleExtensionShelf", profile_); | 1170 UserMetrics::RecordAction(L"ToggleExtensionShelf", profile_); |
1167 window_->ToggleExtensionShelf(); | 1171 window_->ToggleExtensionShelf(); |
1168 } | 1172 } |
1169 | 1173 |
1170 void Browser::OpenBookmarkManager() { | 1174 void Browser::OpenBookmarkManager() { |
1171 UserMetrics::RecordAction(L"ShowBookmarkManager", profile_); | 1175 UserMetrics::RecordAction(L"ShowBookmarkManager", profile_); |
1172 window_->ShowBookmarkManager(); | 1176 window_->ShowBookmarkManager(); |
1173 } | 1177 } |
1174 | 1178 |
1175 void Browser::ShowAppMenu() { | 1179 void Browser::ShowAppMenu() { |
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2882 /////////////////////////////////////////////////////////////////////////////// | 2886 /////////////////////////////////////////////////////////////////////////////// |
2883 // BrowserToolbarModel (private): | 2887 // BrowserToolbarModel (private): |
2884 | 2888 |
2885 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2889 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
2886 // This |current_tab| can be NULL during the initialization of the | 2890 // This |current_tab| can be NULL during the initialization of the |
2887 // toolbar during window creation (i.e. before any tabs have been added | 2891 // toolbar during window creation (i.e. before any tabs have been added |
2888 // to the window). | 2892 // to the window). |
2889 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2893 TabContents* current_tab = browser_->GetSelectedTabContents(); |
2890 return current_tab ? ¤t_tab->controller() : NULL; | 2894 return current_tab ? ¤t_tab->controller() : NULL; |
2891 } | 2895 } |
OLD | NEW |