| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 // Generated from namespace: mediaGalleries |
| 6 |
| 7 part of chrome; |
| 8 |
| 9 /** |
| 10 * Types |
| 11 */ |
| 12 |
| 13 class MediagalleriesMediaFileSystemsDetails extends ChromeObject { |
| 14 /* |
| 15 * Public constructor |
| 16 */ |
| 17 MediagalleriesMediaFileSystemsDetails({String interactive}) { |
| 18 if (?interactive) |
| 19 this.interactive = interactive; |
| 20 } |
| 21 |
| 22 /* |
| 23 * Private constructor |
| 24 */ |
| 25 MediagalleriesMediaFileSystemsDetails._proxy(_jsObject) : super._proxy(_jsObje
ct); |
| 26 |
| 27 /* |
| 28 * Public accessors |
| 29 */ |
| 30 /// Whether to prompt the user for permission to additional media galleries |
| 31 /// before returning the permitted set. Default is silent. If the value 'yes' |
| 32 /// is passed, or if the application has not been granted access to any media |
| 33 /// galleries and the value 'if_needed' is passed, then the media gallery |
| 34 /// configuration dialog will be displayed. |
| 35 String get interactive => JS('String', '#.interactive', this._jsObject); |
| 36 |
| 37 void set interactive(String interactive) { |
| 38 JS('void', '#.interactive = #', this._jsObject, interactive); |
| 39 } |
| 40 |
| 41 } |
| 42 |
| 43 class MediagalleriesMediaFileSystemMetadata extends ChromeObject { |
| 44 /* |
| 45 * Public constructor |
| 46 */ |
| 47 MediagalleriesMediaFileSystemMetadata({String name, int galleryId, int deviceI
d, bool isRemovable, bool isMediaDevice}) { |
| 48 if (?name) |
| 49 this.name = name; |
| 50 if (?galleryId) |
| 51 this.galleryId = galleryId; |
| 52 if (?deviceId) |
| 53 this.deviceId = deviceId; |
| 54 if (?isRemovable) |
| 55 this.isRemovable = isRemovable; |
| 56 if (?isMediaDevice) |
| 57 this.isMediaDevice = isMediaDevice; |
| 58 } |
| 59 |
| 60 /* |
| 61 * Private constructor |
| 62 */ |
| 63 MediagalleriesMediaFileSystemMetadata._proxy(_jsObject) : super._proxy(_jsObje
ct); |
| 64 |
| 65 /* |
| 66 * Public accessors |
| 67 */ |
| 68 /// The name of the file system. |
| 69 String get name => JS('String', '#.name', this._jsObject); |
| 70 |
| 71 void set name(String name) { |
| 72 JS('void', '#.name = #', this._jsObject, name); |
| 73 } |
| 74 |
| 75 /// A unique and persistent id for the media gallery. |
| 76 int get galleryId => JS('int', '#.galleryId', this._jsObject); |
| 77 |
| 78 void set galleryId(int galleryId) { |
| 79 JS('void', '#.galleryId = #', this._jsObject, galleryId); |
| 80 } |
| 81 |
| 82 /// If the media gallery is on a removable device, a unique id for the device. |
| 83 int get deviceId => JS('int', '#.deviceId', this._jsObject); |
| 84 |
| 85 void set deviceId(int deviceId) { |
| 86 JS('void', '#.deviceId = #', this._jsObject, deviceId); |
| 87 } |
| 88 |
| 89 /// True if the media gallery is on a removable device. |
| 90 bool get isRemovable => JS('bool', '#.isRemovable', this._jsObject); |
| 91 |
| 92 void set isRemovable(bool isRemovable) { |
| 93 JS('void', '#.isRemovable = #', this._jsObject, isRemovable); |
| 94 } |
| 95 |
| 96 /// True if the device the media gallery is on was detected as a media device. |
| 97 /// i.e. a PTP or MTP device, or a DCIM directory is present. |
| 98 bool get isMediaDevice => JS('bool', '#.isMediaDevice', this._jsObject); |
| 99 |
| 100 void set isMediaDevice(bool isMediaDevice) { |
| 101 JS('void', '#.isMediaDevice = #', this._jsObject, isMediaDevice); |
| 102 } |
| 103 |
| 104 } |
| 105 |
| 106 /** |
| 107 * Functions |
| 108 */ |
| 109 |
| 110 class API_media_galleries { |
| 111 /* |
| 112 * API connection |
| 113 */ |
| 114 Object _jsObject; |
| 115 |
| 116 /* |
| 117 * Functions |
| 118 */ |
| 119 /// Get the media galleries configured in this user agent. If none are |
| 120 /// configured or available, the callback will receive an empty array. |
| 121 void getMediaFileSystems(void callback(List<DOMFileSystem> mediaFileSystems),
[MediagalleriesMediaFileSystemsDetails details]) { |
| 122 void __proxy_callback(mediaFileSystems) { |
| 123 if (?callback) { |
| 124 callback(mediaFileSystems); |
| 125 } |
| 126 } |
| 127 JS('void', '#.getMediaFileSystems(#, #)', this._jsObject, convertArgument(de
tails), convertDartClosureToJS(__proxy_callback, 1)); |
| 128 } |
| 129 |
| 130 /// Get metadata about a specific media file system. |
| 131 MediagalleriesMediaFileSystemMetadata getMediaFileSystemMetadata(DOMFileSystem
mediaFileSystem) => new MediagalleriesMediaFileSystemMetadata._proxy(JS('', '#.
getMediaFileSystemMetadata(#)', this._jsObject, convertArgument(mediaFileSystem)
)); |
| 132 |
| 133 API_media_galleries(this._jsObject) { |
| 134 } |
| 135 } |
| OLD | NEW |