| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/views/tabs/tab.h" | 5 #include "chrome/browser/ui/views/tabs/tab.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 favicon_draw_bounds.width(), | 1539 favicon_draw_bounds.width(), |
| 1540 favicon_draw_bounds.height(), favicon_draw_bounds.x(), | 1540 favicon_draw_bounds.height(), favicon_draw_bounds.x(), |
| 1541 favicon_draw_bounds.y(), favicon_draw_bounds.width(), | 1541 favicon_draw_bounds.y(), favicon_draw_bounds.width(), |
| 1542 favicon_draw_bounds.height(), false); | 1542 favicon_draw_bounds.height(), false); |
| 1543 } | 1543 } |
| 1544 | 1544 |
| 1545 // Draws the actual pinned tab title changed indicator. | 1545 // Draws the actual pinned tab title changed indicator. |
| 1546 const int kIndicatorRadius = 3; | 1546 const int kIndicatorRadius = 3; |
| 1547 SkPaint indicator_paint; | 1547 SkPaint indicator_paint; |
| 1548 indicator_paint.setColor(GetNativeTheme()->GetSystemColor( | 1548 indicator_paint.setColor(GetNativeTheme()->GetSystemColor( |
| 1549 ui::NativeTheme::kColorId_CallToActionColor)); | 1549 ui::NativeTheme::kColorId_ProminentButtonColor)); |
| 1550 indicator_paint.setAntiAlias(true); | 1550 indicator_paint.setAntiAlias(true); |
| 1551 const int indicator_x = GetMirroredXWithWidthInView( | 1551 const int indicator_x = GetMirroredXWithWidthInView( |
| 1552 favicon_bounds_.right() - kIndicatorRadius, kIndicatorRadius * 2); | 1552 favicon_bounds_.right() - kIndicatorRadius, kIndicatorRadius * 2); |
| 1553 const int indicator_y = favicon_bounds_.bottom() - kIndicatorRadius; | 1553 const int indicator_y = favicon_bounds_.bottom() - kIndicatorRadius; |
| 1554 canvas->DrawCircle(gfx::Point(indicator_x + kIndicatorRadius, | 1554 canvas->DrawCircle(gfx::Point(indicator_x + kIndicatorRadius, |
| 1555 indicator_y + kIndicatorRadius), | 1555 indicator_y + kIndicatorRadius), |
| 1556 kIndicatorRadius, indicator_paint); | 1556 kIndicatorRadius, indicator_paint); |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 void Tab::PaintIcon(gfx::Canvas* canvas) { | 1559 void Tab::PaintIcon(gfx::Canvas* canvas) { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 gfx::Rect Tab::GetImmersiveBarRect() const { | 1755 gfx::Rect Tab::GetImmersiveBarRect() const { |
| 1756 // The main bar is as wide as the normal tab's horizontal top line. | 1756 // The main bar is as wide as the normal tab's horizontal top line. |
| 1757 // This top line of the tab extends a few pixels left and right of the | 1757 // This top line of the tab extends a few pixels left and right of the |
| 1758 // center image due to pixels in the rounded corner images. | 1758 // center image due to pixels in the rounded corner images. |
| 1759 const int kBarPadding = 1; | 1759 const int kBarPadding = 1; |
| 1760 int main_bar_left = g_active_images.l_width - kBarPadding; | 1760 int main_bar_left = g_active_images.l_width - kBarPadding; |
| 1761 int main_bar_right = width() - g_active_images.r_width + kBarPadding; | 1761 int main_bar_right = width() - g_active_images.r_width + kBarPadding; |
| 1762 return gfx::Rect( | 1762 return gfx::Rect( |
| 1763 main_bar_left, 0, main_bar_right - main_bar_left, kImmersiveBarHeight); | 1763 main_bar_left, 0, main_bar_right - main_bar_left, kImmersiveBarHeight); |
| 1764 } | 1764 } |
| OLD | NEW |