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

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

Issue 11445009: NTP5: Reuse insertion/removal animations for Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Dan's comments 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 25a18a3f2e586baf09633fdbfdf2c1100d3b3d77..6fdc7ac52bacf50cee886907afa5b5ac92a5a83d 100644
--- a/chrome/browser/resources/ntp_search/new_tab.js
+++ b/chrome/browser/resources/ntp_search/new_tab.js
@@ -427,23 +427,8 @@ cr.define('ntp', function() {
getAppsCallback: function(data) {
assert(loadTimeData.getBoolean('showApps'));
- var page = this.appsPage;
- var state = page && page.getTileRepositioningState();
- if (state) {
- if (state.isRemoving)
- page.animateTileRemoval(state.index, data);
- else
- page.animateTileRestoration(state.index, data);
-
- page.resetTileRepositioningState();
- return;
- }
-
var startTime = Date.now();
- if (page)
- page.removeAllTiles();
-
// Get the array of apps and add any special synthesized entries.
var apps = data.apps;
@@ -457,8 +442,10 @@ cr.define('ntp', function() {
var highlightApp;
// Add the apps, creating pages as necessary.
- this.appendTilePage(new ntp.AppsPage(),
- loadTimeData.getString('appDefaultPageName'));
+ var page = new ntp.AppsPage();
+ page.setDataList(apps, false);
+
+ this.appendTilePage(page, loadTimeData.getString('appDefaultPageName'));
for (var i = 0; i < apps.length; i++) {
var app = apps[i];
if (app.id == this.highlightAppId)

Powered by Google App Engine
This is Rietveld 408576698