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

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

Issue 2062353002: 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: Rebase and force opaque for color_ntp_background from the theme machinery 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 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 59a1b7fd2e6e66e0ce75ee3e0aac04362f677613..043dbee7e613c4986a2365f92f778d390fcaf68e 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
@@ -790,10 +790,15 @@ bool BrowserThemePack::GetColor(int id, SkColor* color) const {
for (size_t i = 0; i < kColorTableLength; ++i) {
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 = SkColorSetA(*color, SK_AlphaOPAQUE);
+ // The theme provider is intentionally made to ignore alpha for the
+ // following colors as we don't want to allow them to be transparent.
+ switch (id) {
+ case ThemeProperties::COLOR_TOOLBAR:
+ case ThemeProperties::COLOR_NTP_BACKGROUND:
Peter Kasting 2016/07/11 01:41:57 Nit: This is fine, but I probably would have just
Julien Isorce Samsung 2016/07/13 15:01:32 Done.
+ *color = SkColorSetA(*color, SK_AlphaOPAQUE);
+ break;
+ }
+
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698