| Index: chrome/browser/ui/views/tabs/tab.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/tabs/tab.cc (revision 96939)
|
| +++ chrome/browser/ui/views/tabs/tab.cc (working copy)
|
| @@ -9,7 +9,6 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/browser/defaults.h"
|
| #include "chrome/browser/themes/theme_service.h"
|
| -#include "chrome/browser/ui/tabs/tab_resources.h"
|
| #include "grit/generated_resources.h"
|
| #include "grit/theme_resources.h"
|
| #include "grit/theme_resources_standard.h"
|
| @@ -85,6 +84,11 @@
|
| static const SkColor kMiniTitleChangeGradientColor2 =
|
| SkColorSetARGB(0, 255, 255, 255);
|
|
|
| +// Hit mask constants.
|
| +static const SkScalar kTabCapWidth = 15;
|
| +static const SkScalar kTabTopCurveWidth = 4;
|
| +static const SkScalar kTabBottomCurveWidth = 3;
|
| +
|
| // static
|
| const char Tab::kViewClassName[] = "browser/tabs/Tab";
|
|
|
| @@ -321,7 +325,29 @@
|
| }
|
|
|
| void Tab::GetHitTestMask(gfx::Path* path) const {
|
| - TabResources::GetHitTestMask(width(), height(), path);
|
| + DCHECK(path);
|
| +
|
| + SkScalar h = SkIntToScalar(height());
|
| + SkScalar w = SkIntToScalar(width());
|
| +
|
| + path->moveTo(0, h);
|
| +
|
| + // Left end cap.
|
| + path->lineTo(kTabBottomCurveWidth, h - kTabBottomCurveWidth);
|
| + path->lineTo(kTabCapWidth - kTabTopCurveWidth, kTabTopCurveWidth);
|
| + path->lineTo(kTabCapWidth, 0);
|
| +
|
| + // Connect to the right cap.
|
| + path->lineTo(w - kTabCapWidth, 0);
|
| +
|
| + // Right end cap.
|
| + path->lineTo(w - kTabCapWidth + kTabTopCurveWidth, kTabTopCurveWidth);
|
| + path->lineTo(w - kTabBottomCurveWidth, h - kTabBottomCurveWidth);
|
| + path->lineTo(w, h);
|
| +
|
| + // Close out the path.
|
| + path->lineTo(0, h);
|
| + path->close();
|
| }
|
|
|
| bool Tab::GetTooltipTextOrigin(const gfx::Point& p, gfx::Point* origin) {
|
|
|