| Index: chrome/browser/resources/ntp4/new_tab.js
|
| diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
|
| index 8662374399d4f53fbd48cd04e7cac3a93b77e53a..f98b15e69571f657dd2b6307290d523efb87ea52 100644
|
| --- a/chrome/browser/resources/ntp4/new_tab.js
|
| +++ b/chrome/browser/resources/ntp4/new_tab.js
|
| @@ -56,6 +56,12 @@ cr.define('ntp4', function() {
|
| var dotList;
|
|
|
| /**
|
| + * The 'notification-container' element.
|
| + * @type {!Element|undefined}
|
| + */
|
| + var notificationContainer;
|
| +
|
| + /**
|
| * The left and right paging buttons.
|
| * @type {!Element|undefined}
|
| */
|
| @@ -155,6 +161,10 @@ cr.define('ntp4', function() {
|
| pageSwitcherEnd = getRequiredElement('page-switcher-end');
|
| ntp4.initializePageSwitcher(pageSwitcherEnd);
|
|
|
| + notificationContainer = getRequiredElement('notification-container');
|
| + notificationContainer.addEventListener(
|
| + 'webkitTransitionEnd', onNotificationTransitionEnd);
|
| +
|
| // Initialize the cardSlider without any cards at the moment
|
| var sliderFrame = getRequiredElement('card-slider-frame');
|
| cardSlider = new CardSlider(sliderFrame, pageList, sliderFrame.offsetWidth);
|
| @@ -711,7 +721,8 @@ cr.define('ntp4', function() {
|
| };
|
|
|
| var timeout = opt_timeout || 10000;
|
| - $('notification').classList.remove('inactive');
|
| + notificationContainer.hidden = false;
|
| + notificationContainer.classList.remove('inactive');
|
| notificationTimeout_ = window.setTimeout(hideNotification, timeout);
|
| }
|
|
|
| @@ -719,7 +730,16 @@ cr.define('ntp4', function() {
|
| * Hide the notification bubble.
|
| */
|
| function hideNotification() {
|
| - $('notification').classList.add('inactive');
|
| + notificationContainer.classList.add('inactive');
|
| + }
|
| +
|
| + /**
|
| + * When done fading out, set hidden to true so the notification can't be
|
| + * tabbed to or clicked.
|
| + */
|
| + function onNotificationTransitionEnd(e) {
|
| + if (notificationContainer.classList.contains('inactive'));
|
| + notificationContainer.hidden = true;
|
| }
|
|
|
| function setRecentlyClosedTabs(dataItems) {
|
|
|