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

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

Issue 10824232: Add systeminfo.storage API implementation skeleton (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 namespace experimental.systeminfo.storage {
6
7 enum StorageUnitType {
8 // Unknow storage type
9 unknown,
10 // Hard disk
11 harddisk,
12 // USB Mass storage
13 usb,
14 // SD card
15 mmc
16 };
17
18 dictionary StorageUnitInfo {
19 // The unique id
James Hawkins 2012/08/09 15:47:34 nit: Comments must end with a period, here and els
Hongbo Min 2012/08/12 03:31:58 Done.
20 DOMString id;
21 // The type of storage device. The value is one of the constants defined
22 // for this type.
23 StorageUnitType type;
24 // The total amount of the storage space, in bytes.
25 double capacity;
26 // The available amount of the storage space, in bytes.
27 double availableCapacity;
28 };
29
30 dictionary StorageInfo {
31 // The array of storage units connected to the system.
32 StorageUnitInfo[] units;
33 };
34
35 dictionary StorageUnitChangeInfo {
36 // The unique ID of storage unit on which the change is taken place.
37 DOMString id;
38 // The changed availableCapacity property
39 double availableCapacity;
40 };
41
42 callback StorageInfoCallback = void (StorageInfo info);
43 callback StorageUnitChangeCallback = void (StorageUnitChangeInfo unit);
44
45 interface Functions {
46 // Get the storage information in the system
47 static void get(StorageInfoCallback callback);
48 };
49
50 interface Events {
51 // Fired when the specified storage unit information is updated.
52 // |info| : The changed information for the specified storage unit
53 static void onChanged(StorageUnitChangeInfo info);
54
55 // Fired when a new storage unit is added to the system,
56 // i.e. a new USB disk is plugged in.
57 // |unit| : The information of the new storage unit
58 static void onAdded(StorageUnitInfo unit);
59
60 // Fired when a storage unit is removed from the system
61 // i.e. a USB disk is unplugged
62 // |id| : The unique ID of storage unit already removed
63 static void onRemoved(DOMString id);
64 };
65 };
66
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698