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

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

Issue 10836341: Add the basic code skeleton for system info event router (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Refine the implementations for storage event. Created 8 years, 3 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 namespace experimental.systemInfo.storage { 5 namespace experimental.systemInfo.storage {
6 6
7 enum StorageUnitType { 7 enum StorageUnitType {
8 // Unknow storage type. 8 // Unknow storage type.
9 unknown, 9 unknown,
10 // Hard disk. 10 // Hard disk.
11 harddisk, 11 harddisk,
12 // Removable storage, e.g.USB device. 12 // Removable storage, e.g.USB device.
13 removable 13 removable
14 }; 14 };
15 15
16 dictionary StorageUnitInfo { 16 dictionary StorageUnitInfo {
17 // The unique id of the storage unit. 17 // The unique id of the storage unit.
18 DOMString id; 18 DOMString id;
19 // The type of storage device. The value is one of the constants defined 19 // The type of storage device. The value is one of the constants defined
20 // for this type. 20 // for this type.
21 StorageUnitType type; 21 StorageUnitType type;
22 // The mount path of the storage device, e.g. the drive name on Windows.
23 DOMString path;
22 // The total amount of the storage space, in bytes. 24 // The total amount of the storage space, in bytes.
23 double capacity; 25 double capacity;
24 // The available amount of the storage space, in bytes. 26 // The available amount of the storage space, in bytes.
25 double availableCapacity; 27 double availableCapacity;
26 }; 28 };
27 29
30 dictionary StorageChangeInfo {
31 // The uniue id of the storage unit already changed.
32 DOMString id;
33 // The new value of the available capacity.
34 double availableCapacity;
35 };
36
28 dictionary StorageInfo { 37 dictionary StorageInfo {
29 // The array of storage units connected to the system. 38 // The array of storage units connected to the system.
30 StorageUnitInfo[] units; 39 StorageUnitInfo[] units;
31 }; 40 };
32 41
33 callback StorageInfoCallback = void (StorageInfo info); 42 callback StorageInfoCallback = void (StorageInfo info);
34 43
35 interface Functions { 44 interface Functions {
36 // Get the storage information from the system. 45 // Get the storage information from the system.
37 static void get(StorageInfoCallback callback); 46 static void get(StorageInfoCallback callback);
38 }; 47 };
48
49 interface Events {
50 // Fired when the storage information is updated.
51 // |info| : The changed information for the specified storage unit
52 static void onAvailableCapacityChanged(StorageChangeInfo info);
53 };
54
39 }; 55 };
40 56
OLDNEW
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | chrome/test/data/extensions/api_test/systeminfo/storage/test_storage_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698