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

Unified Diff: chrome/browser/resources/ntp_search/new_tab.js

Issue 11566026: NTP5: Apps regression fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NTP5: Apps regression fix Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp_search/new_tab.js
diff --git a/chrome/browser/resources/ntp_search/new_tab.js b/chrome/browser/resources/ntp_search/new_tab.js
index 2a42d86b37d0e1abab1b60b36b561789a6cae593..48beeb3aa565e86196ed548c5f3a9966e1a5bff3 100644
--- a/chrome/browser/resources/ntp_search/new_tab.js
+++ b/chrome/browser/resources/ntp_search/new_tab.js
@@ -482,7 +482,8 @@ cr.define('ntp', function() {
this.highlightAppId = null;
}
- var pageIndex = data.page_index || 0;
+ if (!this.appsLoaded_)
+ opt_highlight = false;
var app = $(data.id);
if (app) {
@@ -505,7 +506,9 @@ cr.define('ntp', function() {
assert(loadTimeData.getBoolean('showApps'));
for (var i = 0; i < data.apps.length; ++i) {
- $(data.apps[i].id).data = data.apps[i];
+ var element = $(data.apps[i].id);
+ if (element)
+ element.data = data.apps[i];
}
},
@@ -793,6 +796,10 @@ cr.define('ntp', function() {
* Invoked at startup once the DOM is available to initialize the app.
*/
function onLoad() {
+
+ if (!loadTimeData.getBoolean('showApps'))
+ cr.dispatchSimpleEvent(document, 'sectionready', true, true);
+
// Load the current theme colors.
themeChanged();
@@ -877,7 +884,7 @@ cr.define('ntp', function() {
* The number of sections to wait on.
* @type {number}
*/
- var sectionsToWaitFor = 1;
+ var sectionsToWaitFor = 2;
/**
* Queued callbacks which lie in wait for all sections to be ready.
« no previous file with comments | « chrome/browser/resources/ntp_search/most_visited_page.js ('k') | chrome/browser/resources/ntp_search/thumbnail_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698