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

Unified Diff: chrome/browser/chromeos/status_area_view.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/chromeos/compact_navigation_bar.cc ('k') | chrome/browser/cocoa/location_bar_view_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status_area_view.cc
diff --git a/chrome/browser/chromeos/status_area_view.cc b/chrome/browser/chromeos/status_area_view.cc
index 59f4f9ce01f854169ddd9008ff99c7ae55cb569b..87c892b9907cf49533a8ebcc090521e8d0dff9d9 100644
--- a/chrome/browser/chromeos/status_area_view.cc
+++ b/chrome/browser/chromeos/status_area_view.cc
@@ -52,9 +52,12 @@ class OptionsMenuModel : public views::SimpleMenuModel,
views::SimpleMenuModel::Delegate* delegate)
: SimpleMenuModel(this),
browser_(browser) {
+#if defined(TOOLKIT_VIEWS)
+ AddItemWithStringId(IDC_COMPACT_NAVBAR, IDS_COMPACT_NAVBAR);
+#else
AddItem(static_cast<int>(CREATE_NEW_WINDOW),
ASCIIToUTF16("New window"));
-
+#endif
AddSeparator();
AddItem(static_cast<int>(StatusAreaView::OPEN_TABS_ON_LEFT),
@@ -81,11 +84,12 @@ class OptionsMenuModel : public views::SimpleMenuModel,
}
virtual void ExecuteCommand(int command_id) {
switch (command_id) {
- case CREATE_NEW_WINDOW:
#if defined(TOOLKIT_VIEWS)
- // TODO(oshima): Implement accelerator to enable/disable
- // compact nav bar.
+ case IDC_COMPACT_NAVBAR:
+ browser_->ExecuteCommand(command_id);
+ break;
#else
+ case CREATE_NEW_WINDOW:
// Reach into the GTK browser window and enable the flag to create the
// next window as a compact nav one.
// TODO(brettw) this is an evil hack, and is here so this can be tested.
@@ -93,8 +97,8 @@ class OptionsMenuModel : public views::SimpleMenuModel,
static_cast<BrowserWindowGtk*>(browser_->window())->
set_next_window_should_use_compact_nav();
browser_->ExecuteCommand(IDC_NEW_WINDOW);
-#endif
break;
+#endif
case StatusAreaView::OPEN_TABS_ON_LEFT:
case StatusAreaView::OPEN_TABS_CLOBBER:
case StatusAreaView::OPEN_TABS_ON_RIGHT:
« no previous file with comments | « chrome/browser/chromeos/compact_navigation_bar.cc ('k') | chrome/browser/cocoa/location_bar_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698