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

Side by Side Diff: chrome/common/extensions/api/media_galleries.idl

Issue 134993002: Media Galleries: chrome.mediaGalleries.addUserSelectedFolder() requires a user gesture. (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
« no previous file with comments | « chrome/browser/extensions/api/media_galleries/media_galleries_api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 interface Functions { 98 interface Functions {
99 // Get the media galleries configured in this user agent. If none are 99 // Get the media galleries configured in this user agent. If none are
100 // configured or available, the callback will receive an empty array. 100 // configured or available, the callback will receive an empty array.
101 static void getMediaFileSystems(optional MediaFileSystemsDetails details, 101 static void getMediaFileSystems(optional MediaFileSystemsDetails details,
102 MediaFileSystemsCallback callback); 102 MediaFileSystemsCallback callback);
103 103
104 // Present a directory picker to the user and add the selected directory 104 // Present a directory picker to the user and add the selected directory
105 // as a gallery. If the user cancels the picker, selectedFileSystemName 105 // as a gallery. If the user cancels the picker, selectedFileSystemName
106 // will be empty. 106 // will be empty.
107 // A user gesture is required for the dialog to display. Without a user
108 // gesture, the callback will run as though the user canceled.
107 static void addUserSelectedFolder(AddUserFolderCallback callback); 109 static void addUserSelectedFolder(AddUserFolderCallback callback);
108 110
109 // Get metadata about a specific media file system. 111 // Get metadata about a specific media file system.
110 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata( 112 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata(
111 [instanceOf=DOMFileSystem] object mediaFileSystem); 113 [instanceOf=DOMFileSystem] object mediaFileSystem);
112 114
113 // Get metadata for all available media galleries. 115 // Get metadata for all available media galleries.
114 static void getAllMediaFileSystemMetadata( 116 static void getAllMediaFileSystemMetadata(
115 MediaFileSystemsMetadataCallback callback); 117 MediaFileSystemsMetadataCallback callback);
116 118
117 // Gets the media-specific metadata for a media file. This should work 119 // Gets the media-specific metadata for a media file. This should work
118 // for files in media galleries as well as other DOM filesystems. 120 // for files in media galleries as well as other DOM filesystems.
119 static void getMetadata([instanceOf=Blob] object mediaFile, 121 static void getMetadata([instanceOf=Blob] object mediaFile,
120 optional MediaMetadataOptions options, 122 optional MediaMetadataOptions options,
121 MediaMetadataCallback callback); 123 MediaMetadataCallback callback);
122 }; 124 };
123 125
124 }; 126 };
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/media_galleries/media_galleries_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698