| 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/string_split.h" | 8 #include "base/string_split.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 SkColor IncreaseLightness(SkColor color, double percent) { | 60 SkColor IncreaseLightness(SkColor color, double percent) { |
| 61 color_utils::HSL result; | 61 color_utils::HSL result; |
| 62 color_utils::SkColorToHSL(color, &result); | 62 color_utils::SkColorToHSL(color, &result); |
| 63 result.l += (1 - result.l) * percent; | 63 result.l += (1 - result.l) * percent; |
| 64 return color_utils::HSLToSkColor(result, SkColorGetA(color)); | 64 return color_utils::HSLToSkColor(result, SkColorGetA(color)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Default colors. | 67 // Default colors. |
| 68 #if defined(USE_AURA) | 68 #if defined(USE_AURA) |
| 69 // TODO(jamescook): Revert this when Aura is using its own window frame | 69 // TODO(jamescook): Revert this when Aura is using its own window frame |
| 70 // implementation by default, specifically BrowserNonClientFrameViewAura. | 70 // implementation by default, specifically BrowserNonClientFrameViewAsh. |
| 71 const SkColor kDefaultColorFrame = SkColorSetRGB(109, 109, 109); | 71 const SkColor kDefaultColorFrame = SkColorSetRGB(109, 109, 109); |
| 72 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(176, 176, 176); | 72 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(176, 176, 176); |
| 73 #else | 73 #else |
| 74 const SkColor kDefaultColorFrame = SkColorSetRGB(66, 116, 201); | 74 const SkColor kDefaultColorFrame = SkColorSetRGB(66, 116, 201); |
| 75 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(161, 182, 228); | 75 const SkColor kDefaultColorFrameInactive = SkColorSetRGB(161, 182, 228); |
| 76 #endif // USE_AURA | 76 #endif // USE_AURA |
| 77 const SkColor kDefaultColorFrameIncognito = SkColorSetRGB(83, 106, 139); | 77 const SkColor kDefaultColorFrameIncognito = SkColorSetRGB(83, 106, 139); |
| 78 const SkColor kDefaultColorFrameIncognitoInactive = | 78 const SkColor kDefaultColorFrameIncognitoInactive = |
| 79 SkColorSetRGB(126, 139, 156); | 79 SkColorSetRGB(126, 139, 156); |
| 80 #if defined(OS_MACOSX) | 80 #if defined(OS_MACOSX) |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 void ThemeService::OnInfobarDisplayed() { | 673 void ThemeService::OnInfobarDisplayed() { |
| 674 number_of_infobars_++; | 674 number_of_infobars_++; |
| 675 } | 675 } |
| 676 | 676 |
| 677 void ThemeService::OnInfobarDestroyed() { | 677 void ThemeService::OnInfobarDestroyed() { |
| 678 number_of_infobars_--; | 678 number_of_infobars_--; |
| 679 | 679 |
| 680 if (number_of_infobars_ == 0) | 680 if (number_of_infobars_ == 0) |
| 681 RemoveUnusedThemes(); | 681 RemoveUnusedThemes(); |
| 682 } | 682 } |
| OLD | NEW |