| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/native_theme/native_theme_dark_aura.h" | 5 #include "ui/native_theme/native_theme_dark_aura.h" |
| 6 | 6 |
| 7 #include "ui/gfx/color_palette.h" | 7 #include "ui/gfx/color_palette.h" |
| 8 | 8 |
| 9 namespace ui { | 9 namespace ui { |
| 10 | 10 |
| 11 NativeThemeDarkAura* NativeThemeDarkAura::instance() { | 11 NativeThemeDarkAura* NativeThemeDarkAura::instance() { |
| 12 CR_DEFINE_STATIC_LOCAL(NativeThemeDarkAura, s_native_theme, ()); | 12 CR_DEFINE_STATIC_LOCAL(NativeThemeDarkAura, s_native_theme, ()); |
| 13 return &s_native_theme; | 13 return &s_native_theme; |
| 14 } | 14 } |
| 15 | 15 |
| 16 SkColor NativeThemeDarkAura::GetSystemColor(ColorId color_id) const { | 16 SkColor NativeThemeDarkAura::GetSystemColor(ColorId color_id) const { |
| 17 static const SkColor kPrimaryTextColor = SK_ColorWHITE; | 17 static const SkColor kPrimaryTextColor = SK_ColorWHITE; |
| 18 | 18 |
| 19 static const SkColor kButtonEnabledColor = SK_ColorWHITE; | 19 static const SkColor kButtonEnabledColor = SK_ColorWHITE; |
| 20 | 20 |
| 21 static const SkColor kTextfieldDefaultColor = SK_ColorWHITE; | 21 static const SkColor kTextfieldDefaultColor = SK_ColorWHITE; |
| 22 static const SkColor kTextfieldDefaultBackground = | 22 static const SkColor kTextfieldDefaultBackground = |
| 23 SkColorSetRGB(0x62, 0x62, 0x62); | 23 SkColorSetRGB(0x62, 0x62, 0x62); |
| 24 static const SkColor kTextfieldSelectionBackgroundFocused = | 24 static const SkColor kTextSelectionBackgroundFocused = |
| 25 SkColorSetA(gfx::kGoogleBlue700, 0xCC); | 25 SkColorSetA(gfx::kGoogleBlue700, 0xCC); |
| 26 | 26 |
| 27 static const SkColor kResultsTableNormalBackground = | 27 static const SkColor kResultsTableNormalBackground = |
| 28 SkColorSetRGB(0x28, 0x28, 0x28); | 28 SkColorSetRGB(0x28, 0x28, 0x28); |
| 29 static const SkColor kResultsTableText = SK_ColorWHITE; | 29 static const SkColor kResultsTableText = SK_ColorWHITE; |
| 30 static const SkColor kResultsTableDimmedText = | 30 static const SkColor kResultsTableDimmedText = |
| 31 SkColorSetA(kResultsTableText, 0x80); | 31 SkColorSetA(kResultsTableText, 0x80); |
| 32 | 32 |
| 33 switch (color_id) { | 33 switch (color_id) { |
| 34 // Window | 34 // Window |
| 35 case kColorId_WindowBackground: | 35 case kColorId_WindowBackground: |
| 36 case kColorId_DialogBackground: | 36 case kColorId_DialogBackground: |
| 37 case kColorId_BubbleBackground: | 37 case kColorId_BubbleBackground: |
| 38 return SK_ColorBLACK; | 38 return SK_ColorBLACK; |
| 39 | 39 |
| 40 // Button | 40 // Button |
| 41 case kColorId_ButtonEnabledColor: | 41 case kColorId_ButtonEnabledColor: |
| 42 return kButtonEnabledColor; | 42 return kButtonEnabledColor; |
| 43 case kColorId_ProminentButtonColor: | 43 case kColorId_ProminentButtonColor: |
| 44 return gfx::kGoogleBlue300; | 44 return gfx::kGoogleBlue300; |
| 45 | 45 |
| 46 // Label | 46 // Label |
| 47 case kColorId_LabelEnabledColor: | 47 case kColorId_LabelEnabledColor: |
| 48 case kColorId_LabelTextSelectionColor: |
| 48 return kPrimaryTextColor; | 49 return kPrimaryTextColor; |
| 50 case kColorId_LabelTextSelectionBackgroundFocused: |
| 51 return kTextSelectionBackgroundFocused; |
| 49 | 52 |
| 50 // Link | 53 // Link |
| 51 case kColorId_LinkEnabled: | 54 case kColorId_LinkEnabled: |
| 52 case kColorId_LinkPressed: | 55 case kColorId_LinkPressed: |
| 53 return gfx::kGoogleBlue300; | 56 return gfx::kGoogleBlue300; |
| 54 | 57 |
| 55 // Textfield | 58 // Textfield |
| 56 case kColorId_TextfieldDefaultColor: | 59 case kColorId_TextfieldDefaultColor: |
| 57 case kColorId_TextfieldSelectionColor: | 60 case kColorId_TextfieldSelectionColor: |
| 58 return kTextfieldDefaultColor; | 61 return kTextfieldDefaultColor; |
| 59 case kColorId_TextfieldDefaultBackground: | 62 case kColorId_TextfieldDefaultBackground: |
| 60 return kTextfieldDefaultBackground; | 63 return kTextfieldDefaultBackground; |
| 61 case kColorId_TextfieldSelectionBackgroundFocused: | 64 case kColorId_TextfieldSelectionBackgroundFocused: |
| 62 return kTextfieldSelectionBackgroundFocused; | 65 return kTextSelectionBackgroundFocused; |
| 63 | 66 |
| 64 // Results Tables | 67 // Results Tables |
| 65 case kColorId_ResultsTableNormalBackground: | 68 case kColorId_ResultsTableNormalBackground: |
| 66 return kResultsTableNormalBackground; | 69 return kResultsTableNormalBackground; |
| 67 case kColorId_ResultsTableNormalText: | 70 case kColorId_ResultsTableNormalText: |
| 68 case kColorId_ResultsTableHoveredText: | 71 case kColorId_ResultsTableHoveredText: |
| 69 case kColorId_ResultsTableSelectedText: | 72 case kColorId_ResultsTableSelectedText: |
| 70 return kResultsTableText; | 73 return kResultsTableText; |
| 71 case kColorId_ResultsTableNormalDimmedText: | 74 case kColorId_ResultsTableNormalDimmedText: |
| 72 case kColorId_ResultsTableHoveredDimmedText: | 75 case kColorId_ResultsTableHoveredDimmedText: |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 152 |
| 150 NOTREACHED(); | 153 NOTREACHED(); |
| 151 return gfx::kPlaceholderColor; | 154 return gfx::kPlaceholderColor; |
| 152 } | 155 } |
| 153 | 156 |
| 154 NativeThemeDarkAura::NativeThemeDarkAura() : NativeThemeAura(false) {} | 157 NativeThemeDarkAura::NativeThemeDarkAura() : NativeThemeAura(false) {} |
| 155 | 158 |
| 156 NativeThemeDarkAura::~NativeThemeDarkAura() {} | 159 NativeThemeDarkAura::~NativeThemeDarkAura() {} |
| 157 | 160 |
| 158 } // namespace ui | 161 } // namespace ui |
| OLD | NEW |