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

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

Issue 7670073: ntp4: disable animations for pages that are off screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/tile_page.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 // Tell the slider about the pages 320 // Tell the slider about the pages
321 updateSliderCards(); 321 updateSliderCards();
322 322
323 if (highlightApp) 323 if (highlightApp)
324 appAdded(highlightApp); 324 appAdded(highlightApp);
325 325
326 // Mark the current page 326 // Mark the current page
327 dots[cardSlider.currentCard].classList.add('selected'); 327 dots[cardSlider.currentCard].classList.add('selected');
328 logEvent('apps.layout: ' + (Date.now() - startTime)); 328 logEvent('apps.layout: ' + (Date.now() - startTime));
329
330 document.documentElement.classList.remove('starting-up');
329 } 331 }
330 332
331 /** 333 /**
332 * Called by chrome when a new app has been added to chrome. 334 * Called by chrome when a new app has been added to chrome.
333 * @param {Object} app A data structure full of relevant information for the 335 * @param {Object} app A data structure full of relevant information for the
334 * app. 336 * app.
335 */ 337 */
336 function appAdded(app) { 338 function appAdded(app) {
337 var pageIndex = app.page_index || 0; 339 var pageIndex = app.page_index || 0;
338 assert(pageIndex == 0, 'pageIndex != 0 not implemented'); 340 assert(pageIndex == 0, 'pageIndex != 0 not implemented');
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // TODO(estade): update the content handlers to use ntp namespace instead of 742 // TODO(estade): update the content handlers to use ntp namespace instead of
741 // making these global. 743 // making these global.
742 var assert = ntp4.assert; 744 var assert = ntp4.assert;
743 var getAppsCallback = ntp4.getAppsCallback; 745 var getAppsCallback = ntp4.getAppsCallback;
744 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback; 746 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback;
745 var themeChanged = ntp4.themeChanged; 747 var themeChanged = ntp4.themeChanged;
746 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs; 748 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs;
747 var setMostVisitedPages = ntp4.setMostVisitedPages; 749 var setMostVisitedPages = ntp4.setMostVisitedPages;
748 750
749 document.addEventListener('DOMContentLoaded', ntp4.initialize); 751 document.addEventListener('DOMContentLoaded', ntp4.initialize);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/tile_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698