| OLD | NEW |
| 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 "grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| 11 | 11 |
| 12 TabMenuModel::TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, | 12 TabMenuModel::TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, |
| 13 TabStripModel* tab_strip, | 13 TabStripModel* tab_strip, |
| 14 int index) | 14 int index) |
| 15 : ui::SimpleMenuModel(delegate) { | 15 : ui::SimpleMenuModel(delegate) { |
| 16 Build(tab_strip, index); | 16 Build(tab_strip, index); |
| 17 } | 17 } |
| 18 | 18 |
| 19 void TabMenuModel::Build(TabStripModel* tab_strip, int index) { | 19 void TabMenuModel::Build(TabStripModel* tab_strip, int index) { |
| 20 bool affects_multiple_tabs = | 20 bool affects_multiple_tabs = |
| (...skipping 27 matching lines...) Expand all Loading... |
| 48 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, | 48 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, |
| 49 IDS_TAB_CXMENU_CLOSETABSTORIGHT); | 49 IDS_TAB_CXMENU_CLOSETABSTORIGHT); |
| 50 AddSeparator(ui::NORMAL_SEPARATOR); | 50 AddSeparator(ui::NORMAL_SEPARATOR); |
| 51 const bool is_window = tab_strip->delegate()->GetRestoreTabType() == | 51 const bool is_window = tab_strip->delegate()->GetRestoreTabType() == |
| 52 TabStripModelDelegate::RESTORE_WINDOW; | 52 TabStripModelDelegate::RESTORE_WINDOW; |
| 53 AddItemWithStringId(TabStripModel::CommandRestoreTab, | 53 AddItemWithStringId(TabStripModel::CommandRestoreTab, |
| 54 is_window ? IDS_RESTORE_WINDOW : IDS_RESTORE_TAB); | 54 is_window ? IDS_RESTORE_WINDOW : IDS_RESTORE_TAB); |
| 55 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, | 55 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, |
| 56 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); | 56 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); |
| 57 } | 57 } |
| OLD | NEW |