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

Side by Side 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 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use the <code>chrome.mediaGalleries</code> API to access media files (images, 5 // Use the <code>chrome.mediaGalleries</code> API to access media files (images,
6 // video, audio) from the user's local disks (with the user's consent). 6 // video, audio) from the user's local disks (with the user's consent).
7 namespace mediaGalleries { 7 namespace mediaGalleries {
8 8
9 [inline_doc] enum GetMediaFileSystemsInteractivity { 9 [inline_doc] enum GetMediaFileSystemsInteractivity {
10 // Do not act interactively. 10 // Do not act interactively.
(...skipping 23 matching lines...) Expand all
34 34
35 dictionary MediaMetadataOptions { 35 dictionary MediaMetadataOptions {
36 // Specifies which subset of the metadata to retrieve. Defaults to 'all' 36 // Specifies which subset of the metadata to retrieve. Defaults to 'all'
37 // if the option is omitted. 37 // if the option is omitted.
38 GetMetadataType? metadataType; 38 GetMetadataType? metadataType;
39 }; 39 };
40 40
41 callback MediaFileSystemsCallback = 41 callback MediaFileSystemsCallback =
42 void ([instanceOf=DOMFileSystem] optional object[] mediaFileSystems); 42 void ([instanceOf=DOMFileSystem] optional object[] mediaFileSystems);
43 43
44 callback AddUserFolderCallback =
45 void ([instanceOf=DOMFileSystem] object[] mediaFileSystems,
46 DOMString selectedFileSystemsName);
47
44 [inline_doc] dictionary MediaFileSystemMetadata { 48 [inline_doc] dictionary MediaFileSystemMetadata {
45 // The name of the file system. 49 // The name of the file system.
46 DOMString name; 50 DOMString name;
47 51
48 // A unique and persistent id for the media gallery. 52 // A unique and persistent id for the media gallery.
49 DOMString galleryId; 53 DOMString galleryId;
50 54
51 // If the media gallery is on a removable device, a unique id for the 55 // If the media gallery is on a removable device, a unique id for the
52 // device while the device is online. 56 // device while the device is online.
53 DOMString? deviceId; 57 DOMString? deviceId;
(...skipping 18 matching lines...) Expand all
72 }; 76 };
73 77
74 callback MediaMetadataCallback = void (MediaMetadata metadata); 78 callback MediaMetadataCallback = void (MediaMetadata metadata);
75 79
76 interface Functions { 80 interface Functions {
77 // Get the media galleries configured in this user agent. If none are 81 // Get the media galleries configured in this user agent. If none are
78 // configured or available, the callback will receive an empty array. 82 // configured or available, the callback will receive an empty array.
79 static void getMediaFileSystems(optional MediaFileSystemsDetails details, 83 static void getMediaFileSystems(optional MediaFileSystemsDetails details,
80 MediaFileSystemsCallback callback); 84 MediaFileSystemsCallback callback);
81 85
86 // Present a directory picker to the user and add the selected directory
87 // as a gallery. If the user cancels the picker, selectedFileSystemsName
88 // will be empty.
89 static void addUserSelectedFolder(AddUserFolderCallback callback);
90
82 // Get metadata about a specific media file system. 91 // Get metadata about a specific media file system.
83 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata( 92 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata(
84 [instanceOf=DOMFileSystem] object mediaFileSystem); 93 [instanceOf=DOMFileSystem] object mediaFileSystem);
85 94
86 // Get metadata for all available media galleries. 95 // Get metadata for all available media galleries.
87 static void getAllMediaFileSystemMetadata( 96 static void getAllMediaFileSystemMetadata(
88 MediaFileSystemsMetadataCallback callback); 97 MediaFileSystemsMetadataCallback callback);
89 98
90 // Gets the media-specific metadata for a media file. This should work 99 // Gets the media-specific metadata for a media file. This should work
91 // for files in media galleries as well as other DOM filesystems. 100 // for files in media galleries as well as other DOM filesystems.
92 static void getMetadata([instanceOf=Blob] object mediaFile, 101 static void getMetadata([instanceOf=Blob] object mediaFile,
93 optional MediaMetadataOptions options, 102 optional MediaMetadataOptions options,
94 MediaMetadataCallback callback); 103 MediaMetadataCallback callback);
95 }; 104 };
96 105
97 }; 106 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698