| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_theme_provider.h" | 5 #include "chrome/browser/themes/browser_theme_provider.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/extensions/extensions_service.h" | 10 #include "chrome/browser/extensions/extensions_service.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // older ones if they are missing. | 231 // older ones if they are missing. |
| 232 switch (id) { | 232 switch (id) { |
| 233 case COLOR_NTP_SECTION_HEADER_TEXT: | 233 case COLOR_NTP_SECTION_HEADER_TEXT: |
| 234 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.30); | 234 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.30); |
| 235 case COLOR_NTP_SECTION_HEADER_TEXT_HOVER: | 235 case COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |
| 236 return GetColor(COLOR_NTP_TEXT); | 236 return GetColor(COLOR_NTP_TEXT); |
| 237 case COLOR_NTP_SECTION_HEADER_RULE: | 237 case COLOR_NTP_SECTION_HEADER_RULE: |
| 238 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.70); | 238 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.70); |
| 239 case COLOR_NTP_SECTION_HEADER_RULE_LIGHT: | 239 case COLOR_NTP_SECTION_HEADER_RULE_LIGHT: |
| 240 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.86); | 240 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.86); |
| 241 case COLOR_NTP_TEXT_LIGHT: |
| 242 return IncreaseLightness(GetColor(COLOR_NTP_TEXT), 0.40); |
| 241 } | 243 } |
| 242 | 244 |
| 243 return GetDefaultColor(id); | 245 return GetDefaultColor(id); |
| 244 } | 246 } |
| 245 | 247 |
| 246 bool BrowserThemeProvider::GetDisplayProperty(int id, int* result) const { | 248 bool BrowserThemeProvider::GetDisplayProperty(int id, int* result) const { |
| 247 if (theme_pack_.get()) | 249 if (theme_pack_.get()) |
| 248 return theme_pack_->GetDisplayProperty(id, result); | 250 return theme_pack_->GetDisplayProperty(id, result); |
| 249 | 251 |
| 250 return GetDefaultDisplayProperty(id, result); | 252 return GetDefaultDisplayProperty(id, result); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 void BrowserThemeProvider::OnInfobarDisplayed() { | 622 void BrowserThemeProvider::OnInfobarDisplayed() { |
| 621 number_of_infobars_++; | 623 number_of_infobars_++; |
| 622 } | 624 } |
| 623 | 625 |
| 624 void BrowserThemeProvider::OnInfobarDestroyed() { | 626 void BrowserThemeProvider::OnInfobarDestroyed() { |
| 625 number_of_infobars_--; | 627 number_of_infobars_--; |
| 626 | 628 |
| 627 if (number_of_infobars_ == 0) | 629 if (number_of_infobars_ == 0) |
| 628 RemoveUnusedThemes(); | 630 RemoveUnusedThemes(); |
| 629 } | 631 } |
| OLD | NEW |