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_BOOKMARK_BAR_INSTRUCTIONS_TEXT: |
| 464 if (UsingDefaultTheme()) |
| 465 break; |
| 466 return GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito); |
463 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: | 467 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: |
464 if (UsingDefaultTheme()) | 468 if (UsingDefaultTheme()) |
465 break; | 469 break; |
466 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); | 470 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); |
467 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: | 471 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: |
468 if (UsingDefaultTheme()) | 472 if (UsingDefaultTheme()) |
469 break; | 473 break; |
470 // Use 50% of bookmark text color as separator color. | 474 // Use 50% of bookmark text color as separator color. |
471 return SkColorSetA( | 475 return SkColorSetA( |
472 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); | 476 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 | 869 |
866 #if defined(ENABLE_SUPERVISED_USERS) | 870 #if defined(ENABLE_SUPERVISED_USERS) |
867 bool ThemeService::IsSupervisedUser() const { | 871 bool ThemeService::IsSupervisedUser() const { |
868 return profile_->IsSupervised(); | 872 return profile_->IsSupervised(); |
869 } | 873 } |
870 | 874 |
871 void ThemeService::SetSupervisedUserTheme() { | 875 void ThemeService::SetSupervisedUserTheme() { |
872 SetCustomDefaultTheme(new SupervisedUserTheme); | 876 SetCustomDefaultTheme(new SupervisedUserTheme); |
873 } | 877 } |
874 #endif | 878 #endif |
OLD | NEW |