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

Unified Diff: chrome/browser/browser.cc

Issue 329009: CompactNavigationBar for toolkit views build, with some design change per Cole's request. (Closed)
Patch Set: updates per review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 07058afa6b951f15dd360f4d649e0e8d446cf158..1fd4f08cf8598e5c8b5c187a9cd65e42f3527159 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -893,6 +893,13 @@ void Browser::ToggleFullscreenMode() {
#endif
}
+#if defined(TOOLKIT_VIEWS)
+void Browser::ToggleCompactNavigationBar() {
+ UserMetrics::RecordAction(L"ToggleCompactNavigationBar", profile_);
+ window_->ToggleCompactNavigationBar();
+}
+#endif
+
void Browser::Exit() {
UserMetrics::RecordAction(L"Exit", profile_);
BrowserList::CloseAllBrowsersAndExit();
@@ -1360,6 +1367,9 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_SHOW_AS_TAB: ConvertPopupToTabbedBrowser(); break;
case IDC_FULLSCREEN: ToggleFullscreenMode(); break;
case IDC_EXIT: Exit(); break;
+#if defined(TOOLKIT_VIEWS)
+ case IDC_COMPACT_NAVBAR: ToggleCompactNavigationBar(); break;
+#endif
// Page-related commands
case IDC_SAVE_PAGE: SavePage(); break;
@@ -2268,6 +2278,9 @@ void Browser::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true);
command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, true);
command_updater_.UpdateCommandEnabled(IDC_EXIT, true);
+#if defined(TOOLKIT_VIEWS)
+ command_updater_.UpdateCommandEnabled(IDC_COMPACT_NAVBAR, true);
+#endif
// Page-related commands
command_updater_.UpdateCommandEnabled(IDC_CLOSE_POPUPS, true);
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698