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,33 @@ |
}; |
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 { |
+ // The returned file systems. Null on failure. |
+ // For the "manage" request, the returned array contains the user-permitted |
+ // galleries. The array may be empty. |
+ // For the "directory_prompt" request, the returned array contains the |
+ // user-selected gallery. If the user cancels, the returned array is empty. |
+ [instanceOf=DOMFileSystem] object[] media_file_systems; |
+ }; |
+ |
+ callback ManageMediaLocationsCallback = void (ManageRequestResults results); |
+ |
[inline_doc] dictionary MediaFileSystemMetadata { |
// The name of the file system. |
DOMString name; |
@@ -59,6 +86,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); |