| 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" |
| 11 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 12 #include "base/gfx/size.h" | 12 #include "base/gfx/size.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "views/controls/menu/chrome_menu.h" | 14 #include "views/controls/menu/chrome_menu.h" |
| 15 #if defined(OS_WIN) | |
| 16 #include "views/widget/tooltip_manager.h" | 15 #include "views/widget/tooltip_manager.h" |
| 17 #endif | |
| 18 #include "views/widget/widget.h" | 16 #include "views/widget/widget.h" |
| 19 | 17 |
| 20 const std::string Tab::kTabClassName = "browser/tabs/Tab"; | 18 const std::string Tab::kTabClassName = "browser/tabs/Tab"; |
| 21 | 19 |
| 22 static const SkScalar kTabCapWidth = 15; | 20 static const SkScalar kTabCapWidth = 15; |
| 23 static const SkScalar kTabTopCurveWidth = 4; | 21 static const SkScalar kTabTopCurveWidth = 4; |
| 24 static const SkScalar kTabBottomCurveWidth = 3; | 22 static const SkScalar kTabBottomCurveWidth = 3; |
| 25 | 23 |
| 26 class Tab::ContextMenuController : public views::MenuDelegate { | 24 class Tab::ContextMenuController : public views::MenuDelegate { |
| 27 public: | 25 public: |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 274 |
| 277 // Close out the path. | 275 // Close out the path. |
| 278 path->lineTo(0, h); | 276 path->lineTo(0, h); |
| 279 path->close(); | 277 path->close(); |
| 280 } | 278 } |
| 281 | 279 |
| 282 void Tab::ContextMenuClosed() { | 280 void Tab::ContextMenuClosed() { |
| 283 delegate()->StopAllHighlighting(); | 281 delegate()->StopAllHighlighting(); |
| 284 menu_controller_ = NULL; | 282 menu_controller_ = NULL; |
| 285 } | 283 } |
| OLD | NEW |