| 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 * Represents each volume, such as "drive", "download directory", each "USB | 6 * Represents each volume, such as "drive", "download directory", each "USB |
| 7 * flush storage", or "mounted zip archive" etc. | 7 * flush storage", or "mounted zip archive" etc. |
| 8 * | 8 * |
| 9 * @constructor | 9 * @constructor |
| 10 * | 10 * |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 }, | 156 }, |
| 157 /** | 157 /** |
| 158 * @return {boolean} True if the volume contains media. | 158 * @return {boolean} True if the volume contains media. |
| 159 */ | 159 */ |
| 160 get hasMedia() { | 160 get hasMedia() { |
| 161 return this.hasMedia_; | 161 return this.hasMedia_; |
| 162 } | 162 } |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 /** | 165 /** |
| 166 * Provides short hand checking of volume type. | |
| 167 * @param {VolumeManagerCommon.VolumeType} type | |
| 168 * @return {boolean} True if the volume is of the specified type. | |
| 169 */ | |
| 170 VolumeInfo.prototype.isType = function(type) { | |
| 171 return type === this.volumeType_; | |
| 172 }; | |
| 173 | |
| 174 /** | |
| 175 * Starts resolving the display root and obtains it. It may take long time for | 166 * Starts resolving the display root and obtains it. It may take long time for |
| 176 * Drive. Once resolved, it is cached. | 167 * Drive. Once resolved, it is cached. |
| 177 * | 168 * |
| 178 * @param {function(DirectoryEntry)=} opt_onSuccess Success callback with the | 169 * @param {function(DirectoryEntry)=} opt_onSuccess Success callback with the |
| 179 * display root directory as an argument. | 170 * display root directory as an argument. |
| 180 * @param {function(*)=} opt_onFailure Failure callback. | 171 * @param {function(*)=} opt_onFailure Failure callback. |
| 181 * @return {Promise} | 172 * @return {Promise} |
| 182 */ | 173 */ |
| 183 VolumeInfo.prototype.resolveDisplayRoot = function(opt_onSuccess, | 174 VolumeInfo.prototype.resolveDisplayRoot = function(opt_onSuccess, |
| 184 opt_onFailure) { | 175 opt_onFailure) { |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 this.isDriveBased; | 989 this.isDriveBased; |
| 999 | 990 |
| 1000 /** | 991 /** |
| 1001 * Whether the entry is read only or not. | 992 * Whether the entry is read only or not. |
| 1002 * @type {boolean} | 993 * @type {boolean} |
| 1003 */ | 994 */ |
| 1004 this.isReadOnly = isReadOnly; | 995 this.isReadOnly = isReadOnly; |
| 1005 | 996 |
| 1006 Object.freeze(this); | 997 Object.freeze(this); |
| 1007 } | 998 } |
| OLD | NEW |