OLD | NEW |
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 localStrings = new LocalStrings; | 8 var localStrings = new LocalStrings; |
9 | 9 |
10 var APP_LAUNCH = { | 10 var APP_LAUNCH = { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 var tileContents = currentlyDraggingTile.firstChild; | 410 var tileContents = currentlyDraggingTile.firstChild; |
411 if (tileContents.classList.contains('app')) { | 411 if (tileContents.classList.contains('app')) { |
412 this.tileGrid_.insertBefore( | 412 this.tileGrid_.insertBefore( |
413 currentlyDraggingTile, | 413 currentlyDraggingTile, |
414 this.tileElements_[index]); | 414 this.tileElements_[index]); |
415 this.tileMoved(currentlyDraggingTile); | 415 this.tileMoved(currentlyDraggingTile); |
416 } else if (tileContents.classList.contains('most-visited')) { | 416 } else if (tileContents.classList.contains('most-visited')) { |
417 this.generateAppForLink(tileContents.data); | 417 this.generateAppForLink(tileContents.data); |
418 } | 418 } |
419 } else { | 419 } else { |
420 this.addOutsideData_(e.dataTransfer, index); | 420 this.addOutsideData_(dataTransfer, index); |
421 } | 421 } |
422 }, | 422 }, |
423 | 423 |
424 /** | 424 /** |
425 * Adds drag data that has been dropped from a source that is not a tile. | 425 * Adds drag data that has been dropped from a source that is not a tile. |
426 * @param {Object} dataTransfer The data transfer object that holds drop | 426 * @param {Object} dataTransfer The data transfer object that holds drop |
427 * data. | 427 * data. |
428 * @param {number} index The index for the new data. | 428 * @param {number} index The index for the new data. |
429 * @private | 429 * @private |
430 */ | 430 */ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 var store = document.querySelector('.webstore'); | 493 var store = document.querySelector('.webstore'); |
494 if (store) | 494 if (store) |
495 store.setAppsPromoData(data); | 495 store.setAppsPromoData(data); |
496 }; | 496 }; |
497 | 497 |
498 return { | 498 return { |
499 APP_LAUNCH: APP_LAUNCH, | 499 APP_LAUNCH: APP_LAUNCH, |
500 AppsPage: AppsPage, | 500 AppsPage: AppsPage, |
501 }; | 501 }; |
502 }); | 502 }); |
OLD | NEW |