Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_view.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm |
| index 20e3e2173a4011ab528aa04c185f6045c9b310dd..4f67940c3a737961b9866a8aca17f19e549482bc 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_view.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm |
| @@ -27,6 +27,12 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
| +namespace { |
| + |
| +// The color of the icons in dark mode theme. |
| +const SkColor kDarkModeIconColor = SkColorSetARGB(0xFF, 0xC4, 0xC4, 0xC4); |
| + |
| +} // namespace |
| // The amount of time in seconds during which each type of glow increases, holds |
| // steady, and decreases, respectively. |
| @@ -631,8 +637,23 @@ CGFloat LineWidthFromContext(CGContextRef context) { |
| [self setNeedsDisplayInRect:[titleView_ frame]]; |
| } |
| -- (SkColor)closeButtonColor { |
| - return [[controller_ closeButton] iconColor]; |
| +- (SkColor)iconColor { |
| + if ([[self window] hasDarkTheme]) |
| + return kDarkModeIconColor; |
| + |
| + const ui::ThemeProvider* themeProvider = [[self window] themeProvider]; |
| + if (themeProvider) { |
| + bool use_active_tab_text_color = [self isActiveTab]; |
|
Robert Sesek
2016/07/12 23:43:56
naming: camelCase in ObjC
spqchan
2016/07/13 17:16:14
Done.
|
| + |
| + const SkColor titleColor = |
| + use_active_tab_text_color |
| + ? themeProvider->GetColor(ThemeProperties::COLOR_TAB_TEXT) |
| + : themeProvider->GetColor( |
| + ThemeProperties::COLOR_BACKGROUND_TAB_TEXT); |
| + return SkColorSetA(titleColor, 0xA0); |
| + } |
| + |
| + return tabs::kDefaultTabTextColor; |
| } |
| - (void)accessibilityOptionsDidChange:(id)ignored { |