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

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

Issue 7969027: ntp4: drag from bookmark page to apps page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | no next file » | 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 /** @inheritDoc */ 635 /** @inheritDoc */
636 addDragData: function(dataTransfer, index) { 636 addDragData: function(dataTransfer, index) {
637 var currentlyDraggingTile = ntp4.getCurrentlyDraggingTile(); 637 var currentlyDraggingTile = ntp4.getCurrentlyDraggingTile();
638 if (currentlyDraggingTile) { 638 if (currentlyDraggingTile) {
639 var tileContents = currentlyDraggingTile.firstChild; 639 var tileContents = currentlyDraggingTile.firstChild;
640 if (tileContents.classList.contains('app')) { 640 if (tileContents.classList.contains('app')) {
641 this.tileGrid_.insertBefore( 641 this.tileGrid_.insertBefore(
642 currentlyDraggingTile, 642 currentlyDraggingTile,
643 this.tileElements_[index]); 643 this.tileElements_[index]);
644 this.tileMoved(currentlyDraggingTile); 644 this.tileMoved(currentlyDraggingTile);
645 } else if (currentlyDraggingTile.querySelector('.most-visited')) { 645 } else if (currentlyDraggingTile.querySelector('.most-visited') ||
646 currentlyDraggingTile.querySelector('.bookmark')) {
Dan Beam 2011/09/22 22:36:01 like we talked about on chat, might as well add a
646 this.generateAppForLink(tileContents.data); 647 this.generateAppForLink(tileContents.data);
647 } 648 }
648 } else { 649 } else {
649 this.addOutsideData_(dataTransfer, index); 650 this.addOutsideData_(dataTransfer, index);
650 } 651 }
651 }, 652 },
652 653
653 /** 654 /**
654 * Adds drag data that has been dropped from a source that is not a tile. 655 * Adds drag data that has been dropped from a source that is not a tile.
655 * @param {Object} dataTransfer The data transfer object that holds drop 656 * @param {Object} dataTransfer The data transfer object that holds drop
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 appNotificationChanged: appNotificationChanged, 750 appNotificationChanged: appNotificationChanged,
750 AppsPage: AppsPage, 751 AppsPage: AppsPage,
751 launchAppAfterEnable: launchAppAfterEnable, 752 launchAppAfterEnable: launchAppAfterEnable,
752 }; 753 };
753 }); 754 });
754 755
755 // 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
756 // making these global. 757 // making these global.
757 var appNotificationChanged = ntp4.appNotificationChanged; 758 var appNotificationChanged = ntp4.appNotificationChanged;
758 var launchAppAfterEnable = ntp4.launchAppAfterEnable; 759 var launchAppAfterEnable = ntp4.launchAppAfterEnable;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698