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

Unified Diff: chrome/common/extensions/api/system_info_storage.idl

Issue 18578008: [SystemInfo API] Move Storage API out of experimental namespace and rename to the "system" namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/system_info_storage.idl
diff --git a/chrome/common/extensions/api/system_info_storage.idl b/chrome/common/extensions/api/system_info_storage.idl
new file mode 100644
index 0000000000000000000000000000000000000000..aa7819ec38770eadbc4df8c49246bea11afb8c94
--- /dev/null
+++ b/chrome/common/extensions/api/system_info_storage.idl
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Use the <code>chrome.systemInfo.storage</code> API to query
+// storage device information and be notified when it changes.
Hongbo Min 2013/07/08 06:52:43 nit: ... and be notified when a storage device is
Haojian Wu 2013/07/08 07:46:30 Done.
+namespace systemInfo.storage {
+
+ enum StorageUnitType {
+ // The storage has fixed media, e.g. hard disk or SSD.
+ fixed,
+ // The storage is removable, e.g. USB flash drive.
+ removable,
+ // The storage type is unknown.
+ unknown
+ };
+
+ dictionary StorageUnitInfo {
+ // The unique storage id. It will use the transient ID.
+ DOMString id;
+ // The name of the storage unit.
+ DOMString name;
+ // The media type of the storage unit.
+ StorageUnitType type;
+ // The total amount of the storage space, in bytes.
+ // Default value is 0 if query operation fails.
Hongbo Min 2013/07/08 06:52:43 Seems the description of "Default value is 0 if qu
Haojian Wu 2013/07/08 07:46:30 Yes, I think so. Done.
+ double capacity;
+ };
+
+ callback StorageInfoCallback = void (StorageUnitInfo[] info);
+
+ interface Functions {
+ // Get the storage information from the system. The argument passed to the
+ // callback is an array of StorageUnitInfo objects.
+ static void get(StorageInfoCallback callback);
+ };
+
+ interface Events {
+ // Fired when a new removable storage is attached to the system.
+ static void onAttached(StorageUnitInfo info);
+
+ // Fired when a removable storage is detached from the system.
+ static void onDetached(DOMString id);
+ };
+
+};
+

Powered by Google App Engine
This is Rietveld 408576698