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

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

Issue 2667753004: Themes: Remove unused IDs from ThemeProperties (Closed)
Patch Set: Remove {} and update/add comments Created 3 years, 10 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
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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: 480 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND:
481 if (UsingDefaultTheme()) 481 if (UsingDefaultTheme())
482 break; 482 break;
483 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); 483 return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito);
484 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: 484 case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR:
485 if (UsingDefaultTheme()) 485 if (UsingDefaultTheme())
486 break; 486 break;
487 // Use 50% of bookmark text color as separator color. 487 // Use 50% of bookmark text color as separator color.
488 return SkColorSetA( 488 return SkColorSetA(
489 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); 489 GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128);
490 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT:
491 return IncreaseLightness(GetColor(kNtpText, incognito), 0.30);
492 case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER:
493 return GetColor(kNtpText, incognito);
494 case ThemeProperties::COLOR_NTP_SECTION_HEADER_RULE:
495 return IncreaseLightness(GetColor(kNtpText, incognito), 0.70);
496 case ThemeProperties::COLOR_NTP_SECTION_HEADER_RULE_LIGHT:
497 return IncreaseLightness(GetColor(kNtpText, incognito), 0.86);
498 case ThemeProperties::COLOR_NTP_TEXT_LIGHT: 490 case ThemeProperties::COLOR_NTP_TEXT_LIGHT:
499 return IncreaseLightness(GetColor(kNtpText, incognito), 0.40); 491 return IncreaseLightness(GetColor(kNtpText, incognito), 0.40);
500 case ThemeProperties::COLOR_TAB_THROBBER_SPINNING: 492 case ThemeProperties::COLOR_TAB_THROBBER_SPINNING:
501 case ThemeProperties::COLOR_TAB_THROBBER_WAITING: { 493 case ThemeProperties::COLOR_TAB_THROBBER_WAITING: {
502 SkColor base_color = 494 SkColor base_color =
503 ui::GetAuraColor(id == ThemeProperties::COLOR_TAB_THROBBER_SPINNING 495 ui::GetAuraColor(id == ThemeProperties::COLOR_TAB_THROBBER_SPINNING
504 ? ui::NativeTheme::kColorId_ThrobberSpinningColor 496 ? ui::NativeTheme::kColorId_ThrobberSpinningColor
505 : ui::NativeTheme::kColorId_ThrobberWaitingColor, 497 : ui::NativeTheme::kColorId_ThrobberWaitingColor,
506 nullptr); 498 nullptr);
507 color_utils::HSL hsl = GetTint(ThemeProperties::TINT_BUTTONS, incognito); 499 color_utils::HSL hsl = GetTint(ThemeProperties::TINT_BUTTONS, incognito);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 867
876 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 868 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
877 bool ThemeService::IsSupervisedUser() const { 869 bool ThemeService::IsSupervisedUser() const {
878 return profile_->IsSupervised(); 870 return profile_->IsSupervised();
879 } 871 }
880 872
881 void ThemeService::SetSupervisedUserTheme() { 873 void ThemeService::SetSupervisedUserTheme() {
882 SetCustomDefaultTheme(new SupervisedUserTheme); 874 SetCustomDefaultTheme(new SupervisedUserTheme);
883 } 875 }
884 #endif 876 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698