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

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: rebase Created 7 years 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 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);

Powered by Google App Engine
This is Rietveld 408576698