| 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 (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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 boolean isRemovable; | 43 boolean isRemovable; |
| 44 | 44 |
| 45 // True if the device the media gallery is on was detected as a media | 45 // True if the device the media gallery is on was detected as a media |
| 46 // device. i.e. a PTP or MTP device, or a DCIM directory is present. | 46 // device. i.e. a PTP or MTP device, or a DCIM directory is present. |
| 47 boolean isMediaDevice; | 47 boolean isMediaDevice; |
| 48 | 48 |
| 49 // True if the device is currently available. | 49 // True if the device is currently available. |
| 50 boolean isAvailable; | 50 boolean isAvailable; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 callback MediaGalleriesMetadataCallback = | 53 callback MediaFileSystemsMetadataCallback = |
| 54 void (MediaFileSystemMetadata[] metadata); | 54 void (MediaFileSystemMetadata[] metadata); |
| 55 | 55 |
| 56 interface Functions { | 56 interface Functions { |
| 57 // Get the media galleries configured in this user agent. If none are | 57 // Get the media galleries configured in this user agent. If none are |
| 58 // configured or available, the callback will receive an empty array. | 58 // configured or available, the callback will receive an empty array. |
| 59 static void getMediaFileSystems(optional MediaFileSystemsDetails details, | 59 static void getMediaFileSystems(optional MediaFileSystemsDetails details, |
| 60 MediaFileSystemsCallback callback); | 60 MediaFileSystemsCallback callback); |
| 61 | 61 |
| 62 // Get metadata about a specific media file system. | 62 // Get metadata about a specific media file system. |
| 63 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata( | 63 [nocompile] static MediaFileSystemMetadata getMediaFileSystemMetadata( |
| 64 [instanceOf=DOMFileSystem] object mediaFileSystem); | 64 [instanceOf=DOMFileSystem] object mediaFileSystem); |
| 65 | 65 |
| 66 // Get metadata for all available media galleries. | 66 // Get metadata for all available media galleries. |
| 67 static void getAllMediaFileSystemMetadata( | 67 static void getAllMediaFileSystemMetadata( |
| 68 MediaGalleriesMetadataCallback callback); | 68 MediaFileSystemsMetadataCallback callback); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 }; | 71 }; |
| OLD | NEW |