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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 return false; | 208 return false; |
209 } | 209 } |
210 | 210 |
211 bool Tab::GetTooltipTextOrigin(int x, int y, CPoint* origin) { | 211 bool Tab::GetTooltipTextOrigin(int x, int y, CPoint* origin) { |
212 ChromeFont font; | 212 ChromeFont font; |
213 origin->x = title_bounds().x() + 10; | 213 origin->x = title_bounds().x() + 10; |
214 origin->y = -views::TooltipManager::GetTooltipHeight() - 4; | 214 origin->y = -views::TooltipManager::GetTooltipHeight() - 4; |
215 return true; | 215 return true; |
216 } | 216 } |
217 | 217 |
218 bool Tab::GetAccessibleRole(VARIANT* role) { | 218 bool Tab::GetAccessibleRole(AccessibilityTypes::Role* role) { |
219 DCHECK(role); | 219 DCHECK(role); |
220 | 220 |
221 role->vt = VT_I4; | 221 *role = AccessibilityTypes::ROLE_PAGETAB; |
222 role->lVal = ROLE_SYSTEM_PAGETAB; | |
223 return true; | 222 return true; |
224 } | 223 } |
225 | 224 |
226 bool Tab::GetAccessibleName(std::wstring* name) { | 225 bool Tab::GetAccessibleName(std::wstring* name) { |
227 *name = GetTitle(); | 226 *name = GetTitle(); |
228 return !name->empty(); | 227 return !name->empty(); |
229 } | 228 } |
230 | 229 |
231 /////////////////////////////////////////////////////////////////////////////// | 230 /////////////////////////////////////////////////////////////////////////////// |
232 // Tab, views::ContextMenuController implementation: | 231 // Tab, views::ContextMenuController implementation: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 273 |
275 // Close out the path. | 274 // Close out the path. |
276 path->lineTo(0, h); | 275 path->lineTo(0, h); |
277 path->close(); | 276 path->close(); |
278 } | 277 } |
279 | 278 |
280 void Tab::ContextMenuClosed() { | 279 void Tab::ContextMenuClosed() { |
281 delegate()->StopAllHighlighting(); | 280 delegate()->StopAllHighlighting(); |
282 menu_controller_ = NULL; | 281 menu_controller_ = NULL; |
283 } | 282 } |
OLD | NEW |