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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview New tab page 6 * @fileoverview New tab page
7 * This is the main code for the new tab page used by touch-enabled Chrome 7 * This is the main code for the new tab page used by touch-enabled Chrome
8 * browsers. For now this is still a prototype. 8 * browsers. For now this is still a prototype.
9 */ 9 */
10 10
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 /** 431 /**
432 * Timeout ID. 432 * Timeout ID.
433 * @type {number} 433 * @type {number}
434 */ 434 */
435 var notificationTimeout = 0; 435 var notificationTimeout = 0;
436 436
437 /** 437 /**
438 * Shows the notification bubble. 438 * Shows the notification bubble.
439 * @param {string|Node} message The notification message or node to use as 439 * @param {string|Node} message The notification message or node to use as
440 * message. 440 * message.
441 * @param {Array.<{text: string, action: function()}>} links An array of 441 * @param {Array<{text: string, action: function()}>} links An array of
442 * records describing the links in the notification. Each record should 442 * records describing the links in the notification. Each record should
443 * have a 'text' attribute (the display string) and an 'action' attribute 443 * have a 'text' attribute (the display string) and an 'action' attribute
444 * (a function to run when the link is activated). 444 * (a function to run when the link is activated).
445 * @param {Function=} opt_closeHandler The callback invoked if the user 445 * @param {Function=} opt_closeHandler The callback invoked if the user
446 * manually dismisses the notification. 446 * manually dismisses the notification.
447 * @param {number=} opt_timeout 447 * @param {number=} opt_timeout
448 */ 448 */
449 function showNotification(message, links, opt_closeHandler, opt_timeout) { 449 function showNotification(message, links, opt_closeHandler, opt_timeout) {
450 window.clearTimeout(notificationTimeout); 450 window.clearTimeout(notificationTimeout);
451 451
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 if (notificationContainer.classList.contains('inactive')) 546 if (notificationContainer.classList.contains('inactive'))
547 notificationContainer.hidden = true; 547 notificationContainer.hidden = true;
548 } 548 }
549 549
550 function setRecentlyClosedTabs(dataItems) { 550 function setRecentlyClosedTabs(dataItems) {
551 $('recently-closed-menu-button').dataItems = dataItems; 551 $('recently-closed-menu-button').dataItems = dataItems;
552 layoutFooter(); 552 layoutFooter();
553 } 553 }
554 554
555 /** 555 /**
556 * @param {Array.<PageData>} data 556 * @param {Array<PageData>} data
557 * @param {boolean} hasBlacklistedUrls 557 * @param {boolean} hasBlacklistedUrls
558 */ 558 */
559 function setMostVisitedPages(data, hasBlacklistedUrls) { 559 function setMostVisitedPages(data, hasBlacklistedUrls) {
560 newTabView.mostVisitedPage.data = data; 560 newTabView.mostVisitedPage.data = data;
561 cr.dispatchSimpleEvent(document, 'sectionready', true, true); 561 cr.dispatchSimpleEvent(document, 'sectionready', true, true);
562 } 562 }
563 563
564 function setSuggestionsPages(data, hasBlacklistedUrls) { 564 function setSuggestionsPages(data, hasBlacklistedUrls) {
565 newTabView.suggestionsPage.data = data; 565 newTabView.suggestionsPage.data = data;
566 } 566 }
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 setFaviconDominantColor: setFaviconDominantColor, 781 setFaviconDominantColor: setFaviconDominantColor,
782 showNotification: showNotification, 782 showNotification: showNotification,
783 themeChanged: themeChanged, 783 themeChanged: themeChanged,
784 updateLogin: updateLogin 784 updateLogin: updateLogin
785 }; 785 };
786 }); 786 });
787 787
788 document.addEventListener('DOMContentLoaded', ntp.onLoad); 788 document.addEventListener('DOMContentLoaded', ntp.onLoad);
789 789
790 var toCssPx = cr.ui.toCssPx; 790 var toCssPx = cr.ui.toCssPx;
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/most_visited_page.js ('k') | chrome/browser/resources/ntp4/other_sessions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698