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

Side by Side Diff: chrome/browser/tab_menu_model.cc

Issue 2952004: [Mac] Finish implementation of App Tabs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_menu_model.h" 5 #include "chrome/browser/tab_menu_model.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/tabs/tab_strip_model.h" 8 #include "chrome/browser/tabs/tab_strip_model.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
11 11
12 TabMenuModel::TabMenuModel(menus::SimpleMenuModel::Delegate* delegate, 12 TabMenuModel::TabMenuModel(menus::SimpleMenuModel::Delegate* delegate,
13 bool is_pinned,
13 bool allow_toolbar_toggle, 14 bool allow_toolbar_toggle,
14 bool is_app_tab,
15 bool is_toolbar_visible) 15 bool is_toolbar_visible)
16 : menus::SimpleMenuModel(delegate) { 16 : menus::SimpleMenuModel(delegate) {
17 Build(allow_toolbar_toggle, is_app_tab, is_toolbar_visible); 17 Build(is_pinned, allow_toolbar_toggle, is_toolbar_visible);
18 } 18 }
19 19
20 // static 20 // static
21 bool TabMenuModel::AreVerticalTabsEnabled() { 21 bool TabMenuModel::AreVerticalTabsEnabled() {
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 return true; 23 return true;
24 #elif defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) 24 #elif defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)
25 return CommandLine::ForCurrentProcess()->HasSwitch( 25 return CommandLine::ForCurrentProcess()->HasSwitch(
26 switches::kEnableVerticalTabs); 26 switches::kEnableVerticalTabs);
27 #else 27 #else
(...skipping 27 matching lines...) Expand all
55 AddSeparator(); 55 AddSeparator();
56 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB); 56 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB);
57 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, 57 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs,
58 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); 58 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS);
59 if (AreVerticalTabsEnabled()) { 59 if (AreVerticalTabsEnabled()) {
60 AddSeparator(); 60 AddSeparator();
61 AddCheckItemWithStringId(TabStripModel::CommandUseVerticalTabs, 61 AddCheckItemWithStringId(TabStripModel::CommandUseVerticalTabs,
62 IDS_TAB_CXMENU_USE_VERTICAL_TABS); 62 IDS_TAB_CXMENU_USE_VERTICAL_TABS);
63 } 63 }
64 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698