| Index: tools/dom/src/chrome/media_galleries_private.dart
|
| diff --git a/tools/dom/src/chrome/media_galleries_private.dart b/tools/dom/src/chrome/media_galleries_private.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..11c30a2bd814e54cdc4f5657674189109bbde60a
|
| --- /dev/null
|
| +++ b/tools/dom/src/chrome/media_galleries_private.dart
|
| @@ -0,0 +1,273 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +// Generated from namespace: mediaGalleriesPrivate
|
| +
|
| +part of chrome;
|
| +
|
| +/**
|
| + * Types
|
| + */
|
| +
|
| +class MediagalleriesprivateDeviceAttachmentDetails extends ChromeObject {
|
| + /*
|
| + * Public constructor
|
| + */
|
| + MediagalleriesprivateDeviceAttachmentDetails({String deviceName, String deviceId}) {
|
| + if (?deviceName)
|
| + this.deviceName = deviceName;
|
| + if (?deviceId)
|
| + this.deviceId = deviceId;
|
| + }
|
| +
|
| + /*
|
| + * Private constructor
|
| + */
|
| + MediagalleriesprivateDeviceAttachmentDetails._proxy(_jsObject) : super._proxy(_jsObject);
|
| +
|
| + /*
|
| + * Public accessors
|
| + */
|
| + /// The name of the device.
|
| + String get deviceName => JS('String', '#.deviceName', this._jsObject);
|
| +
|
| + void set deviceName(String deviceName) {
|
| + JS('void', '#.deviceName = #', this._jsObject, deviceName);
|
| + }
|
| +
|
| + /// A transient id that unique identifies the device.
|
| + String get deviceId => JS('String', '#.deviceId', this._jsObject);
|
| +
|
| + void set deviceId(String deviceId) {
|
| + JS('void', '#.deviceId = #', this._jsObject, deviceId);
|
| + }
|
| +
|
| +}
|
| +
|
| +class MediagalleriesprivateDeviceDetachmentDetails extends ChromeObject {
|
| + /*
|
| + * Public constructor
|
| + */
|
| + MediagalleriesprivateDeviceDetachmentDetails({String deviceId}) {
|
| + if (?deviceId)
|
| + this.deviceId = deviceId;
|
| + }
|
| +
|
| + /*
|
| + * Private constructor
|
| + */
|
| + MediagalleriesprivateDeviceDetachmentDetails._proxy(_jsObject) : super._proxy(_jsObject);
|
| +
|
| + /*
|
| + * Public accessors
|
| + */
|
| + /// A transient id that unique identifies the device.
|
| + String get deviceId => JS('String', '#.deviceId', this._jsObject);
|
| +
|
| + void set deviceId(String deviceId) {
|
| + JS('void', '#.deviceId = #', this._jsObject, deviceId);
|
| + }
|
| +
|
| +}
|
| +
|
| +class MediagalleriesprivateGalleryChangeDetails extends ChromeObject {
|
| + /*
|
| + * Public constructor
|
| + */
|
| + MediagalleriesprivateGalleryChangeDetails({int galleryId}) {
|
| + if (?galleryId)
|
| + this.galleryId = galleryId;
|
| + }
|
| +
|
| + /*
|
| + * Private constructor
|
| + */
|
| + MediagalleriesprivateGalleryChangeDetails._proxy(_jsObject) : super._proxy(_jsObject);
|
| +
|
| + /*
|
| + * Public accessors
|
| + */
|
| + /// Gallery identifier.
|
| + int get galleryId => JS('int', '#.galleryId', this._jsObject);
|
| +
|
| + void set galleryId(int galleryId) {
|
| + JS('void', '#.galleryId = #', this._jsObject, galleryId);
|
| + }
|
| +
|
| +}
|
| +
|
| +class MediagalleriesprivateAddGalleryWatchResult extends ChromeObject {
|
| + /*
|
| + * Public constructor
|
| + */
|
| + MediagalleriesprivateAddGalleryWatchResult({int galleryId, bool success}) {
|
| + if (?galleryId)
|
| + this.galleryId = galleryId;
|
| + if (?success)
|
| + this.success = success;
|
| + }
|
| +
|
| + /*
|
| + * Private constructor
|
| + */
|
| + MediagalleriesprivateAddGalleryWatchResult._proxy(_jsObject) : super._proxy(_jsObject);
|
| +
|
| + /*
|
| + * Public accessors
|
| + */
|
| + int get galleryId => JS('int', '#.galleryId', this._jsObject);
|
| +
|
| + void set galleryId(int galleryId) {
|
| + JS('void', '#.galleryId = #', this._jsObject, galleryId);
|
| + }
|
| +
|
| + bool get success => JS('bool', '#.success', this._jsObject);
|
| +
|
| + void set success(bool success) {
|
| + JS('void', '#.success = #', this._jsObject, success);
|
| + }
|
| +
|
| +}
|
| +
|
| +/**
|
| + * Events
|
| + */
|
| +
|
| +/// Fired when a media device gets attached.
|
| +class Event_media_galleries_private_onDeviceAttached extends Event {
|
| + void addListener(void callback(MediagalleriesprivateDeviceAttachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceAttachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.addListener(callback);
|
| + }
|
| +
|
| + void removeListener(void callback(MediagalleriesprivateDeviceAttachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceAttachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.removeListener(callback);
|
| + }
|
| +
|
| + bool hasListener(void callback(MediagalleriesprivateDeviceAttachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceAttachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.hasListener(callback);
|
| + }
|
| +
|
| + Event_media_galleries_private_onDeviceAttached(jsObject) : super._(jsObject, 1);
|
| +}
|
| +
|
| +/// Fired when a media device gets detached.
|
| +class Event_media_galleries_private_onDeviceDetached extends Event {
|
| + void addListener(void callback(MediagalleriesprivateDeviceDetachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceDetachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.addListener(callback);
|
| + }
|
| +
|
| + void removeListener(void callback(MediagalleriesprivateDeviceDetachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceDetachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.removeListener(callback);
|
| + }
|
| +
|
| + bool hasListener(void callback(MediagalleriesprivateDeviceDetachmentDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateDeviceDetachmentDetails._proxy(details));
|
| + }
|
| + }
|
| + super.hasListener(callback);
|
| + }
|
| +
|
| + Event_media_galleries_private_onDeviceDetached(jsObject) : super._(jsObject, 1);
|
| +}
|
| +
|
| +/// Fired when a media gallery is changed.
|
| +class Event_media_galleries_private_onGalleryChanged extends Event {
|
| + void addListener(void callback(MediagalleriesprivateGalleryChangeDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateGalleryChangeDetails._proxy(details));
|
| + }
|
| + }
|
| + super.addListener(callback);
|
| + }
|
| +
|
| + void removeListener(void callback(MediagalleriesprivateGalleryChangeDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateGalleryChangeDetails._proxy(details));
|
| + }
|
| + }
|
| + super.removeListener(callback);
|
| + }
|
| +
|
| + bool hasListener(void callback(MediagalleriesprivateGalleryChangeDetails details)) {
|
| + void __proxy_callback(details) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateGalleryChangeDetails._proxy(details));
|
| + }
|
| + }
|
| + super.hasListener(callback);
|
| + }
|
| +
|
| + Event_media_galleries_private_onGalleryChanged(jsObject) : super._(jsObject, 1);
|
| +}
|
| +
|
| +/**
|
| + * Functions
|
| + */
|
| +
|
| +class API_media_galleries_private {
|
| + /*
|
| + * API connection
|
| + */
|
| + Object _jsObject;
|
| +
|
| + /*
|
| + * Events
|
| + */
|
| + Event_media_galleries_private_onDeviceAttached onDeviceAttached;
|
| + Event_media_galleries_private_onDeviceDetached onDeviceDetached;
|
| + Event_media_galleries_private_onGalleryChanged onGalleryChanged;
|
| +
|
| + /*
|
| + * Functions
|
| + */
|
| + void addGalleryWatch(int galleryId, void callback(MediagalleriesprivateAddGalleryWatchResult result)) {
|
| + void __proxy_callback(result) {
|
| + if (?callback) {
|
| + callback(new MediagalleriesprivateAddGalleryWatchResult._proxy(result));
|
| + }
|
| + }
|
| + JS('void', '#.addGalleryWatch(#, #)', this._jsObject, galleryId, convertDartClosureToJS(__proxy_callback, 1));
|
| + }
|
| +
|
| + void removeGalleryWatch(int galleryId) => JS('void', '#.removeGalleryWatch(#)', this._jsObject, galleryId);
|
| +
|
| + void getAllGalleryWatch(void callback(List<int> galleryIds)) => JS('void', '#.getAllGalleryWatch(#)', this._jsObject, convertDartClosureToJS(callback, 1));
|
| +
|
| + void removeAllGalleryWatch() => JS('void', '#.removeAllGalleryWatch()', this._jsObject);
|
| +
|
| + API_media_galleries_private(this._jsObject) {
|
| + onDeviceAttached = new Event_media_galleries_private_onDeviceAttached(JS('', '#.onDeviceAttached', this._jsObject));
|
| + onDeviceDetached = new Event_media_galleries_private_onDeviceDetached(JS('', '#.onDeviceDetached', this._jsObject));
|
| + onGalleryChanged = new Event_media_galleries_private_onGalleryChanged(JS('', '#.onGalleryChanged', this._jsObject));
|
| + }
|
| +}
|
|
|