| 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/themes/theme_service.h" | 5 #include "chrome/browser/themes/theme_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 case Properties::COLOR_NTP_SECTION_HEADER_TEXT: | 224 case Properties::COLOR_NTP_SECTION_HEADER_TEXT: |
| 225 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); | 225 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); |
| 226 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: | 226 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |
| 227 return GetColor(Properties::COLOR_NTP_TEXT); | 227 return GetColor(Properties::COLOR_NTP_TEXT); |
| 228 case Properties::COLOR_NTP_SECTION_HEADER_RULE: | 228 case Properties::COLOR_NTP_SECTION_HEADER_RULE: |
| 229 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); | 229 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); |
| 230 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: | 230 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: |
| 231 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); | 231 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); |
| 232 case Properties::COLOR_NTP_TEXT_LIGHT: | 232 case Properties::COLOR_NTP_TEXT_LIGHT: |
| 233 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); | 233 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); |
| 234 case Properties::COLOR_TAB_ICON: { | |
| 235 SkColor base_color; | |
| 236 bool found_color = ui::CommonThemeGetSystemColor( | |
| 237 ui::NativeTheme::kColorId_ChromeIconGrey, &base_color); | |
| 238 DCHECK(found_color); | |
| 239 color_utils::HSL hsl = GetTint(Properties::TINT_BUTTONS); | |
| 240 return color_utils::HSLShift(base_color, hsl); | |
| 241 } | |
| 242 case Properties::COLOR_THROBBER_SPINNING: | 234 case Properties::COLOR_THROBBER_SPINNING: |
| 243 case Properties::COLOR_THROBBER_WAITING: { | 235 case Properties::COLOR_THROBBER_WAITING: { |
| 244 SkColor base_color; | 236 SkColor base_color; |
| 245 bool found_color = ui::CommonThemeGetSystemColor( | 237 bool found_color = ui::CommonThemeGetSystemColor( |
| 246 id == Properties::COLOR_THROBBER_SPINNING | 238 id == Properties::COLOR_THROBBER_SPINNING |
| 247 ? ui::NativeTheme::kColorId_ThrobberSpinningColor | 239 ? ui::NativeTheme::kColorId_ThrobberSpinningColor |
| 248 : ui::NativeTheme::kColorId_ThrobberWaitingColor, | 240 : ui::NativeTheme::kColorId_ThrobberWaitingColor, |
| 249 &base_color); | 241 &base_color); |
| 250 DCHECK(found_color); | 242 DCHECK(found_color); |
| 251 color_utils::HSL hsl = GetTint(Properties::TINT_BUTTONS); | 243 color_utils::HSL hsl = GetTint(Properties::TINT_BUTTONS); |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 void ThemeService::OnInfobarDestroyed() { | 682 void ThemeService::OnInfobarDestroyed() { |
| 691 number_of_infobars_--; | 683 number_of_infobars_--; |
| 692 | 684 |
| 693 if (number_of_infobars_ == 0) | 685 if (number_of_infobars_ == 0) |
| 694 RemoveUnusedThemes(false); | 686 RemoveUnusedThemes(false); |
| 695 } | 687 } |
| 696 | 688 |
| 697 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { | 689 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { |
| 698 return theme_syncable_service_.get(); | 690 return theme_syncable_service_.get(); |
| 699 } | 691 } |
| OLD | NEW |