| 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 "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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |