| 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 kTextfieldSelectionBackgroundFocused = |
| 25 SkColorSetA(gfx::kGoogleBlue700, 0xCC); | 25 SkColorSetA(gfx::kGoogleBlue700, 0xCC); |
| 26 static const SkColor kTextfieldSelectionBackgroundUnfocused = |
| 27 SkColorSetA(SK_ColorWHITE, 0xCC); |
| 26 | 28 |
| 27 static const SkColor kResultsTableNormalBackground = | 29 static const SkColor kResultsTableNormalBackground = |
| 28 SkColorSetRGB(0x28, 0x28, 0x28); | 30 SkColorSetRGB(0x28, 0x28, 0x28); |
| 29 static const SkColor kResultsTableText = SK_ColorWHITE; | 31 static const SkColor kResultsTableText = SK_ColorWHITE; |
| 30 static const SkColor kResultsTableDimmedText = | 32 static const SkColor kResultsTableDimmedText = |
| 31 SkColorSetA(kResultsTableText, 0x80); | 33 SkColorSetA(kResultsTableText, 0x80); |
| 32 | 34 |
| 33 switch (color_id) { | 35 switch (color_id) { |
| 34 // Window | 36 // Window |
| 35 case kColorId_WindowBackground: | 37 case kColorId_WindowBackground: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 53 return gfx::kGoogleBlue300; | 55 return gfx::kGoogleBlue300; |
| 54 | 56 |
| 55 // Textfield | 57 // Textfield |
| 56 case kColorId_TextfieldDefaultColor: | 58 case kColorId_TextfieldDefaultColor: |
| 57 case kColorId_TextfieldSelectionColor: | 59 case kColorId_TextfieldSelectionColor: |
| 58 return kTextfieldDefaultColor; | 60 return kTextfieldDefaultColor; |
| 59 case kColorId_TextfieldDefaultBackground: | 61 case kColorId_TextfieldDefaultBackground: |
| 60 return kTextfieldDefaultBackground; | 62 return kTextfieldDefaultBackground; |
| 61 case kColorId_TextfieldSelectionBackgroundFocused: | 63 case kColorId_TextfieldSelectionBackgroundFocused: |
| 62 return kTextfieldSelectionBackgroundFocused; | 64 return kTextfieldSelectionBackgroundFocused; |
| 65 case kColorId_TextfieldSelectionBackgroundUnfocused: |
| 66 return kTextfieldSelectionBackgroundUnfocused; |
| 63 | 67 |
| 64 // Results Tables | 68 // Results Tables |
| 65 case kColorId_ResultsTableNormalBackground: | 69 case kColorId_ResultsTableNormalBackground: |
| 66 return kResultsTableNormalBackground; | 70 return kResultsTableNormalBackground; |
| 67 case kColorId_ResultsTableNormalText: | 71 case kColorId_ResultsTableNormalText: |
| 68 case kColorId_ResultsTableHoveredText: | 72 case kColorId_ResultsTableHoveredText: |
| 69 case kColorId_ResultsTableSelectedText: | 73 case kColorId_ResultsTableSelectedText: |
| 70 return kResultsTableText; | 74 return kResultsTableText; |
| 71 case kColorId_ResultsTableNormalDimmedText: | 75 case kColorId_ResultsTableNormalDimmedText: |
| 72 case kColorId_ResultsTableHoveredDimmedText: | 76 case kColorId_ResultsTableHoveredDimmedText: |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 153 |
| 150 NOTREACHED(); | 154 NOTREACHED(); |
| 151 return gfx::kPlaceholderColor; | 155 return gfx::kPlaceholderColor; |
| 152 } | 156 } |
| 153 | 157 |
| 154 NativeThemeDarkAura::NativeThemeDarkAura() {} | 158 NativeThemeDarkAura::NativeThemeDarkAura() {} |
| 155 | 159 |
| 156 NativeThemeDarkAura::~NativeThemeDarkAura() {} | 160 NativeThemeDarkAura::~NativeThemeDarkAura() {} |
| 157 | 161 |
| 158 } // namespace ui | 162 } // namespace ui |
| OLD | NEW |