| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 case Properties::COLOR_NTP_SECTION_HEADER_TEXT: | 225 case Properties::COLOR_NTP_SECTION_HEADER_TEXT: |
| 226 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); | 226 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); |
| 227 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: | 227 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |
| 228 return GetColor(Properties::COLOR_NTP_TEXT); | 228 return GetColor(Properties::COLOR_NTP_TEXT); |
| 229 case Properties::COLOR_NTP_SECTION_HEADER_RULE: | 229 case Properties::COLOR_NTP_SECTION_HEADER_RULE: |
| 230 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); | 230 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); |
| 231 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: | 231 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: |
| 232 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); | 232 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); |
| 233 case Properties::COLOR_NTP_TEXT_LIGHT: | 233 case Properties::COLOR_NTP_TEXT_LIGHT: |
| 234 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); | 234 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); |
| 235 case Properties::COLOR_TAB_ICON: | |
| 236 return color_utils::HSLShift(gfx::kChromeIconGrey, | |
| 237 GetTint(Properties::TINT_BUTTONS)); | |
| 238 case Properties::COLOR_THROBBER_SPINNING: | 235 case Properties::COLOR_THROBBER_SPINNING: |
| 239 case Properties::COLOR_THROBBER_WAITING: { | 236 case Properties::COLOR_THROBBER_WAITING: { |
| 240 SkColor base_color; | 237 SkColor base_color; |
| 241 bool found_color = ui::CommonThemeGetSystemColor( | 238 bool found_color = ui::CommonThemeGetSystemColor( |
| 242 id == Properties::COLOR_THROBBER_SPINNING | 239 id == Properties::COLOR_THROBBER_SPINNING |
| 243 ? ui::NativeTheme::kColorId_ThrobberSpinningColor | 240 ? ui::NativeTheme::kColorId_ThrobberSpinningColor |
| 244 : ui::NativeTheme::kColorId_ThrobberWaitingColor, | 241 : ui::NativeTheme::kColorId_ThrobberWaitingColor, |
| 245 &base_color); | 242 &base_color); |
| 246 DCHECK(found_color); | 243 DCHECK(found_color); |
| 247 color_utils::HSL hsl = GetTint(Properties::TINT_BUTTONS); | 244 color_utils::HSL hsl = GetTint(Properties::TINT_BUTTONS); |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 void ThemeService::OnInfobarDestroyed() { | 683 void ThemeService::OnInfobarDestroyed() { |
| 687 number_of_infobars_--; | 684 number_of_infobars_--; |
| 688 | 685 |
| 689 if (number_of_infobars_ == 0) | 686 if (number_of_infobars_ == 0) |
| 690 RemoveUnusedThemes(false); | 687 RemoveUnusedThemes(false); |
| 691 } | 688 } |
| 692 | 689 |
| 693 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { | 690 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { |
| 694 return theme_syncable_service_.get(); | 691 return theme_syncable_service_.get(); |
| 695 } | 692 } |
| OLD | NEW |