diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-06 04:49:53 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-06 04:49:53 +0000 |
commit | 4488e65fb39ce4ed0ccd40dd89615acb2de1d9f3 (patch) | |
tree | 84ce3e4d06b8ba2fc5db3f9aa0952a91c1836b70 /chrome/browser/tab_menu_model.cc | |
parent | 8066b15a2e4235319cd051337626e1c731306209 (diff) | |
download | chromium_src-4488e65fb39ce4ed0ccd40dd89615acb2de1d9f3.zip chromium_src-4488e65fb39ce4ed0ccd40dd89615acb2de1d9f3.tar.gz chromium_src-4488e65fb39ce4ed0ccd40dd89615acb2de1d9f3.tar.bz2 |
Add a context menu item to toggle app tab toolbars.
Review URL: http://codereview.chromium.org/2690001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_menu_model.cc')
-rw-r--r-- | chrome/browser/tab_menu_model.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/tab_menu_model.cc b/chrome/browser/tab_menu_model.cc index 2a62dc3..0dabc38 100644 --- a/chrome/browser/tab_menu_model.cc +++ b/chrome/browser/tab_menu_model.cc @@ -10,9 +10,11 @@ #include "grit/generated_resources.h" TabMenuModel::TabMenuModel(menus::SimpleMenuModel::Delegate* delegate, - bool is_pinned) + bool allow_toolbar_toggle, + bool is_app_tab, + bool is_toolbar_visible) : menus::SimpleMenuModel(delegate) { - Build(is_pinned); + Build(allow_toolbar_toggle, is_app_tab, is_toolbar_visible); } // static @@ -27,7 +29,8 @@ bool TabMenuModel::AreVerticalTabsEnabled() { #endif } -void TabMenuModel::Build(bool is_pinned) { +void TabMenuModel::Build(bool is_pinned, bool allow_toolbar_toggle, + bool is_toolbar_visible) { AddItemWithStringId(TabStripModel::CommandNewTab, IDS_TAB_CXMENU_NEWTAB); AddSeparator(); AddItemWithStringId(TabStripModel::CommandReload, IDS_TAB_CXMENU_RELOAD); @@ -36,6 +39,12 @@ void TabMenuModel::Build(bool is_pinned) { AddItemWithStringId( TabStripModel::CommandTogglePinned, is_pinned ? IDS_TAB_CXMENU_UNPIN_TAB : IDS_TAB_CXMENU_PIN_TAB); + if (allow_toolbar_toggle) { + AddItemWithStringId( + TabStripModel::CommandToggleToolbar, + is_toolbar_visible ? IDS_TAB_CXMENU_HIDE_TOOLBAR : + IDS_TAB_CXMENU_SHOW_TOOLBAR); + } AddSeparator(); AddItemWithStringId(TabStripModel::CommandCloseTab, IDS_TAB_CXMENU_CLOSETAB); |