| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/tabs/tab.h" | 5 #include "chrome/browser/views/tabs/tab.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/gfx/font.h" | 8 #include "app/gfx/font.h" |
| 9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 AddItemWithStringId(TabStripModel::CommandCloseTab, | 91 AddItemWithStringId(TabStripModel::CommandCloseTab, |
| 92 IDS_TAB_CXMENU_CLOSETAB); | 92 IDS_TAB_CXMENU_CLOSETAB); |
| 93 AddItemWithStringId(TabStripModel::CommandCloseOtherTabs, | 93 AddItemWithStringId(TabStripModel::CommandCloseOtherTabs, |
| 94 IDS_TAB_CXMENU_CLOSEOTHERTABS); | 94 IDS_TAB_CXMENU_CLOSEOTHERTABS); |
| 95 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, | 95 AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, |
| 96 IDS_TAB_CXMENU_CLOSETABSTORIGHT); | 96 IDS_TAB_CXMENU_CLOSETABSTORIGHT); |
| 97 AddItemWithStringId(TabStripModel::CommandCloseTabsOpenedBy, | 97 AddItemWithStringId(TabStripModel::CommandCloseTabsOpenedBy, |
| 98 IDS_TAB_CXMENU_CLOSETABSOPENEDBY); | 98 IDS_TAB_CXMENU_CLOSETABSOPENEDBY); |
| 99 AddSeparator(); | 99 AddSeparator(); |
| 100 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB); | 100 AddItemWithStringId(TabStripModel::CommandRestoreTab, IDS_RESTORE_TAB); |
| 101 #if defined(OS_WIN) | |
| 102 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, | 101 AddItemWithStringId(TabStripModel::CommandBookmarkAllTabs, |
| 103 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); | 102 IDS_TAB_CXMENU_BOOKMARK_ALL_TABS); |
| 104 #endif | |
| 105 menu_.reset(new views::Menu2(this)); | 103 menu_.reset(new views::Menu2(this)); |
| 106 } | 104 } |
| 107 | 105 |
| 108 scoped_ptr<views::Menu2> menu_; | 106 scoped_ptr<views::Menu2> menu_; |
| 109 | 107 |
| 110 // The Tab the context menu was brought up for. Set to NULL when the menu | 108 // The Tab the context menu was brought up for. Set to NULL when the menu |
| 111 // is canceled. | 109 // is canceled. |
| 112 Tab* tab_; | 110 Tab* tab_; |
| 113 | 111 |
| 114 // The last command that was selected, so that we can start/stop highlighting | 112 // The last command that was selected, so that we can start/stop highlighting |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 254 |
| 257 // Right end cap. | 255 // Right end cap. |
| 258 path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth); | 256 path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth); |
| 259 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth); | 257 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth); |
| 260 path->lineTo(w, h); | 258 path->lineTo(w, h); |
| 261 | 259 |
| 262 // Close out the path. | 260 // Close out the path. |
| 263 path->lineTo(0, h); | 261 path->lineTo(0, h); |
| 264 path->close(); | 262 path->close(); |
| 265 } | 263 } |
| OLD | NEW |