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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); | 170 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.30); |
171 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: | 171 case Properties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |
172 return GetColor(Properties::COLOR_NTP_TEXT); | 172 return GetColor(Properties::COLOR_NTP_TEXT); |
173 case Properties::COLOR_NTP_SECTION_HEADER_RULE: | 173 case Properties::COLOR_NTP_SECTION_HEADER_RULE: |
174 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); | 174 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.70); |
175 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: | 175 case Properties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT: |
176 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); | 176 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.86); |
177 case Properties::COLOR_NTP_TEXT_LIGHT: | 177 case Properties::COLOR_NTP_TEXT_LIGHT: |
178 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); | 178 return IncreaseLightness(GetColor(Properties::COLOR_NTP_TEXT), 0.40); |
179 case Properties::COLOR_MANAGED_USER_LABEL: | 179 case Properties::COLOR_MANAGED_USER_LABEL: |
180 return color_utils::GetReadableColor( | 180 // TODO(akuegel): Use GetReadableColor() once we want to support other |
181 SkColorSetRGB(231, 245, 255), | 181 // themes as well. |
182 GetColor(Properties::COLOR_MANAGED_USER_LABEL_BACKGROUND)); | 182 return SkColorSetRGB(231, 245, 255); |
183 case Properties::COLOR_MANAGED_USER_LABEL_BACKGROUND: | 183 case Properties::COLOR_MANAGED_USER_LABEL_BACKGROUND: |
184 // TODO(akuegel): Replace this constant by a color calculated from the | 184 // TODO(akuegel): Replace this constant by a color calculated from the |
185 // frame color once the default managed user theme is finished and we | 185 // frame color once the default managed user theme is finished and we |
186 // allow managed users to install other themes. | 186 // allow managed users to install other themes. |
187 return SkColorSetRGB(108, 167, 210); | 187 return SkColorSetRGB(108, 167, 210); |
188 } | 188 } |
189 | 189 |
190 return Properties::GetDefaultColor(id); | 190 return Properties::GetDefaultColor(id); |
191 } | 191 } |
192 | 192 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 void ThemeService::OnInfobarDestroyed() { | 456 void ThemeService::OnInfobarDestroyed() { |
457 number_of_infobars_--; | 457 number_of_infobars_--; |
458 | 458 |
459 if (number_of_infobars_ == 0) | 459 if (number_of_infobars_ == 0) |
460 RemoveUnusedThemes(); | 460 RemoveUnusedThemes(); |
461 } | 461 } |
462 | 462 |
463 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { | 463 ThemeSyncableService* ThemeService::GetThemeSyncableService() const { |
464 return theme_syncable_service_.get(); | 464 return theme_syncable_service_.get(); |
465 } | 465 } |
OLD | NEW |