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

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

Issue 93643002: Media Galleries: Add chrome.mediaGalleries.addUserSelectedFolder(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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/media_galleries.idl
===================================================================
--- chrome/common/extensions/api/media_galleries.idl (revision 237402)
+++ chrome/common/extensions/api/media_galleries.idl (working copy)
@@ -17,6 +17,8 @@
};
[inline_doc] dictionary MediaFileSystemsDetails {
+ // [Deprecated] use manageMediaLocations and ManageRequestDetails instead.
+ //
// Whether to prompt the user for permission to additional media galleries
// before returning the permitted set. Default is silent. If the value
// 'yes' is passed, or if the application has not been granted access to
@@ -26,8 +28,29 @@
};
callback MediaFileSystemsCallback =
- void ([instanceOf=DOMFileSystem] optional object[] mediaFileSystems);
+ void ([instanceOf=DOMFileSystem] object[] mediaFileSystems);
+ [inline_doc] enum ManageRequestType {
+ // Ask the user to manage permitted media galleries.
+ manage,
+
+ // Present a directory picker to the user and add access to the directory
+ // the user selects.
+ directory_prompt
+ };
+
+ [inline_doc] dictionary ManageRequestDetails {
+ // Specify the management action to take.
+ ManageRequestType type;
+ };
+
+ [inline_doc] dictionary ManageRequestResults {
vandebo (ex-Chrome) 2013/12/02 18:01:30 This is inconsistent with MediaFileSystemsCallback
Lei Zhang 2013/12/03 03:33:23 Flexibility. You can add new key/value pairs in th
+ // The returned file systems. Null on failure.
+ [instanceOf=DOMFileSystem] object[] media_file_systems;
+ };
+
+ callback ManageMediaLocationsCallback = void (ManageRequestResults results);
vandebo (ex-Chrome) 2013/12/02 18:01:30 It doesn't seem like there is a way to know if a '
Lei Zhang 2013/12/03 03:33:23 |media_file_systems| has multiple states. As menti
vandebo (ex-Chrome) 2013/12/03 21:08:02 I don't like this interface because it introduces
Lei Zhang 2013/12/05 05:52:15 Done. I did what I said I would do from yesterday'
+
[inline_doc] dictionary MediaFileSystemMetadata {
// The name of the file system.
DOMString name;
@@ -59,6 +82,12 @@
static void getMediaFileSystems(optional MediaFileSystemsDetails details,
MediaFileSystemsCallback callback);
+ // Manage existing media location or request access to new media locations.
+ // In all cases the user will be prompted. The callback will be called
+ // when the user is done and will include all media galleries.
+ static void manageMediaLocations(ManageRequestDetails details,
+ ManageMediaLocationsCallback callback);
+
// Get metadata about a specific media file system.
[nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata(
[instanceOf=DOMFileSystem] object mediaFileSystem);

Powered by Google App Engine
This is Rietveld 408576698