OLD | NEW |
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 (audio, | 5 // Use the <code>chrome.mediaGalleries</code> API to access media files (audio, |
6 // images, video) from the user's local disks (with the user's consent). | 6 // images, video) from the user's local disks (with the user's consent). |
7 namespace mediaGalleries { | 7 namespace mediaGalleries { |
8 | 8 |
9 [inline_doc] enum GalleryChangeType { | 9 [inline_doc] enum GalleryChangeType { |
10 // The contents of the gallery have changed. | 10 // The contents of the gallery have changed. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 DOMString? language; | 161 DOMString? language; |
162 DOMString? title; | 162 DOMString? title; |
163 long? track; | 163 long? track; |
164 | 164 |
165 // All the metadata in the media file. For formats with multiple streams, | 165 // All the metadata in the media file. For formats with multiple streams, |
166 // stream order will be preserved. Container metadata is the first element. | 166 // stream order will be preserved. Container metadata is the first element. |
167 StreamInfo[] rawTags; | 167 StreamInfo[] rawTags; |
168 | 168 |
169 // The images embedded in the media file's metadata. This is most often | 169 // The images embedded in the media file's metadata. This is most often |
170 // used for album art or video thumbnails. | 170 // used for album art or video thumbnails. |
171 [instanceof=Blob] object[] attachedImages; | 171 [instanceOf=Blob] object[] attachedImages; |
172 }; | 172 }; |
173 | 173 |
174 callback MediaMetadataCallback = void (MediaMetadata metadata); | 174 callback MediaMetadataCallback = void (MediaMetadata metadata); |
175 | 175 |
176 interface Functions { | 176 interface Functions { |
177 // Get the media galleries configured in this user agent. If none are | 177 // Get the media galleries configured in this user agent. If none are |
178 // configured or available, the callback will receive an empty array. | 178 // configured or available, the callback will receive an empty array. |
179 static void getMediaFileSystems(optional MediaFileSystemsDetails details, | 179 static void getMediaFileSystems(optional MediaFileSystemsDetails details, |
180 MediaFileSystemsCallback callback); | 180 MediaFileSystemsCallback callback); |
181 | 181 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 interface Events { | 225 interface Events { |
226 // Fired when a media gallery is changed or a gallery watch is dropped. | 226 // Fired when a media gallery is changed or a gallery watch is dropped. |
227 static void onGalleryChanged(GalleryChangeDetails details); | 227 static void onGalleryChanged(GalleryChangeDetails details); |
228 | 228 |
229 // The pending media scan has changed state. See details for more | 229 // The pending media scan has changed state. See details for more |
230 // information. | 230 // information. |
231 static void onScanProgress(ScanProgressDetails details); | 231 static void onScanProgress(ScanProgressDetails details); |
232 }; | 232 }; |
233 }; | 233 }; |
OLD | NEW |