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

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

Issue 7038051: NTP4: Add ability to drag links to the apps pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: this.ownerDocument Created 9 years, 7 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/apps_page.js ('k') | chrome/browser/resources/ntp4/new_tab.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 cr.define('ntp4', function() { 5 cr.define('ntp4', function() {
6 'use strict'; 6 'use strict';
7 7
8 var TilePage = ntp4.TilePage; 8 var TilePage = ntp4.TilePage;
9 9
10 /** 10 /**
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 this.createTiles_(); 273 this.createTiles_();
274 this.data_ = data.slice(0, THUMBNAIL_COUNT); 274 this.data_ = data.slice(0, THUMBNAIL_COUNT);
275 } else { 275 } else {
276 this.data_ = refreshData(this.data_, data); 276 this.data_ = refreshData(this.data_, data);
277 } 277 }
278 278
279 this.updateTiles_(); 279 this.updateTiles_();
280 }, 280 },
281 281
282 /** @inheritDoc */ 282 /** @inheritDoc */
283 acceptOutsideDrags: function() { 283 shouldAcceptDrag: function(tile, dataTransfer) {
284 return false; 284 return this.contains(tile);
285 }, 285 },
286 286
287 /** @inheritDoc */ 287 /** @inheritDoc */
288 heightForWidth: heightForWidth, 288 heightForWidth: heightForWidth,
289 }; 289 };
290 290
291 /** 291 /**
292 * We've gotten additional Most Visited data. Update our old data with the 292 * We've gotten additional Most Visited data. Update our old data with the
293 * new data. The ordering of the new data is not important, except when a 293 * new data. The ordering of the new data is not important, except when a
294 * page is pinned. Thus we try to minimize re-ordering. 294 * page is pinned. Thus we try to minimize re-ordering.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 357 }
358 358
359 return oldData; 359 return oldData;
360 }; 360 };
361 361
362 return { 362 return {
363 MostVisitedPage: MostVisitedPage, 363 MostVisitedPage: MostVisitedPage,
364 refreshData: refreshData, 364 refreshData: refreshData,
365 }; 365 };
366 }); 366 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/browser/resources/ntp4/new_tab.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698