| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Global (placed in the window object) variable name to hold internal | 8 * Global (placed in the window object) variable name to hold internal |
| 9 * file dragging information. Needed to show visual feedback while dragging | 9 * file dragging information. Needed to show visual feedback while dragging |
| 10 * since DataTransfer object is in protected state. Reachable from other | 10 * since DataTransfer object is in protected state. Reachable from other |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 onDragEnterVolumesList_: function(list, event) { | 427 onDragEnterVolumesList_: function(list, event) { |
| 428 event.preventDefault(); // Required to prevent the cursor flicker. | 428 event.preventDefault(); // Required to prevent the cursor flicker. |
| 429 this.lastEnteredTarget_ = event.target; | 429 this.lastEnteredTarget_ = event.target; |
| 430 var item = list.getListItemAncestor(event.target); | 430 var item = list.getListItemAncestor(event.target); |
| 431 item = item && list.isItem(item) ? item : null; | 431 item = item && list.isItem(item) ? item : null; |
| 432 if (item === this.dropTarget_) | 432 if (item === this.dropTarget_) |
| 433 return; | 433 return; |
| 434 | 434 |
| 435 var modelItem = item && list.dataModel.item(item.listIndex); | 435 var modelItem = item && list.dataModel.item(item.listIndex); |
| 436 if (modelItem.isShortcut) { | 436 if (modelItem.isShortcut) { |
| 437 this.setDropTarget_(item, event.dataTransfer, entry); | 437 this.setDropTarget_(item, event.dataTransfer, modelItem.entry); |
| 438 } else if (modelItem.isVolume && modelItem.volumeInfo.displayRoot) { | 438 } else if (modelItem.isVolume && modelItem.volumeInfo.displayRoot) { |
| 439 this.setDropTarget_( | 439 this.setDropTarget_( |
| 440 item, event.dataTransfer, modelItem.volumeInfo.displayRoot); | 440 item, event.dataTransfer, modelItem.volumeInfo.displayRoot); |
| 441 } else { | 441 } else { |
| 442 this.clearDropTarget_(); | 442 this.clearDropTarget_(); |
| 443 } | 443 } |
| 444 }, | 444 }, |
| 445 | 445 |
| 446 /** | 446 /** |
| 447 * @this {FileTransferController} | 447 * @this {FileTransferController} |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 !event.ctrlKey) { | 872 !event.ctrlKey) { |
| 873 return 'move'; | 873 return 'move'; |
| 874 } | 874 } |
| 875 if (event.dataTransfer.effectAllowed === 'copyMove' && | 875 if (event.dataTransfer.effectAllowed === 'copyMove' && |
| 876 event.shiftKey) { | 876 event.shiftKey) { |
| 877 return 'move'; | 877 return 'move'; |
| 878 } | 878 } |
| 879 return 'copy'; | 879 return 'copy'; |
| 880 }, | 880 }, |
| 881 }; | 881 }; |
| OLD | NEW |