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

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

Issue 5025001: Removed Labs section from Chrome OS settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed RegisterPref call Created 10 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/options/chromeos_labs.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/common/pref_names.h"
10 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
11 12
12 TabMenuModel::TabMenuModel(menus::SimpleMenuModel::Delegate* delegate, 13 TabMenuModel::TabMenuModel(menus::SimpleMenuModel::Delegate* delegate,
13 bool is_pinned) 14 bool is_pinned)
14 : menus::SimpleMenuModel(delegate) { 15 : menus::SimpleMenuModel(delegate) {
15 Build(is_pinned); 16 Build(is_pinned);
16 } 17 }
17 18
18 // static 19 // static
19 bool TabMenuModel::AreVerticalTabsEnabled() { 20 bool TabMenuModel::AreVerticalTabsEnabled() {
20 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) 21 #if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
21 return CommandLine::ForCurrentProcess()->HasSwitch( 22 return CommandLine::ForCurrentProcess()->HasSwitch(
22 switches::kEnableVerticalTabs); 23 switches::kEnableVerticalTabs);
23 #else 24 #else
24 return false; 25 return false;
25 #endif 26 #endif
26 } 27 }
27 28
28 void TabMenuModel::Build(bool is_pinned) { 29 void TabMenuModel::Build(bool is_pinned) {
29 AddItemWithStringId(TabStripModel::CommandNewTab, IDS_TAB_CXMENU_NEWTAB); 30 AddItemWithStringId(TabStripModel::CommandNewTab, IDS_TAB_CXMENU_NEWTAB);
30 AddSeparator(); 31 AddSeparator();
(...skipping 13 matching lines...) Expand all
44 AddSeparator(); 45 AddSeparator();
45 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB); 46 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB);
46 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, 47 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs,
47 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); 48 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS);
48 if (AreVerticalTabsEnabled()) { 49 if (AreVerticalTabsEnabled()) {
49 AddSeparator(); 50 AddSeparator();
50 AddCheckItemWithStringId(TabStripModel::CommandUseVerticalTabs, 51 AddCheckItemWithStringId(TabStripModel::CommandUseVerticalTabs,
51 IDS_TAB_CXMENU_USE_VERTICAL_TABS); 52 IDS_TAB_CXMENU_USE_VERTICAL_TABS);
52 } 53 }
53 } 54 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos_labs.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698