| 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 appIds.push(tileContents.appId); | 713 appIds.push(tileContents.appId); |
| 714 } | 714 } |
| 715 | 715 |
| 716 chrome.send('reorderApps', [draggedTile.firstChild.appId, appIds]); | 716 chrome.send('reorderApps', [draggedTile.firstChild.appId, appIds]); |
| 717 }, | 717 }, |
| 718 | 718 |
| 719 /** @inheritDoc */ | 719 /** @inheritDoc */ |
| 720 setDropEffect: function(dataTransfer) { | 720 setDropEffect: function(dataTransfer) { |
| 721 var tile = ntp4.getCurrentlyDraggingTile(); | 721 var tile = ntp4.getCurrentlyDraggingTile(); |
| 722 if (tile && tile.querySelector('.app')) | 722 if (tile && tile.querySelector('.app')) |
| 723 dataTransfer.dropEffect = 'move'; | 723 ntp4.setCurrentDropEffect(dataTransfer, 'move'); |
| 724 else | 724 else |
| 725 dataTransfer.dropEffect = 'copy'; | 725 ntp4.setCurrentDropEffect(dataTransfer, 'copy'); |
| 726 }, | 726 }, |
| 727 }; | 727 }; |
| 728 | 728 |
| 729 AppsPage.setPromo = function(data) { | 729 AppsPage.setPromo = function(data) { |
| 730 var store = document.querySelector('.webstore'); | 730 var store = document.querySelector('.webstore'); |
| 731 if (store) | 731 if (store) |
| 732 store.setAppsPromoData(data); | 732 store.setAppsPromoData(data); |
| 733 }; | 733 }; |
| 734 | 734 |
| 735 /** | 735 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 750 appNotificationChanged: appNotificationChanged, | 750 appNotificationChanged: appNotificationChanged, |
| 751 AppsPage: AppsPage, | 751 AppsPage: AppsPage, |
| 752 launchAppAfterEnable: launchAppAfterEnable, | 752 launchAppAfterEnable: launchAppAfterEnable, |
| 753 }; | 753 }; |
| 754 }); | 754 }); |
| 755 | 755 |
| 756 // TODO(estade): update the content handlers to use ntp namespace instead of | 756 // TODO(estade): update the content handlers to use ntp namespace instead of |
| 757 // making these global. | 757 // making these global. |
| 758 var appNotificationChanged = ntp4.appNotificationChanged; | 758 var appNotificationChanged = ntp4.appNotificationChanged; |
| 759 var launchAppAfterEnable = ntp4.launchAppAfterEnable; | 759 var launchAppAfterEnable = ntp4.launchAppAfterEnable; |
| OLD | NEW |