| 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 * FileManager constructor. | 6 * FileManager constructor. |
| 7 * | 7 * |
| 8 * FileManager objects encapsulate the functionality of the file selector | 8 * FileManager objects encapsulate the functionality of the file selector |
| 9 * dialogs, as well as the full screen file manager application (though the | 9 * dialogs, as well as the full screen file manager application (though the |
| 10 * latter is not yet implemented). | 10 * latter is not yet implemented). |
| (...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 return this.gdataPreferences_.cellularDisabled && | 2407 return this.gdataPreferences_.cellularDisabled && |
| 2408 this.networkState_.online && | 2408 this.networkState_.online && |
| 2409 this.networkState_.type == 'cellular'; | 2409 this.networkState_.type == 'cellular'; |
| 2410 }; | 2410 }; |
| 2411 | 2411 |
| 2412 FileManager.prototype.isOffline = function() { | 2412 FileManager.prototype.isOffline = function() { |
| 2413 return !this.networkState_.online; | 2413 return !this.networkState_.online; |
| 2414 }; | 2414 }; |
| 2415 | 2415 |
| 2416 FileManager.prototype.isGDataEnabled = function() { | 2416 FileManager.prototype.isGDataEnabled = function() { |
| 2417 return !('driveEnabled' in this.gdataPreferences_) || | 2417 return !this.params_.disableGData && |
| 2418 this.gdataPreferences_.driveEnabled; | 2418 (!('driveEnabled' in this.gdataPreferences_) || |
| 2419 this.gdataPreferences_.driveEnabled); |
| 2419 }; | 2420 }; |
| 2420 | 2421 |
| 2421 FileManager.prototype.isOnReadonlyDirectory = function() { | 2422 FileManager.prototype.isOnReadonlyDirectory = function() { |
| 2422 return this.directoryModel_.isReadOnly(); | 2423 return this.directoryModel_.isReadOnly(); |
| 2423 }; | 2424 }; |
| 2424 | 2425 |
| 2425 FileManager.prototype.onExternallyUnmounted_ = function(event) { | 2426 FileManager.prototype.onExternallyUnmounted_ = function(event) { |
| 2426 if (event.mountPath == this.directoryModel_.getCurrentRootPath()) { | 2427 if (event.mountPath == this.directoryModel_.getCurrentRootPath()) { |
| 2427 if (this.closeOnUnmount_) { | 2428 if (this.closeOnUnmount_) { |
| 2428 // If the file manager opened automatically when a usb drive inserted, | 2429 // If the file manager opened automatically when a usb drive inserted, |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3671 this.dialogDom_.querySelector('#default-action-separator'); | 3672 this.dialogDom_.querySelector('#default-action-separator'); |
| 3672 | 3673 |
| 3673 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard | 3674 // TODO(dzvorygin): Here we use this hack, since 'hidden' is standard |
| 3674 // attribute and we can't use it's setter as usual. | 3675 // attribute and we can't use it's setter as usual. |
| 3675 this.openWithCommand_.__lookupSetter__('hidden'). | 3676 this.openWithCommand_.__lookupSetter__('hidden'). |
| 3676 call(this.openWithCommand_, !(defaultItem && isMultiple)); | 3677 call(this.openWithCommand_, !(defaultItem && isMultiple)); |
| 3677 this.defaultActionMenuItem_.hidden = !defaultItem; | 3678 this.defaultActionMenuItem_.hidden = !defaultItem; |
| 3678 defaultActionSeparator.hidden = !defaultItem; | 3679 defaultActionSeparator.hidden = !defaultItem; |
| 3679 }; | 3680 }; |
| 3680 })(); | 3681 })(); |
| OLD | NEW |