| 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 // Single iframe for NTP tiles. | 5 // Single iframe for NTP tiles. |
| 6 (function() { | 6 (function() { |
| 7 'use strict'; | 7 'use strict'; |
| 8 | 8 |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 | 190 |
| 191 /** | 191 /** |
| 192 * Handler for the 'show' message from the host page. | 192 * Handler for the 'show' message from the host page. |
| 193 * @param {object} info Data received in the message. | 193 * @param {object} info Data received in the message. |
| 194 */ | 194 */ |
| 195 var showTiles = function(info) { | 195 var showTiles = function(info) { |
| 196 logEvent(LOG_TYPE.NTP_ALL_TILES_RECEIVED); | 196 logEvent(LOG_TYPE.NTP_ALL_TILES_RECEIVED); |
| 197 countLoad(); | 197 countLoad(); |
| 198 hideOverflowTiles(info); | 198 hideOverflowTiles(info); |
| 199 } | 199 }; |
| 200 | 200 |
| 201 | 201 |
| 202 /** | 202 /** |
| 203 * Handler for the 'updateTheme' message from the host page. | 203 * Handler for the 'updateTheme' message from the host page. |
| 204 * @param {object} info Data received in the message. | 204 * @param {object} info Data received in the message. |
| 205 */ | 205 */ |
| 206 var updateTheme = function(info) { | 206 var updateTheme = function(info) { |
| 207 var themeStyle = []; | 207 var themeStyle = []; |
| 208 | 208 |
| 209 if (info.tileBorderColor) { | 209 if (info.tileBorderColor) { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 var html = document.querySelector('html'); | 548 var html = document.querySelector('html'); |
| 549 html.dir = 'rtl'; | 549 html.dir = 'rtl'; |
| 550 } | 550 } |
| 551 | 551 |
| 552 window.addEventListener('message', handlePostMessage); | 552 window.addEventListener('message', handlePostMessage); |
| 553 }; | 553 }; |
| 554 | 554 |
| 555 | 555 |
| 556 window.addEventListener('DOMContentLoaded', init); | 556 window.addEventListener('DOMContentLoaded', init); |
| 557 })(); | 557 })(); |
| OLD | NEW |