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

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 1338103002: Create c/b/ui/views/layout_constants.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/views/layout_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 876985d5c60f0e824d6f34951ec60e25dc1b3c3d..75827d322d4456956ac0b79e9265c9fd2201b812 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -291,18 +291,22 @@ int ThemeService::GetDisplayProperty(int id) const {
return result;
}
- if (id == Properties::NTP_LOGO_ALTERNATE) {
- if (UsingDefaultTheme() || UsingSystemTheme())
- return 0; // Colorful logo.
+ switch (id) {
+ case Properties::NTP_BACKGROUND_ALIGNMENT:
+ return Properties::ALIGN_CENTER;
- if (HasCustomImage(IDR_THEME_NTP_BACKGROUND))
- return 1; // White logo.
+ case Properties::NTP_BACKGROUND_TILING:
+ return Properties::NO_REPEAT;
- SkColor background_color = GetColor(Properties::COLOR_NTP_BACKGROUND);
- return IsColorGrayscale(background_color) ? 0 : 1;
- }
+ case Properties::NTP_LOGO_ALTERNATE:
+ return UsingDefaultTheme() || UsingSystemTheme() ||
+ (!HasCustomImage(IDR_THEME_NTP_BACKGROUND) &&
+ IsColorGrayscale(GetColor(Properties::COLOR_NTP_BACKGROUND))) ?
+ 0 : 1;
- return Properties::GetDefaultDisplayProperty(id);
+ default:
+ return -1;
+ }
}
bool ThemeService::ShouldUseNativeFrame() const {
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/views/layout_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698