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

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: NTP5: Reuse insertion/removal animations for Apps 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 ad9e78edb1adc36bcd75b8b275a29f577d5ddfde..1bb34ebebfc5f2462c14081cfd92492df0e3c5a3 100644
--- a/chrome/browser/resources/ntp_search/new_tab.js
+++ b/chrome/browser/resources/ntp_search/new_tab.js
@@ -429,21 +429,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();
-
// Get the array of apps and add any special synthesized entries.
var apps = data.apps;
@@ -459,8 +446,9 @@ cr.define('ntp', function() {
if (this.appsPage) {
this.appsPage.removeAllTiles();
} else {
- this.appendTilePage(new ntp.AppsPage(),
- loadTimeData.getString('appDefaultPageName'));
+ var page = new ntp.AppsPage();
+ page.setDataList(apps);
+ this.appendTilePage(page, loadTimeData.getString('appDefaultPageName'));
}
for (var i = 0; i < apps.length; i++) {
« no previous file with comments | « chrome/browser/resources/ntp_search/most_visited_page.js ('k') | chrome/browser/resources/ntp_search/tile_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698