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

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

Issue 15815002: [SystemInfo API] Add Storage Watch API Definition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/experimental_system_info_storage.idl
diff --git a/chrome/common/extensions/api/experimental_system_info_storage.idl b/chrome/common/extensions/api/experimental_system_info_storage.idl
index ea533aa182d87081ecca9afb8e6223a6c11a9362..84576d86589604c159480da7be3a9a3becbeb4f6 100644
--- a/chrome/common/extensions/api/experimental_system_info_storage.idl
+++ b/chrome/common/extensions/api/experimental_system_info_storage.idl
@@ -32,12 +32,35 @@ namespace experimental.systemInfo.storage {
double availableCapacity;
};
+ // A dictionary that describes the add particular storage device watch
+ // request results.
+ dictionary AddWatchResult {
+ DOMString id;
+ boolean success;
+ };
+
callback StorageInfoCallback = void (StorageUnitInfo[] info);
+ callback AddWatchCallback = void (AddWatchResult info);
+
+ callback GetAllWatchCallback = void (DOMString[] storageIds);
+
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);
+
+ // Monitor a particular storage device available change capacity.
+ static void addWatch(DOMString id, AddWatchCallback callback);
+
+ // Get all the watched storage devices.
+ static void getAllWatch(GetAllWatchCallback callback);
+
+ // Remove the monitor of a particular device.
+ static void removeWatch(DOMString id);
+
+ // Remove all the storage devices monitors.
+ static void removeAllWatch();
};
interface Events {

Powered by Google App Engine
This is Rietveld 408576698