| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Namespace for common types shared between VolumeManager and | 6 * Namespace for common types shared between VolumeManager and |
| 7 * VolumeManagerWrapper. | 7 * VolumeManagerWrapper. |
| 8 */ | 8 */ |
| 9 var VolumeManagerCommon = {}; | 9 var VolumeManagerCommon = {}; |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Root for a drive volume. | 26 // Root for a drive volume. |
| 27 DRIVE: 'drive', | 27 DRIVE: 'drive', |
| 28 | 28 |
| 29 // Root for a MTP volume. | 29 // Root for a MTP volume. |
| 30 MTP: 'mtp', | 30 MTP: 'mtp', |
| 31 | 31 |
| 32 // Root for a provided volume. | 32 // Root for a provided volume. |
| 33 PROVIDED: 'provided', | 33 PROVIDED: 'provided', |
| 34 | 34 |
| 35 // Root for plugin provided volume. |
| 36 PLUGIN_PROVIDED: 'plugin_provided', |
| 37 |
| 35 // Root for entries that is not located under RootType.DRIVE. e.g. shared | 38 // Root for entries that is not located under RootType.DRIVE. e.g. shared |
| 36 // files. | 39 // files. |
| 37 DRIVE_OTHER: 'drive_other', | 40 DRIVE_OTHER: 'drive_other', |
| 38 | 41 |
| 39 // Fake root for offline available files on the drive. | 42 // Fake root for offline available files on the drive. |
| 40 DRIVE_OFFLINE: 'drive_offline', | 43 DRIVE_OFFLINE: 'drive_offline', |
| 41 | 44 |
| 42 // Fake root for shared files on the drive. | 45 // Fake root for shared files on the drive. |
| 43 DRIVE_SHARED_WITH_ME: 'drive_shared_with_me', | 46 DRIVE_SHARED_WITH_ME: 'drive_shared_with_me', |
| 44 | 47 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 * The type of each volume. | 117 * The type of each volume. |
| 115 * @enum {string} | 118 * @enum {string} |
| 116 * @const | 119 * @const |
| 117 */ | 120 */ |
| 118 VolumeManagerCommon.VolumeType = { | 121 VolumeManagerCommon.VolumeType = { |
| 119 DRIVE: 'drive', | 122 DRIVE: 'drive', |
| 120 DOWNLOADS: 'downloads', | 123 DOWNLOADS: 'downloads', |
| 121 REMOVABLE: 'removable', | 124 REMOVABLE: 'removable', |
| 122 ARCHIVE: 'archive', | 125 ARCHIVE: 'archive', |
| 123 MTP: 'mtp', | 126 MTP: 'mtp', |
| 124 PROVIDED: 'provided' | 127 PROVIDED: 'provided', |
| 128 PLUGIN_PROVIDED: 'plugin_provided' |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 /** | 131 /** |
| 128 * Source of each volume's data. | 132 * Source of each volume's data. |
| 129 * @enum {string} | 133 * @enum {string} |
| 130 * @const | 134 * @const |
| 131 */ | 135 */ |
| 132 VolumeManagerCommon.Source = { | 136 VolumeManagerCommon.Source = { |
| 133 FILE: 'file', | 137 FILE: 'file', |
| 134 DEVICE: 'device', | 138 DEVICE: 'device', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 case VolumeManagerCommon.RootType.DRIVE: | 170 case VolumeManagerCommon.RootType.DRIVE: |
| 167 case VolumeManagerCommon.RootType.DRIVE_OTHER: | 171 case VolumeManagerCommon.RootType.DRIVE_OTHER: |
| 168 case VolumeManagerCommon.RootType.DRIVE_OFFLINE: | 172 case VolumeManagerCommon.RootType.DRIVE_OFFLINE: |
| 169 case VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME: | 173 case VolumeManagerCommon.RootType.DRIVE_SHARED_WITH_ME: |
| 170 case VolumeManagerCommon.RootType.DRIVE_RECENT: | 174 case VolumeManagerCommon.RootType.DRIVE_RECENT: |
| 171 return VolumeManagerCommon.VolumeType.DRIVE; | 175 return VolumeManagerCommon.VolumeType.DRIVE; |
| 172 case VolumeManagerCommon.RootType.MTP: | 176 case VolumeManagerCommon.RootType.MTP: |
| 173 return VolumeManagerCommon.VolumeType.MTP; | 177 return VolumeManagerCommon.VolumeType.MTP; |
| 174 case VolumeManagerCommon.RootType.PROVIDED: | 178 case VolumeManagerCommon.RootType.PROVIDED: |
| 175 return VolumeManagerCommon.VolumeType.PROVIDED; | 179 return VolumeManagerCommon.VolumeType.PROVIDED; |
| 180 case VolumeManagerCommon.RootType.PLUGIN_PROVIDED: |
| 181 return VolumeManagerCommon.VolumeType.PLUGIN_PROVIDED; |
| 176 } | 182 } |
| 177 assertNotReached('Unknown root type: ' + rootType); | 183 assertNotReached('Unknown root type: ' + rootType); |
| 178 }; | 184 }; |
| 179 | 185 |
| 180 /** | 186 /** |
| 181 * @typedef {{ | 187 * @typedef {{ |
| 182 * type: VolumeManagerCommon.DriveConnectionType, | 188 * type: VolumeManagerCommon.DriveConnectionType, |
| 183 * reason: VolumeManagerCommon.DriveConnectionReason | 189 * reason: VolumeManagerCommon.DriveConnectionReason |
| 184 * }} | 190 * }} |
| 185 */ | 191 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 203 /** | 209 /** |
| 204 * Fake entries for Google Drive's virtual folders. | 210 * Fake entries for Google Drive's virtual folders. |
| 205 * (OFFLINE, RECENT, and SHARED_WITH_ME) | 211 * (OFFLINE, RECENT, and SHARED_WITH_ME) |
| 206 * @typedef {?{ | 212 * @typedef {?{ |
| 207 * isDirectory: boolean, | 213 * isDirectory: boolean, |
| 208 * rootType: VolumeManagerCommon.RootType, | 214 * rootType: VolumeManagerCommon.RootType, |
| 209 * toURL: function(): string | 215 * toURL: function(): string |
| 210 * }} | 216 * }} |
| 211 */ | 217 */ |
| 212 var FakeEntry; | 218 var FakeEntry; |
| OLD | NEW |