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

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

Issue 14601: Some cleanup in view menu delegate (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years 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/views/tabs/tab.h ('k') | chrome/browser/views/toolbar_view.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) 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 "base/gfx/size.h" 7 #include "base/gfx/size.h"
8 #include "chrome/common/gfx/chrome_canvas.h" 8 #include "chrome/common/gfx/chrome_canvas.h"
9 #include "chrome/common/gfx/path.h" 9 #include "chrome/common/gfx/path.h"
10 #include "chrome/common/l10n_util.h" 10 #include "chrome/common/l10n_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Only show the tooltip if the title is truncated. 170 // Only show the tooltip if the title is truncated.
171 ChromeFont font; 171 ChromeFont font;
172 if (font.GetStringWidth(title) > title_bounds().width()) { 172 if (font.GetStringWidth(title) > title_bounds().width()) {
173 *tooltip = title; 173 *tooltip = title;
174 return true; 174 return true;
175 } 175 }
176 } 176 }
177 return false; 177 return false;
178 } 178 }
179 179
180 bool Tab::GetTooltipTextOrigin(int x, int y, CPoint* origin) { 180 bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) {
181 ChromeFont font; 181 ChromeFont font;
182 origin->x = title_bounds().x() + 10; 182 origin->set_x(title_bounds().x() + 10);
183 origin->y = -views::TooltipManager::GetTooltipHeight() - 4; 183 origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4);
184 return true; 184 return true;
185 } 185 }
186 186
187 bool Tab::GetAccessibleRole(VARIANT* role) { 187 bool Tab::GetAccessibleRole(VARIANT* role) {
188 DCHECK(role); 188 DCHECK(role);
189 189
190 role->vt = VT_I4; 190 role->vt = VT_I4;
191 role->lVal = ROLE_SYSTEM_PAGETAB; 191 role->lVal = ROLE_SYSTEM_PAGETAB;
192 return true; 192 return true;
193 } 193 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 // Right end cap. 237 // Right end cap.
238 path->lineTo(w - kTabCapWidth - kTabTopCurveWidth, kTabTopCurveWidth); 238 path->lineTo(w - kTabCapWidth - kTabTopCurveWidth, kTabTopCurveWidth);
239 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth); 239 path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth);
240 path->lineTo(w, h); 240 path->lineTo(w, h);
241 241
242 // Close out the path. 242 // Close out the path.
243 path->lineTo(0, h); 243 path->lineTo(0, h);
244 path->close(); 244 path->close();
245 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab.h ('k') | chrome/browser/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698