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

Unified Diff: chrome/browser/resources/ntp/apps.js

Issue 6543017: Track which apps the user has re-ordered on the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix presubmit check Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp/apps.js
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 39ef8955130a09e88c38c79e16578ad2e113de55..935eebfd25ad3fa490341cbadb73573b6f18b2df 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -524,10 +524,11 @@ var apps = (function() {
this.scrollMouseXY_ = null;
},
- saveDrag: function() {
+ saveDrag: function(draggedItem) {
this.invalidate_();
this.layout();
+ var draggedAppId = draggedItem.querySelector('a').getAttribute('app-id');
var appIds = this.data.filter(function(id) {
return id != 'web-store-entry';
});
@@ -535,7 +536,7 @@ var apps = (function() {
// Wait until the transitions are complete before notifying the browser.
// Otherwise, the apps will be re-rendered while still transitioning.
setTimeout(function() {
- chrome.send('reorderApps', appIds);
+ chrome.send('reorderApps', [draggedAppId, appIds]);
}, this.transitionsDuration + 10);
},
« no previous file with comments | « chrome/browser/extensions/extension_prefs_unittest.cc ('k') | chrome/browser/resources/ntp/drag_drop_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698