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

Side by Side Diff: chrome/browser/views/tabs/tab.cc

Issue 2124003: More TabStrip refactoring. (Closed)
Patch Set: Merge with trunk Created 10 years, 7 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
« no previous file with comments | « chrome/browser/views/tabs/tab.h ('k') | chrome/browser/views/tabs/tab_strip.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) 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/views/tabs/tab.h" 5 #include "chrome/browser/views/tabs/tab.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/menus/simple_menu_model.h" 8 #include "app/menus/simple_menu_model.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 12 matching lines...) Expand all
23 const std::string Tab::kTabClassName = "browser/tabs/Tab"; 23 const std::string Tab::kTabClassName = "browser/tabs/Tab";
24 24
25 static const SkScalar kTabCapWidth = 15; 25 static const SkScalar kTabCapWidth = 15;
26 static const SkScalar kTabTopCurveWidth = 4; 26 static const SkScalar kTabTopCurveWidth = 4;
27 static const SkScalar kTabBottomCurveWidth = 3; 27 static const SkScalar kTabBottomCurveWidth = 3;
28 28
29 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
30 // Tab, public: 30 // Tab, public:
31 31
32 Tab::Tab(TabController* controller) 32 Tab::Tab(TabController* controller)
33 : TabRenderer(controller), 33 : TabRenderer(controller) {
34 closing_(false),
35 dragging_(false) {
36 close_button()->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_CLOSE_TAB)); 34 close_button()->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_CLOSE_TAB));
37 close_button()->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE)); 35 close_button()->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE));
38 close_button()->SetAnimationDuration(0); 36 close_button()->SetAnimationDuration(0);
39 SetContextMenuController(this); 37 SetContextMenuController(this);
40 } 38 }
41 39
42 Tab::~Tab() { 40 Tab::~Tab() {
43 } 41 }
44 42
45 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 158
161 // Right end cap. 159 // Right end cap.
162 path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth); 160 path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth);
163 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth); 161 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth);
164 path->lineTo(w, h); 162 path->lineTo(w, h);
165 163
166 // Close out the path. 164 // Close out the path.
167 path->lineTo(0, h); 165 path->lineTo(0, h);
168 path->close(); 166 path->close();
169 } 167 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab.h ('k') | chrome/browser/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698