| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 * Utility methods. They are intended for use only in this file. | 8 * Utility methods. They are intended for use only in this file. |
| 9 */ | 9 */ |
| 10 var DirectoryTreeUtil = {}; | 10 var DirectoryTreeUtil = {}; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return; | 213 return; |
| 214 | 214 |
| 215 volumeManager.unmount(path, function() {}, function() {}); | 215 volumeManager.unmount(path, function() {}, function() {}); |
| 216 }.bind(this)); | 216 }.bind(this)); |
| 217 | 217 |
| 218 if (parentDirItem.expanded) | 218 if (parentDirItem.expanded) |
| 219 this.updateSubDirectories(false /* recursive */); | 219 this.updateSubDirectories(false /* recursive */); |
| 220 }; | 220 }; |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * Overrides WebKit's scrollIntoViewIfNeeded, which doesn't work well with |
| 224 * a complex layout. This call is not necessary, so we are ignoring it. |
| 225 * |
| 226 * @param {boolean} unused Unused. |
| 227 */ |
| 228 DirectoryItem.prototype.scrollIntoViewIfNeeded = function(unused) { |
| 229 }; |
| 230 |
| 231 /** |
| 223 * Invoked when the item is being expanded. | 232 * Invoked when the item is being expanded. |
| 224 * @param {!UIEvent} e Event. | 233 * @param {!UIEvent} e Event. |
| 225 * @private | 234 * @private |
| 226 **/ | 235 **/ |
| 227 DirectoryItem.prototype.onExpand_ = function(e) { | 236 DirectoryItem.prototype.onExpand_ = function(e) { |
| 228 this.updateSubDirectories( | 237 this.updateSubDirectories( |
| 229 false /* recursive */, | 238 false /* recursive */, |
| 230 function() {}, | 239 function() {}, |
| 231 function() { | 240 function() { |
| 232 this.expanded = false; | 241 this.expanded = false; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } | 491 } |
| 483 }; | 492 }; |
| 484 | 493 |
| 485 /** | 494 /** |
| 486 * Returns the path of the selected item. | 495 * Returns the path of the selected item. |
| 487 * @return {string} The current path. | 496 * @return {string} The current path. |
| 488 */ | 497 */ |
| 489 DirectoryTree.prototype.getCurrentPath = function() { | 498 DirectoryTree.prototype.getCurrentPath = function() { |
| 490 return this.selectedItem ? this.selectedItem.fullPath : null; | 499 return this.selectedItem ? this.selectedItem.fullPath : null; |
| 491 }; | 500 }; |
| OLD | NEW |