| 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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 } | 765 } |
| 766 | 766 |
| 767 var iframe = document.createElement('iframe'); | 767 var iframe = document.createElement('iframe'); |
| 768 iframe.id = 'mv-single'; | 768 iframe.id = 'mv-single'; |
| 769 var args = []; | 769 var args = []; |
| 770 | 770 |
| 771 if (searchboxApiHandle.rtl) | 771 if (searchboxApiHandle.rtl) |
| 772 args.push('rtl=1'); | 772 args.push('rtl=1'); |
| 773 if (window.configData.useIcons) | 773 if (window.configData.useIcons) |
| 774 args.push('icons=1'); | 774 args.push('icons=1'); |
| 775 if (NTP_DESIGN.numTitleLines > 1) |
| 776 args.push('ntl=' + NTP_DESIGN.numTitleLines); |
| 775 | 777 |
| 776 args.push('removeTooltip=' + | 778 args.push('removeTooltip=' + |
| 777 encodeURIComponent(configData.translatedStrings.removeThumbnailTooltip)); | 779 encodeURIComponent(configData.translatedStrings.removeThumbnailTooltip)); |
| 778 | 780 |
| 779 iframe.src = '//most-visited/single.html?' + args.join('&'); | 781 iframe.src = '//most-visited/single.html?' + args.join('&'); |
| 780 $(IDS.TILES).appendChild(iframe); | 782 $(IDS.TILES).appendChild(iframe); |
| 781 | 783 |
| 782 iframe.onload = function() { | 784 iframe.onload = function() { |
| 783 reloadTiles(); | 785 reloadTiles(); |
| 784 renderTheme(); | 786 renderTheme(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 797 | 799 |
| 798 return { | 800 return { |
| 799 init: init, | 801 init: init, |
| 800 listen: listen | 802 listen: listen |
| 801 }; | 803 }; |
| 802 } | 804 } |
| 803 | 805 |
| 804 if (!window.localNTPUnitTest) { | 806 if (!window.localNTPUnitTest) { |
| 805 LocalNTP().listen(); | 807 LocalNTP().listen(); |
| 806 } | 808 } |
| OLD | NEW |