| 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 namespace experimental.systemInfo.storage { | 5 namespace experimental.systemInfo.storage { |
| 6 | 6 |
| 7 enum StorageUnitType { | 7 enum StorageUnitType { |
| 8 // The storage has fixed media, e.g. hard disk or SSD. | 8 // The storage has fixed media, e.g. hard disk or SSD. |
| 9 fixed, | 9 fixed, |
| 10 // The storage is removable, e.g. USB flash drive. | 10 // The storage is removable, e.g. USB flash drive. |
| 11 removable, | 11 removable, |
| 12 // The storage type is unknown. | 12 // The storage type is unknown. |
| 13 unknown | 13 unknown |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 dictionary StorageUnitInfo { | 16 dictionary StorageUnitInfo { |
| 17 // The unique id of the storage unit. | 17 // The unique storage id. It is persistent between storage attachments. |
| 18 DOMString id; | 18 DOMString id; |
| 19 // The mount path of the storage unit. |
| 20 DOMString location; |
| 19 // The media type of the storage unit. | 21 // The media type of the storage unit. |
| 20 StorageUnitType type; | 22 StorageUnitType type; |
| 21 // The total amount of the storage space, in bytes. | 23 // The total amount of the storage space, in bytes. |
| 22 double capacity; | 24 double capacity; |
| 23 // The available amount of the storage space, in bytes. | 25 // The available amount of the storage space, in bytes. |
| 24 double availableCapacity; | 26 double availableCapacity; |
| 25 }; | 27 }; |
| 26 | 28 |
| 27 dictionary StorageChangeInfo { | 29 dictionary StorageChangeInfo { |
| 28 // The uniue id of the storage unit already changed. | 30 // The uniue id of the storage unit already changed. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 71 |
| 70 // Fired when a new removable storage is attached to the system. | 72 // Fired when a new removable storage is attached to the system. |
| 71 static void onAttached(StorageUnitInfo info); | 73 static void onAttached(StorageUnitInfo info); |
| 72 | 74 |
| 73 // Fired when a removable storage is detached from the system. | 75 // Fired when a removable storage is detached from the system. |
| 74 static void onDetached(DOMString id); | 76 static void onDetached(DOMString id); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 }; | 79 }; |
| 78 | 80 |
| OLD | NEW |