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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 *tooltip = title; | 207 *tooltip = title; |
208 return true; | 208 return true; |
209 } | 209 } |
210 } | 210 } |
211 return false; | 211 return false; |
212 } | 212 } |
213 | 213 |
214 bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) { | 214 bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) { |
215 gfx::Font font; | 215 gfx::Font font; |
216 origin->set_x(title_bounds().x() + 10); | 216 origin->set_x(title_bounds().x() + 10); |
217 #if defined(OS_WIN) | |
218 origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4); | 217 origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4); |
219 #endif | |
220 return true; | 218 return true; |
221 } | 219 } |
222 | 220 |
223 bool Tab::GetAccessibleRole(AccessibilityTypes::Role* role) { | 221 bool Tab::GetAccessibleRole(AccessibilityTypes::Role* role) { |
224 DCHECK(role); | 222 DCHECK(role); |
225 | 223 |
226 *role = AccessibilityTypes::ROLE_PAGETAB; | 224 *role = AccessibilityTypes::ROLE_PAGETAB; |
227 return true; | 225 return true; |
228 } | 226 } |
229 | 227 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 276 |
279 // Close out the path. | 277 // Close out the path. |
280 path->lineTo(0, h); | 278 path->lineTo(0, h); |
281 path->close(); | 279 path->close(); |
282 } | 280 } |
283 | 281 |
284 void Tab::ContextMenuClosed() { | 282 void Tab::ContextMenuClosed() { |
285 delegate()->StopAllHighlighting(); | 283 delegate()->StopAllHighlighting(); |
286 menu_controller_ = NULL; | 284 menu_controller_ = NULL; |
287 } | 285 } |
OLD | NEW |