| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace mediaGalleries { |
| 6 |
| 7 [inline_doc] enum GetMediaFileSystemsInteractivity { |
| 8 // Do not act interactively. |
| 9 no, |
| 10 // Ask the user to manage permitted media galleries. |
| 11 yes, |
| 12 // Ask the user to manage permitted galleries only if the return set would |
| 13 // otherwise be empty. |
| 14 if_needed |
| 15 }; |
| 16 |
| 17 [inline_doc] dictionary MediaFileSystemsDetails { |
| 18 // Whether to prompt the user for permission to additional media galleries |
| 19 // before returning the permitted set. Default is silent. If the value |
| 20 // 'yes' is passed, or if the application has not been granted access to |
| 21 // any media galleries and the value 'if_needed' is passed, then the |
| 22 // media gallery configuration dialog will be displayed. |
| 23 GetMediaFileSystemsInteractivity? interactive; |
| 24 }; |
| 25 |
| 26 callback MediaFileSystemsCallback = |
| 27 void ([instanceOf=DOMFileSystem] optional object[] mediaFileSystems); |
| 28 |
| 29 [inline_doc] dictionary MediaFileSystemMetadata { |
| 30 // The name of the file system. |
| 31 DOMString name; |
| 32 |
| 33 // A unique and persistent id for the media gallery. |
| 34 long galleryId; |
| 35 |
| 36 // If the media gallery is on a removable device, a unique id for the |
| 37 // device. |
| 38 long? deviceId; |
| 39 |
| 40 // True if the media gallery is on a removable device. |
| 41 boolean isRemovable; |
| 42 |
| 43 // True if the device the media gallery is on was detected as a media |
| 44 // device. i.e. a PTP or MTP device, or a DCIM directory is present. |
| 45 boolean isMediaDevice; |
| 46 }; |
| 47 |
| 48 interface Functions { |
| 49 // Get the media galleries configured in this user agent. If none are |
| 50 // configured or available, the callback will receive an empty array. |
| 51 static void getMediaFileSystems(optional MediaFileSystemsDetails details, |
| 52 MediaFileSystemsCallback callback); |
| 53 |
| 54 // Get metadata about a specific media file system. |
| 55 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata( |
| 56 [instanceOf=DOMFileSystem] object mediaFileSystem); |
| 57 }; |
| 58 |
| 59 }; |
| OLD | NEW |