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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 var themeinfo = {cmd: 'updateTheme'}; | 235 var themeinfo = {cmd: 'updateTheme'}; |
236 if (!info.usingDefaultTheme) { | 236 if (!info.usingDefaultTheme) { |
237 themeinfo.tileBorderColor = convertToRGBAColor(info.sectionBorderColorRgba); | 237 themeinfo.tileBorderColor = convertToRGBAColor(info.sectionBorderColorRgba); |
238 themeinfo.tileHoverBorderColor = convertToRGBAColor(info.headerColorRgba); | 238 themeinfo.tileHoverBorderColor = convertToRGBAColor(info.headerColorRgba); |
239 } | 239 } |
240 themeinfo.isThemeDark = isThemeDark; | 240 themeinfo.isThemeDark = isThemeDark; |
241 | 241 |
242 var titleColor = NTP_DESIGN.titleColor; | 242 var titleColor = NTP_DESIGN.titleColor; |
243 if (!info.usingDefaultTheme && info.textColorRgba) { | 243 if (!info.usingDefaultTheme && info.textColorRgba) { |
244 titleColor = convertToRRGGBBAAColor(info.textColorRgba); | 244 themeinfo.tileTitleColor = info.textColorRgba; |
245 } else if (isThemeDark) { | 245 } else if (isThemeDark) { |
246 NTP_DESIGN.titleColorAgainstDark; | 246 titleColor = NTP_DESIGN.titleColorAgainstDark; |
247 } | 247 } |
248 themeinfo.tileTitleColor = convertToRGBAColor(titleColor); | 248 themeinfo.tileTitleColor = convertToRGBAColor(titleColor); |
249 | 249 |
250 $('mv-single').contentWindow.postMessage(themeinfo, '*'); | 250 $('mv-single').contentWindow.postMessage(themeinfo, '*'); |
251 } | 251 } |
252 | 252 |
253 | 253 |
254 /** | 254 /** |
255 * Updates the NTP based on the current theme, then rerenders all tiles. | 255 * Updates the NTP based on the current theme, then rerenders all tiles. |
256 * @private | 256 * @private |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 | 786 |
787 return { | 787 return { |
788 init: init, | 788 init: init, |
789 listen: listen | 789 listen: listen |
790 }; | 790 }; |
791 } | 791 } |
792 | 792 |
793 if (!window.localNTPUnitTest) { | 793 if (!window.localNTPUnitTest) { |
794 LocalNTP().listen(); | 794 LocalNTP().listen(); |
795 } | 795 } |
OLD | NEW |