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

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

Issue 7951011: Moving where I'm doing dropEffect normalization. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: code review changes from conversation with estade over chat 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
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 /** 5 /**
6 * @fileoverview Trash 6 * @fileoverview Trash
7 * This is the class for the trash can that appears when dragging an app. 7 * This is the class for the trash can that appears when dragging an app.
8 */ 8 */
9 9
10 cr.define('ntp4', function() { 10 cr.define('ntp4', function() {
(...skipping 25 matching lines...) Expand all
36 return tile.firstChild.canBeRemoved(); 36 return tile.firstChild.canBeRemoved();
37 }, 37 },
38 38
39 /** 39 /**
40 * Drag over handler. 40 * Drag over handler.
41 * @param {Event} e The drag event. 41 * @param {Event} e The drag event.
42 */ 42 */
43 doDragOver: function(e) { 43 doDragOver: function(e) {
44 ntp4.getCurrentlyDraggingTile().dragClone.classList.add( 44 ntp4.getCurrentlyDraggingTile().dragClone.classList.add(
45 'hovering-on-trash'); 45 'hovering-on-trash');
46 ntp4.setCurrentDropEffect(e.dataTransfer, 'move');
46 e.preventDefault(); 47 e.preventDefault();
47 e.dataTransfer.dropEffect = 'move';
48 }, 48 },
49 49
50 /** 50 /**
51 * Drag enter handler. 51 * Drag enter handler.
52 * @param {Event} e The drag event. 52 * @param {Event} e The drag event.
53 */ 53 */
54 doDragEnter: function(e) { 54 doDragEnter: function(e) {
55 this.doDragOver(e); 55 this.doDragOver(e);
56 }, 56 },
57 57
(...skipping 18 matching lines...) Expand all
76 doDragLeave: function(e) { 76 doDragLeave: function(e) {
77 ntp4.getCurrentlyDraggingTile().dragClone.classList.remove( 77 ntp4.getCurrentlyDraggingTile().dragClone.classList.remove(
78 'hovering-on-trash'); 78 'hovering-on-trash');
79 }, 79 },
80 }; 80 };
81 81
82 return { 82 return {
83 Trash: Trash, 83 Trash: Trash,
84 }; 84 };
85 }); 85 });
OLDNEW
« chrome/browser/resources/ntp4/tile_page.js ('K') | « chrome/browser/resources/ntp4/tile_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698