OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 5 |
6 /** | 6 /** |
7 * @fileoverview The local InstantExtended NTP. | 7 * @fileoverview The local InstantExtended NTP. |
8 */ | 8 */ |
9 | 9 |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 info.imageHorizontalAlignment, | 192 info.imageHorizontalAlignment, |
193 info.imageVerticalAlignment].join(' ').trim(); | 193 info.imageVerticalAlignment].join(' ').trim(); |
194 | 194 |
195 document.body.style.background = background; | 195 document.body.style.background = background; |
196 document.body.classList.toggle(CLASSES.ALTERNATE_LOGO, info.alternateLogo); | 196 document.body.classList.toggle(CLASSES.ALTERNATE_LOGO, info.alternateLogo); |
197 updateThemeAttribution(info.attributionUrl, info.imageHorizontalAlignment); | 197 updateThemeAttribution(info.attributionUrl, info.imageHorizontalAlignment); |
198 setCustomThemeStyle(info); | 198 setCustomThemeStyle(info); |
199 | 199 |
200 // Inform the most visited iframe of the new theme. | 200 // Inform the most visited iframe of the new theme. |
201 var themeinfo = {cmd: 'updateTheme'}; | 201 var themeinfo = {cmd: 'updateTheme'}; |
202 if (!info.usingDefaultTheme) { | 202 themeinfo.tileBorderColor = convertToRGBAColor(info.sectionBorderColorRgba); |
Marc Treib
2017/02/17 17:55:49
Here's where the NTP failed to pass the border col
| |
203 themeinfo.tileBorderColor = convertToRGBAColor(info.sectionBorderColorRgba); | 203 themeinfo.tileHoverBorderColor = convertToRGBAColor(info.headerColorRgba); |
204 themeinfo.tileHoverBorderColor = convertToRGBAColor(info.headerColorRgba); | |
205 } | |
206 themeinfo.isThemeDark = isThemeDark; | 204 themeinfo.isThemeDark = isThemeDark; |
207 | 205 |
208 var titleColor = NTP_DESIGN.titleColor; | 206 var titleColor = NTP_DESIGN.titleColor; |
209 if (!info.usingDefaultTheme && info.textColorRgba) { | 207 if (!info.usingDefaultTheme && info.textColorRgba) { |
210 titleColor = info.textColorRgba; | 208 titleColor = info.textColorRgba; |
211 } else if (isThemeDark) { | 209 } else if (isThemeDark) { |
212 titleColor = NTP_DESIGN.titleColorAgainstDark; | 210 titleColor = NTP_DESIGN.titleColorAgainstDark; |
213 } | 211 } |
214 themeinfo.tileTitleColor = convertToRGBAColor(titleColor); | 212 themeinfo.tileTitleColor = convertToRGBAColor(titleColor); |
215 | 213 |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 return { | 671 return { |
674 init: init, // Exposed for testing. | 672 init: init, // Exposed for testing. |
675 listen: listen | 673 listen: listen |
676 }; | 674 }; |
677 | 675 |
678 } | 676 } |
679 | 677 |
680 if (!window.localNTPUnitTest) { | 678 if (!window.localNTPUnitTest) { |
681 LocalNTP().listen(); | 679 LocalNTP().listen(); |
682 } | 680 } |
OLD | NEW |