Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/themes/theme_service.cc

Issue 2159833002: Revert of Replace CONTROL_BACKGROUND and DETACHED_BOOKMARK_BAR_BACKGROUND by COLOR_NTP_BACKGROUND (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/chrome_style.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 const color_utils::HSL kTint = {-1, -1, 0.42975}; 461 const color_utils::HSL kTint = {-1, -1, 0.42975};
462 const color_utils::HSL kTintIncognito = {-1, -1, 0.34375}; 462 const color_utils::HSL kTintIncognito = {-1, -1, 0.34375};
463 return color_utils::HSLShift( 463 return color_utils::HSLShift(
464 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito), 464 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito),
465 incognito ? kTintIncognito : kTint); 465 incognito ? kTintIncognito : kTint);
466 } 466 }
467 case ThemeProperties::COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT: 467 case ThemeProperties::COLOR_BOOKMARK_BAR_INSTRUCTIONS_TEXT:
468 if (UsingDefaultTheme()) 468 if (UsingDefaultTheme())
469 break; 469 break;
470 return GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito); 470 return GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito);
471 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND:
472 if (UsingDefaultTheme())
473 break;
474 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito);
471 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: 475 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR:
472 if (UsingDefaultTheme()) 476 if (UsingDefaultTheme())
473 break; 477 break;
474 // Use 50% of bookmark text color as separator color. 478 // Use 50% of bookmark text color as separator color.
475 return SkColorSetA( 479 return SkColorSetA(
476 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); 480 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128);
477 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT: 481 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT:
478 return IncreaseLightness(GetColor(kNtpText, incognito), 0.30); 482 return IncreaseLightness(GetColor(kNtpText, incognito), 0.30);
479 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: 483 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER:
480 return GetColor(kNtpText, incognito); 484 return GetColor(kNtpText, incognito);
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 873
870 #if defined(ENABLE_SUPERVISED_USERS) 874 #if defined(ENABLE_SUPERVISED_USERS)
871 bool ThemeService::IsSupervisedUser() const { 875 bool ThemeService::IsSupervisedUser() const {
872 return profile_->IsSupervised(); 876 return profile_->IsSupervised();
873 } 877 }
874 878
875 void ThemeService::SetSupervisedUserTheme() { 879 void ThemeService::SetSupervisedUserTheme() {
876 SetCustomDefaultTheme(new SupervisedUserTheme); 880 SetCustomDefaultTheme(new SupervisedUserTheme);
877 } 881 }
878 #endif 882 #endif
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/chrome_style.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698