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

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

Issue 7951011: Moving where I'm doing dropEffect normalization. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: small whitespace changes Created 9 years, 3 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 | « no previous file | chrome/browser/resources/ntp4/bookmarks_page.js » ('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 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
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
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;
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/bookmarks_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698