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 /** | 5 /** |
6 * Global (placed in the window object) variable name to hold internal | 6 * Global (placed in the window object) variable name to hold internal |
7 * file dragging information. Needed to show visual feedback while dragging | 7 * file dragging information. Needed to show visual feedback while dragging |
8 * since DataTransfer object is in protected state. Reachable from other | 8 * since DataTransfer object is in protected state. Reachable from other |
9 * file manager instances. | 9 * file manager instances. |
10 */ | 10 */ |
11 var DRAG_AND_DROP_GLOBAL_DATA = '__drag_and_drop_global_data'; | 11 var DRAG_AND_DROP_GLOBAL_DATA = '__drag_and_drop_global_data'; |
12 | 12 |
13 /** | 13 /** |
14 * @constructor | |
15 * @param {HTMLDocument} doc Owning document. | 14 * @param {HTMLDocument} doc Owning document. |
16 * @param {FileCopyManager} copyManager Copy manager instance. | 15 * @param {FileCopyManager} copyManager Copy manager instance. |
17 * @param {DirectoryModel} directoryModel Directory model instance. | 16 * @param {DirectoryModel} directoryModel Directory model instance. |
| 17 * @constructor |
18 */ | 18 */ |
19 function FileTransferController(doc, | 19 function FileTransferController(doc, |
20 copyManager, | 20 copyManager, |
21 directoryModel) { | 21 directoryModel) { |
22 this.document_ = doc; | 22 this.document_ = doc; |
23 this.copyManager_ = copyManager; | 23 this.copyManager_ = copyManager; |
24 this.directoryModel_ = directoryModel; | 24 this.directoryModel_ = directoryModel; |
25 | 25 |
26 this.directoryModel_.getFileListSelection().addEventListener('change', | 26 this.directoryModel_.getFileListSelection().addEventListener('change', |
27 this.onSelectionChanged_.bind(this)); | 27 this.onSelectionChanged_.bind(this)); |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 }, | 795 }, |
796 | 796 |
797 /** | 797 /** |
798 * @this {FileTransferController} | 798 * @this {FileTransferController} |
799 */ | 799 */ |
800 scroll_: function() { | 800 scroll_: function() { |
801 if (this.scrollList_) | 801 if (this.scrollList_) |
802 this.scrollList_.scrollTop += this.scrollStep_; | 802 this.scrollList_.scrollTop += this.scrollStep_; |
803 } | 803 } |
804 }; | 804 }; |
OLD | NEW |