Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/common/extensions/api/experimental_system_info_storage.idl

Issue 16707002: [SystemInfo API] Rewrite storage info provider using storage monitor impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments of jyasskin Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // Use the <code>chrome.experimental.systemInfo.storage</code> API to query 5 // Use the <code>chrome.experimental.systemInfo.storage</code> API to query
6 // storage device information and be notified when it changes. 6 // storage device information and be notified when it changes.
7 namespace experimental.systemInfo.storage { 7 namespace experimental.systemInfo.storage {
8 8
9 enum StorageUnitType { 9 enum StorageUnitType {
10 // The storage has fixed media, e.g. hard disk or SSD. 10 // The storage has fixed media, e.g. hard disk or SSD.
11 fixed, 11 fixed,
12 // The storage is removable, e.g. USB flash drive. 12 // The storage is removable, e.g. USB flash drive.
13 removable, 13 removable,
14 // The storage type is unknown. 14 // The storage type is unknown.
15 unknown 15 unknown
16 }; 16 };
17 17
18 dictionary StorageUnitInfo { 18 dictionary StorageUnitInfo {
19 // The unique id of the storage unit. 19 // The unique storage id. It will use the transient ID.
20 DOMString id; 20 DOMString id;
21 // The name of the storage unit.
22 DOMString name;
21 // The media type of the storage unit. 23 // The media type of the storage unit.
22 StorageUnitType type; 24 StorageUnitType type;
23 // The total amount of the storage space, in bytes. 25 // The total amount of the storage space, in bytes.
26 // Default value is 0 if query operation failes.
Jeffrey Yasskin 2013/07/03 21:44:49 sp: failes->fails
Haojian Wu 2013/07/04 00:41:17 Done.
24 double capacity; 27 double capacity;
25 // The available amount of the storage space, in bytes. 28 // The available amount of the storage space, in bytes.
29 // Default value is 0 if query operation failes.
26 double availableCapacity; 30 double availableCapacity;
27 }; 31 };
28 32
29 dictionary StorageChangeInfo { 33 dictionary StorageFreeSpaceChangeInfo {
30 // The uniue id of the storage unit already changed. 34 // The transient id of the storage unit already changed.
Jeffrey Yasskin 2013/07/03 21:44:49 Comments here end up in user-visible documentation
31 DOMString id; 35 DOMString id;
32 // The new value of the available capacity. 36 // The new value of the available capacity.
33 double availableCapacity; 37 double availableCapacity;
34 }; 38 };
35 39
36 // A dictionary that describes the add particular storage device watch 40 // A dictionary that describes the add particular storage device watch
37 // request results. 41 // request results.
38 dictionary AddWatchResult { 42 dictionary AddWatchResult {
39 DOMString id; 43 DOMString id;
40 boolean success; 44 boolean success;
(...skipping 19 matching lines...) Expand all
60 // Get all the watched storage devices. 64 // Get all the watched storage devices.
61 static void getAllWatch(GetAllWatchCallback callback); 65 static void getAllWatch(GetAllWatchCallback callback);
62 66
63 // Remove all the storage devices monitors. 67 // Remove all the storage devices monitors.
64 static void removeAllWatch(); 68 static void removeAllWatch();
65 }; 69 };
66 70
67 interface Events { 71 interface Events {
68 // Fired when the storage device available capacity is changed. 72 // Fired when the storage device available capacity is changed.
69 // |info|: The changed information for the specified storage unit. 73 // |info|: The changed information for the specified storage unit.
70 static void onAvailableCapacityChanged(StorageChangeInfo info); 74 static void onAvailableCapacityChanged(StorageFreeSpaceChangeInfo info);
71 75
72 // Fired when a new removable storage is attached to the system. 76 // Fired when a new removable storage is attached to the system.
73 static void onAttached(StorageUnitInfo info); 77 static void onAttached(StorageUnitInfo info);
74 78
75 // Fired when a removable storage is detached from the system. 79 // Fired when a removable storage is detached from the system.
76 static void onDetached(DOMString id); 80 static void onDetached(DOMString id);
77 }; 81 };
78 82
79 }; 83 };
80 84
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698