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

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: Rebase Created 7 years, 6 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
« no previous file with comments | « chrome/browser/extensions/extension_function_histogram_value.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c8cc940d097c2e83dcecbb5ba23756dd69d1e25..d6d5002dfcc6a38f0c91ee6b271da30cf570c318 100644
--- a/chrome/common/extensions/api/experimental_system_info_storage.idl
+++ b/chrome/common/extensions/api/experimental_system_info_storage.idl
@@ -31,12 +31,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);
+
+ // Remove the monitor of a particular device.
+ static void removeWatch(DOMString id);
+
+ // Get all the watched storage devices.
+ static void getAllWatch(GetAllWatchCallback callback);
+
+ // Remove all the storage devices monitors.
+ static void removeAllWatch();
};
interface Events {
« no previous file with comments | « chrome/browser/extensions/extension_function_histogram_value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698