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

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

Issue 190543003: Removes --enable-tab-groups-context-menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/tabs/tab_menu_model.h" 5 #include "chrome/browser/ui/tabs/tab_menu_model.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" 9 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
10 #include "chrome/common/chrome_switches.h"
11 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
12 11
13 TabMenuModel::TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, 12 TabMenuModel::TabMenuModel(ui::SimpleMenuModel::Delegate* delegate,
14 TabStripModel* tab_strip, 13 TabStripModel* tab_strip,
15 int index) 14 int index)
16 : ui::SimpleMenuModel(delegate) { 15 : ui::SimpleMenuModel(delegate) {
17 Build(tab_strip, index); 16 Build(tab_strip, index);
18 } 17 }
19 18
20 void TabMenuModel::Build(TabStripModel* tab_strip, int index) { 19 void TabMenuModel::Build(TabStripModel* tab_strip, int index) {
(...skipping 27 matching lines...) Expand all
48 IDS_TAB_CXMENU_CLOSEOTHERTABS); 47 IDS_TAB_CXMENU_CLOSEOTHERTABS);
49 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, 48 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight,
50 IDS_TAB_CXMENU_CLOSETABSTORIGHT); 49 IDS_TAB_CXMENU_CLOSETABSTORIGHT);
51 AddSeparator(ui::NORMAL_SEPARATOR); 50 AddSeparator(ui::NORMAL_SEPARATOR);
52 const bool is_window = tab_strip->delegate()->GetRestoreTabType() == 51 const bool is_window = tab_strip->delegate()->GetRestoreTabType() ==
53 TabStripModelDelegate::RESTORE_WINDOW; 52 TabStripModelDelegate::RESTORE_WINDOW;
54 AddItemWithStringId(TabStripModel::CommandRestoreTab, 53 AddItemWithStringId(TabStripModel::CommandRestoreTab,
55 is_window ? IDS_RESTORE_WINDOW : IDS_RESTORE_TAB); 54 is_window ? IDS_RESTORE_WINDOW : IDS_RESTORE_TAB);
56 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, 55 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs,
57 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); 56 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS);
58 if (CommandLine::ForCurrentProcess()->HasSwitch(
59 switches::kEnableTabGroupsContextMenu)) {
60 AddSeparator(ui::NORMAL_SEPARATOR);
61 AddItemWithStringId(TabStripModel::CommandSelectByDomain,
62 IDS_TAB_CXMENU_SELECT_BY_DOMAIN);
63 AddItemWithStringId(TabStripModel::CommandSelectByOpener,
64 IDS_TAB_CXMENU_SELECT_BY_OPENER);
65 }
66 } 57 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698