| // components/mirroring/mojom/mirroring_service.mojom-lite-for-compile.js is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2018 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| /** |
| * @fileoverview |
| * @suppress {missingRequire} |
| */ |
| 'use strict'; |
| |
| goog.require('mojo.internal'); |
| goog.require('mojo.internal.interfaceSupport'); |
| |
| goog.require('sandbox.mojom.Sandbox'); |
| goog.require('mirroring.mojom.CastMessageChannel'); |
| goog.require('mirroring.mojom.ResourceProvider'); |
| goog.require('mirroring.mojom.SessionObserver'); |
| goog.require('mirroring.mojom.SessionParameters'); |
| goog.require('gfx.mojom.Size'); |
| goog.require('mojoBase.mojom.Value'); |
| |
| |
| |
| goog.provide('mirroring.mojom.MIRRORING_SANDBOX'); |
| /** |
| * @const { !sandbox.mojom.Sandbox } |
| * @export |
| */ |
| mirroring.mojom.MIRRORING_SANDBOX = sandbox.mojom.Sandbox.kService; |
| |
| |
| |
| goog.provide('mirroring.mojom.MirroringService'); |
| goog.provide('mirroring.mojom.MirroringServiceReceiver'); |
| goog.provide('mirroring.mojom.MirroringServiceCallbackRouter'); |
| goog.provide('mirroring.mojom.MirroringServiceInterface'); |
| goog.provide('mirroring.mojom.MirroringServiceRemote'); |
| goog.provide('mirroring.mojom.MirroringServicePendingReceiver'); |
| |
| |
| /** |
| * @implements {mojo.internal.interfaceSupport.PendingReceiver} |
| * @export |
| */ |
| mirroring.mojom.MirroringServicePendingReceiver = class { |
| /** |
| * @param {!MojoHandle|!mojo.internal.interfaceSupport.Endpoint} handle |
| */ |
| constructor(handle) { |
| /** @public {!mojo.internal.interfaceSupport.Endpoint} */ |
| this.handle = mojo.internal.interfaceSupport.getEndpointForReceiver(handle); |
| } |
| |
| /** @param {string=} scope */ |
| bindInBrowser(scope = 'context') { |
| mojo.internal.interfaceSupport.bind( |
| this.handle, |
| mirroring.mojom.MirroringService.$interfaceName, |
| scope); |
| } |
| }; |
| |
| /** @interface */ |
| mirroring.mojom.MirroringServiceInterface = class { |
| |
| /** |
| * @param { !mirroring.mojom.SessionParameters } params |
| * @param { !gfx.mojom.Size } maxResolution |
| * @param { !mirroring.mojom.SessionObserverRemote } observer |
| * @param { !mirroring.mojom.ResourceProviderRemote } resourceProvider |
| * @param { !mirroring.mojom.CastMessageChannelRemote } outboundChannel |
| * @param { !mirroring.mojom.CastMessageChannelPendingReceiver } inboundChannel |
| */ |
| |
| start(params, maxResolution, observer, resourceProvider, outboundChannel, inboundChannel) {} |
| |
| /** |
| */ |
| |
| switchMirroringSourceTab() {} |
| |
| /** |
| * @return {!Promise<{ |
| jsonStats: !mojoBase.mojom.Value, |
| * }>} |
| */ |
| |
| getMirroringStats() {} |
| }; |
| |
| /** |
| * @export |
| * @implements { mirroring.mojom.MirroringServiceInterface } |
| */ |
| mirroring.mojom.MirroringServiceRemote = class { |
| /** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */ |
| constructor(handle = undefined) { |
| /** |
| * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!mirroring.mojom.MirroringServicePendingReceiver>} |
| */ |
| this.proxy = |
| new mojo.internal.interfaceSupport.InterfaceRemoteBase( |
| mirroring.mojom.MirroringServicePendingReceiver, |
| handle); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!mirroring.mojom.MirroringServicePendingReceiver>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy); |
| |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.proxy.getConnectionErrorEventRouter(); |
| } |
| |
| |
| /** |
| * @param { !mirroring.mojom.SessionParameters } params |
| * @param { !gfx.mojom.Size } maxResolution |
| * @param { !mirroring.mojom.SessionObserverRemote } observer |
| * @param { !mirroring.mojom.ResourceProviderRemote } resourceProvider |
| * @param { !mirroring.mojom.CastMessageChannelRemote } outboundChannel |
| * @param { !mirroring.mojom.CastMessageChannelPendingReceiver } inboundChannel |
| */ |
| |
| start( |
| params, |
| maxResolution, |
| observer, |
| resourceProvider, |
| outboundChannel, |
| inboundChannel) { |
| this.proxy.sendMessage( |
| 0, |
| mirroring.mojom.MirroringService_Start_ParamsSpec.$, |
| null, |
| [ |
| params, |
| maxResolution, |
| observer, |
| resourceProvider, |
| outboundChannel, |
| inboundChannel |
| ]); |
| } |
| |
| |
| /** |
| */ |
| |
| switchMirroringSourceTab() { |
| this.proxy.sendMessage( |
| 1, |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec.$, |
| null, |
| [ |
| ]); |
| } |
| |
| |
| /** |
| * @return {!Promise<{ |
| jsonStats: !mojoBase.mojom.Value, |
| * }>} |
| */ |
| |
| getMirroringStats() { |
| return this.proxy.sendMessage( |
| 2, |
| mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec.$, |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec.$, |
| [ |
| ]); |
| } |
| }; |
| |
| /** |
| * An object which receives request messages for the MirroringService |
| * mojom interface. Must be constructed over an object which implements that |
| * interface. |
| * |
| * @export |
| */ |
| mirroring.mojom.MirroringServiceReceiver = class { |
| /** |
| * @param {!mirroring.mojom.MirroringServiceInterface } impl |
| */ |
| constructor(impl) { |
| /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!mirroring.mojom.MirroringServiceRemote>} */ |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| mirroring.mojom.MirroringServiceRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!mirroring.mojom.MirroringServiceRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| mirroring.mojom.MirroringService_Start_ParamsSpec.$, |
| null, |
| impl.start.bind(impl)); |
| this.helper_internal_.registerHandler( |
| 1, |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec.$, |
| null, |
| impl.switchMirroringSourceTab.bind(impl)); |
| this.helper_internal_.registerHandler( |
| 2, |
| mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec.$, |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec.$, |
| impl.getMirroringStats.bind(impl)); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| }; |
| |
| /** |
| * @export |
| */ |
| mirroring.mojom.MirroringService = class { |
| /** |
| * @return {!string} |
| */ |
| static get $interfaceName() { |
| return "mirroring.mojom.MirroringService"; |
| } |
| |
| /** |
| * Returns a remote for this interface which sends messages to the browser. |
| * The browser must have an interface request binder registered for this |
| * interface and accessible to the calling document's frame. |
| * |
| * @return {!mirroring.mojom.MirroringServiceRemote} |
| * @export |
| */ |
| static getRemote() { |
| let remote = new mirroring.mojom.MirroringServiceRemote; |
| remote.$.bindNewPipeAndPassReceiver().bindInBrowser(); |
| return remote; |
| } |
| }; |
| |
| |
| /** |
| * An object which receives request messages for the MirroringService |
| * mojom interface and dispatches them as callbacks. One callback receiver exists |
| * on this object for each message defined in the mojom interface, and each |
| * receiver can have any number of listeners added to it. |
| * |
| * @export |
| */ |
| mirroring.mojom.MirroringServiceCallbackRouter = class { |
| constructor() { |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| mirroring.mojom.MirroringServiceRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!mirroring.mojom.MirroringServiceRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| this.router_ = new mojo.internal.interfaceSupport.CallbackRouter; |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.start = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| mirroring.mojom.MirroringService_Start_ParamsSpec.$, |
| null, |
| this.start.createReceiverHandler(false /* expectsResponse */)); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.switchMirroringSourceTab = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 1, |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec.$, |
| null, |
| this.switchMirroringSourceTab.createReceiverHandler(false /* expectsResponse */)); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.getMirroringStats = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 2, |
| mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec.$, |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec.$, |
| this.getMirroringStats.createReceiverHandler(true /* expectsResponse */)); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| |
| /** |
| * @param {number} id An ID returned by a prior call to addListener. |
| * @return {boolean} True iff the identified listener was found and removed. |
| * @export |
| */ |
| removeListener(id) { |
| return this.router_.removeListener(id); |
| } |
| }; |
| |
| |
| goog.provide('mirroring.mojom.MirroringService_Start_ParamsSpec'); |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| mirroring.mojom.MirroringService_Start_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| goog.provide('mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec'); |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| goog.provide('mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec'); |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| goog.provide('mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec'); |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| |
| |
| mojo.internal.Struct( |
| mirroring.mojom.MirroringService_Start_ParamsSpec.$, |
| 'MirroringService_Start_Params', |
| [ |
| mojo.internal.StructField( |
| 'params', 0, |
| 0, |
| mirroring.mojom.SessionParametersSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'maxResolution', 8, |
| 0, |
| gfx.mojom.SizeSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'observer', 16, |
| 0, |
| mojo.internal.InterfaceProxy(mirroring.mojom.SessionObserverRemote), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'resourceProvider', 24, |
| 0, |
| mojo.internal.InterfaceProxy(mirroring.mojom.ResourceProviderRemote), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'outboundChannel', 32, |
| 0, |
| mojo.internal.InterfaceProxy(mirroring.mojom.CastMessageChannelRemote), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'inboundChannel', 40, |
| 0, |
| mojo.internal.InterfaceRequest(mirroring.mojom.CastMessageChannelPendingReceiver), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 56],]); |
| |
| |
| |
| goog.provide('mirroring.mojom.MirroringService_Start_Params'); |
| |
| /** @record */ |
| mirroring.mojom.MirroringService_Start_Params = class { |
| constructor() { |
| /** @export { !mirroring.mojom.SessionParameters } */ |
| this.params; |
| /** @export { !gfx.mojom.Size } */ |
| this.maxResolution; |
| /** @export { !mirroring.mojom.SessionObserverRemote } */ |
| this.observer; |
| /** @export { !mirroring.mojom.ResourceProviderRemote } */ |
| this.resourceProvider; |
| /** @export { !mirroring.mojom.CastMessageChannelRemote } */ |
| this.outboundChannel; |
| /** @export { !mirroring.mojom.CastMessageChannelPendingReceiver } */ |
| this.inboundChannel; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_ParamsSpec.$, |
| 'MirroringService_SwitchMirroringSourceTab_Params', |
| [ |
| ], |
| [[0, 8],]); |
| |
| |
| |
| goog.provide('mirroring.mojom.MirroringService_SwitchMirroringSourceTab_Params'); |
| |
| /** @record */ |
| mirroring.mojom.MirroringService_SwitchMirroringSourceTab_Params = class { |
| constructor() { |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| mirroring.mojom.MirroringService_GetMirroringStats_ParamsSpec.$, |
| 'MirroringService_GetMirroringStats_Params', |
| [ |
| ], |
| [[0, 8],]); |
| |
| |
| |
| goog.provide('mirroring.mojom.MirroringService_GetMirroringStats_Params'); |
| |
| /** @record */ |
| mirroring.mojom.MirroringService_GetMirroringStats_Params = class { |
| constructor() { |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParamsSpec.$, |
| 'MirroringService_GetMirroringStats_ResponseParams', |
| [ |
| mojo.internal.StructField( |
| 'jsonStats', 0, |
| 0, |
| mojoBase.mojom.ValueSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 24],]); |
| |
| |
| |
| goog.provide('mirroring.mojom.MirroringService_GetMirroringStats_ResponseParams'); |
| |
| /** @record */ |
| mirroring.mojom.MirroringService_GetMirroringStats_ResponseParams = class { |
| constructor() { |
| /** @export { !mojoBase.mojom.Value } */ |
| this.jsonStats; |
| } |
| }; |
| |