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

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

Issue 2248103002: Reland: 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: Properly handle incognito browsing Created 4 years, 4 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
Index: chrome/browser/themes/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 66d2c63b0ca728c11c23791d7d5e9e43f29ae0f6..58e771e6eb34fa75ffd0419b54778123924ce2a4 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -49,7 +49,7 @@ namespace {
// theme packs that aren't int-equal to this. Increment this number if you
// change default theme assets or if you need themes to recreate their generated
// images (which are cached).
-const int kThemePackVersion = 42;
+const int kThemePackVersion = 43;
// IDs that are in the DataPack won't clash with the positive integer
// uint16_t. kHeaderID should always have the maximum value because we want the
@@ -791,9 +791,12 @@ bool BrowserThemePack::GetColor(int id, SkColor* color) const {
if (colors_[i].id == id) {
*color = colors_[i].color;
// The theme provider is intentionally made to ignore alpha for toolbar
- // color, as we don't want to allow transparent toolbars.
- if (id == ThemeProperties::COLOR_TOOLBAR)
+ // color, as we don't want to allow transparent toolbars. Same for the
+ // ntp background color.
+ if (id == ThemeProperties::COLOR_TOOLBAR ||
+ id == ThemeProperties::COLOR_NTP_BACKGROUND) {
*color = SkColorSetA(*color, SK_AlphaOPAQUE);
+ }
return true;
}
}
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | chrome/browser/themes/theme_properties.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698