Chromium Code Reviews| Index: chrome/common/extensions/api/media_galleries.idl |
| =================================================================== |
| --- chrome/common/extensions/api/media_galleries.idl (revision 239032) |
| +++ 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,35 @@ |
| }; |
| 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 array contains the user-permitted galleries. |
| + // The array may be empty if no accessible galleries exist. The value can |
| + // also be null on failure. |
| + [instanceOf=DOMFileSystem] object[] mediaFileSystems; |
| + |
| + // For "directory_prompt" requests, the file system name for the user |
| + // selected gallery. Empty if the user cancels or in case of failure. |
| + DOMString userSelectedFilesSystemName; |
|
vandebo (ex-Chrome)
2013/12/18 20:15:53
Should this be marked optional? i.e. for non direc
|
| + }; |
| + |
| + callback ManageMediaLocationsCallback = void (ManageRequestResults results); |
| + |
| [inline_doc] dictionary MediaFileSystemMetadata { |
| // The name of the file system. |
| DOMString name; |
| @@ -64,6 +93,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); |