| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // background tabs by darkening the foreground tab (toolbar) color. These | 453 // background tabs by darkening the foreground tab (toolbar) color. These |
| 454 // values are chosen to turn the default normal and incognito MD frame | 454 // values are chosen to turn the default normal and incognito MD frame |
| 455 // colors (0xf2f2f2 and 0x505050) into 0xd0d0d0 and 0x373737, | 455 // colors (0xf2f2f2 and 0x505050) into 0xd0d0d0 and 0x373737, |
| 456 // respectively. | 456 // respectively. |
| 457 const color_utils::HSL kTint = {-1, -1, 0.42975}; | 457 const color_utils::HSL kTint = {-1, -1, 0.42975}; |
| 458 const color_utils::HSL kTintIncognito = {-1, -1, 0.34375}; | 458 const color_utils::HSL kTintIncognito = {-1, -1, 0.34375}; |
| 459 return color_utils::HSLShift( | 459 return color_utils::HSLShift( |
| 460 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito), | 460 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito), |
| 461 incognito ? kTintIncognito : kTint); | 461 incognito ? kTintIncognito : kTint); |
| 462 } | 462 } |
| 463 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: | |
| 464 if (UsingDefaultTheme()) | |
| 465 break; | |
| 466 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); | |
| 467 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: | 463 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: |
| 468 if (UsingDefaultTheme()) | 464 if (UsingDefaultTheme()) |
| 469 break; | 465 break; |
| 470 // Use 50% of bookmark text color as separator color. | 466 // Use 50% of bookmark text color as separator color. |
| 471 return SkColorSetA( | 467 return SkColorSetA( |
| 472 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); | 468 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); |
| 473 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT: | 469 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT: |
| 474 return IncreaseLightness(GetColor(kNtpText, incognito), 0.30); | 470 return IncreaseLightness(GetColor(kNtpText, incognito), 0.30); |
| 475 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: | 471 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |
| 476 return GetColor(kNtpText, incognito); | 472 return GetColor(kNtpText, incognito); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 861 |
| 866 #if defined(ENABLE_SUPERVISED_USERS) | 862 #if defined(ENABLE_SUPERVISED_USERS) |
| 867 bool ThemeService::IsSupervisedUser() const { | 863 bool ThemeService::IsSupervisedUser() const { |
| 868 return profile_->IsSupervised(); | 864 return profile_->IsSupervised(); |
| 869 } | 865 } |
| 870 | 866 |
| 871 void ThemeService::SetSupervisedUserTheme() { | 867 void ThemeService::SetSupervisedUserTheme() { |
| 872 SetCustomDefaultTheme(new SupervisedUserTheme); | 868 SetCustomDefaultTheme(new SupervisedUserTheme); |
| 873 } | 869 } |
| 874 #endif | 870 #endif |
| OLD | NEW |