| // content/common/gin_java_bridge.mojom-lite.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'; |
| |
| |
| mojo.internal.exportModule('content.mojom'); |
| |
| |
| |
| |
| |
| /** |
| * @const { {$: !mojo.internal.MojomType} } |
| * @export |
| */ |
| content.mojom.GinJavaBridgeErrorSpec = { $: mojo.internal.Enum() }; |
| |
| /** |
| * @enum {number} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeError = { |
| |
| kGinJavaBridgeNoError: 0, |
| kGinJavaBridgeUnknownObjectId: 1, |
| kGinJavaBridgeObjectIsGone: 2, |
| kGinJavaBridgeMethodNotFound: 3, |
| kGinJavaBridgeAccessToObjectGetClassIsBlocked: 4, |
| kGinJavaBridgeJavaExceptionRaised: 5, |
| kGinJavaBridgeNonAssignableTypes: 6, |
| kGinJavaBridgeRenderFrameDeleted: 7, |
| MIN_VALUE: 0, |
| MAX_VALUE: 7, |
| }; |
| |
| |
| |
| |
| |
| /** |
| * @implements {mojo.internal.interfaceSupport.PendingReceiver} |
| * @export |
| */ |
| content.mojom.GinJavaBridgePendingReceiver = 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, |
| content.mojom.GinJavaBridge.$interfaceName, |
| scope); |
| } |
| }; |
| |
| |
| |
| /** |
| * @export |
| * @implements { content.mojom.GinJavaBridgeInterface } |
| */ |
| content.mojom.GinJavaBridgeRemote = class { |
| /** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */ |
| constructor(handle = undefined) { |
| /** |
| * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!content.mojom.GinJavaBridgePendingReceiver>} |
| */ |
| this.proxy = |
| new mojo.internal.interfaceSupport.InterfaceRemoteBase( |
| content.mojom.GinJavaBridgePendingReceiver, |
| handle); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!content.mojom.GinJavaBridgePendingReceiver>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy); |
| |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.proxy.getConnectionErrorEventRouter(); |
| } |
| |
| |
| /** |
| * @param { !string } name |
| * @param { !number } objectId |
| * @param { !originMatcher.mojom.OriginMatcher } originMatcher |
| */ |
| |
| addNamedObject( |
| name, |
| objectId, |
| originMatcher) { |
| this.proxy.sendMessage( |
| 0, |
| content.mojom.GinJavaBridge_AddNamedObject_ParamsSpec.$, |
| null, |
| [ |
| name, |
| objectId, |
| originMatcher |
| ], |
| false); |
| } |
| |
| |
| /** |
| * @param { !string } name |
| */ |
| |
| removeNamedObject( |
| name) { |
| this.proxy.sendMessage( |
| 1, |
| content.mojom.GinJavaBridge_RemoveNamedObject_ParamsSpec.$, |
| null, |
| [ |
| name |
| ], |
| false); |
| } |
| |
| |
| /** |
| * @param { !content.mojom.GinJavaBridgeHostRemote } host |
| */ |
| |
| setHost( |
| host) { |
| this.proxy.sendMessage( |
| 2, |
| content.mojom.GinJavaBridge_SetHost_ParamsSpec.$, |
| null, |
| [ |
| host |
| ], |
| false); |
| } |
| }; |
| |
| /** |
| * An object which receives request messages for the GinJavaBridge |
| * mojom interface. Must be constructed over an object which implements that |
| * interface. |
| * |
| * @export |
| */ |
| content.mojom.GinJavaBridgeReceiver = class { |
| /** |
| * @param {!content.mojom.GinJavaBridgeInterface } impl |
| */ |
| constructor(impl) { |
| /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!content.mojom.GinJavaBridgeRemote>} */ |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridge_AddNamedObject_ParamsSpec.$, |
| null, |
| impl.addNamedObject.bind(impl), |
| false); |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridge_RemoveNamedObject_ParamsSpec.$, |
| null, |
| impl.removeNamedObject.bind(impl), |
| false); |
| this.helper_internal_.registerHandler( |
| 2, |
| content.mojom.GinJavaBridge_SetHost_ParamsSpec.$, |
| null, |
| impl.setHost.bind(impl), |
| false); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| }; |
| |
| /** |
| * @export |
| */ |
| content.mojom.GinJavaBridge = class { |
| /** |
| * @return {!string} |
| */ |
| static get $interfaceName() { |
| return "content.mojom.GinJavaBridge"; |
| } |
| |
| /** |
| * 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 {!content.mojom.GinJavaBridgeRemote} |
| * @export |
| */ |
| static getRemote() { |
| let remote = new content.mojom.GinJavaBridgeRemote; |
| remote.$.bindNewPipeAndPassReceiver().bindInBrowser(); |
| return remote; |
| } |
| }; |
| |
| |
| /** |
| * An object which receives request messages for the GinJavaBridge |
| * 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 |
| */ |
| content.mojom.GinJavaBridgeCallbackRouter = class { |
| constructor() { |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| this.router_ = new mojo.internal.interfaceSupport.CallbackRouter; |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.addNamedObject = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridge_AddNamedObject_ParamsSpec.$, |
| null, |
| this.addNamedObject.createReceiverHandler(false /* expectsResponse */), |
| false); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.removeNamedObject = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridge_RemoveNamedObject_ParamsSpec.$, |
| null, |
| this.removeNamedObject.createReceiverHandler(false /* expectsResponse */), |
| false); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.setHost = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 2, |
| content.mojom.GinJavaBridge_SetHost_ParamsSpec.$, |
| null, |
| this.setHost.createReceiverHandler(false /* expectsResponse */), |
| false); |
| /** @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); |
| } |
| }; |
| |
| |
| |
| |
| /** |
| * @implements {mojo.internal.interfaceSupport.PendingReceiver} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObjectPendingReceiver = 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, |
| content.mojom.GinJavaBridgeRemoteObject.$interfaceName, |
| scope); |
| } |
| }; |
| |
| |
| |
| /** |
| * @export |
| * @implements { content.mojom.GinJavaBridgeRemoteObjectInterface } |
| */ |
| content.mojom.GinJavaBridgeRemoteObjectRemote = class { |
| /** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */ |
| constructor(handle = undefined) { |
| /** |
| * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!content.mojom.GinJavaBridgeRemoteObjectPendingReceiver>} |
| */ |
| this.proxy = |
| new mojo.internal.interfaceSupport.InterfaceRemoteBase( |
| content.mojom.GinJavaBridgeRemoteObjectPendingReceiver, |
| handle); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!content.mojom.GinJavaBridgeRemoteObjectPendingReceiver>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy); |
| |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.proxy.getConnectionErrorEventRouter(); |
| } |
| |
| |
| /** |
| * @return {!Promise<{ |
| methodNames: !Array<!string>, |
| * }>} |
| */ |
| |
| getMethods() { |
| return this.proxy.sendMessage( |
| 0, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParamsSpec.$, |
| [ |
| ], |
| false); |
| } |
| |
| |
| /** |
| * @param { !string } methodName |
| * @return {!Promise<{ |
| result: !boolean, |
| * }>} |
| */ |
| |
| hasMethod( |
| methodName) { |
| return this.proxy.sendMessage( |
| 1, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParamsSpec.$, |
| [ |
| methodName |
| ], |
| false); |
| } |
| |
| |
| /** |
| * @param { !string } methodName |
| * @param { !mojoBase.mojom.ListValue } arguments_ |
| * @return {!Promise<{ |
| errorCode: !content.mojom.GinJavaBridgeError, |
| result: !mojoBase.mojom.ListValue, |
| * }>} |
| */ |
| |
| invokeMethod( |
| methodName, |
| arguments_) { |
| return this.proxy.sendMessage( |
| 2, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParamsSpec.$, |
| [ |
| methodName, |
| arguments_ |
| ], |
| false); |
| } |
| }; |
| |
| /** |
| * An object which receives request messages for the GinJavaBridgeRemoteObject |
| * mojom interface. Must be constructed over an object which implements that |
| * interface. |
| * |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObjectReceiver = class { |
| /** |
| * @param {!content.mojom.GinJavaBridgeRemoteObjectInterface } impl |
| */ |
| constructor(impl) { |
| /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!content.mojom.GinJavaBridgeRemoteObjectRemote>} */ |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeRemoteObjectRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeRemoteObjectRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParamsSpec.$, |
| impl.getMethods.bind(impl), |
| false); |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParamsSpec.$, |
| impl.hasMethod.bind(impl), |
| false); |
| this.helper_internal_.registerHandler( |
| 2, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParamsSpec.$, |
| impl.invokeMethod.bind(impl), |
| false); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| }; |
| |
| /** |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject = class { |
| /** |
| * @return {!string} |
| */ |
| static get $interfaceName() { |
| return "content.mojom.GinJavaBridgeRemoteObject"; |
| } |
| |
| /** |
| * 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 {!content.mojom.GinJavaBridgeRemoteObjectRemote} |
| * @export |
| */ |
| static getRemote() { |
| let remote = new content.mojom.GinJavaBridgeRemoteObjectRemote; |
| remote.$.bindNewPipeAndPassReceiver().bindInBrowser(); |
| return remote; |
| } |
| }; |
| |
| |
| /** |
| * An object which receives request messages for the GinJavaBridgeRemoteObject |
| * 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 |
| */ |
| content.mojom.GinJavaBridgeRemoteObjectCallbackRouter = class { |
| constructor() { |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeRemoteObjectRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeRemoteObjectRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| this.router_ = new mojo.internal.interfaceSupport.CallbackRouter; |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.getMethods = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParamsSpec.$, |
| this.getMethods.createReceiverHandler(true /* expectsResponse */), |
| false); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.hasMethod = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParamsSpec.$, |
| this.hasMethod.createReceiverHandler(true /* expectsResponse */), |
| false); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.invokeMethod = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 2, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ParamsSpec.$, |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParamsSpec.$, |
| this.invokeMethod.createReceiverHandler(true /* expectsResponse */), |
| false); |
| /** @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); |
| } |
| }; |
| |
| |
| |
| |
| /** |
| * @implements {mojo.internal.interfaceSupport.PendingReceiver} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeHostPendingReceiver = 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, |
| content.mojom.GinJavaBridgeHost.$interfaceName, |
| scope); |
| } |
| }; |
| |
| |
| |
| /** |
| * @export |
| * @implements { content.mojom.GinJavaBridgeHostInterface } |
| */ |
| content.mojom.GinJavaBridgeHostRemote = class { |
| /** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */ |
| constructor(handle = undefined) { |
| /** |
| * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!content.mojom.GinJavaBridgeHostPendingReceiver>} |
| */ |
| this.proxy = |
| new mojo.internal.interfaceSupport.InterfaceRemoteBase( |
| content.mojom.GinJavaBridgeHostPendingReceiver, |
| handle); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!content.mojom.GinJavaBridgeHostPendingReceiver>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy); |
| |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.proxy.getConnectionErrorEventRouter(); |
| } |
| |
| |
| /** |
| * @param { !number } objectId |
| * @param { !content.mojom.GinJavaBridgeRemoteObjectPendingReceiver } receiver |
| */ |
| |
| getObject( |
| objectId, |
| receiver) { |
| this.proxy.sendMessage( |
| 0, |
| content.mojom.GinJavaBridgeHost_GetObject_ParamsSpec.$, |
| null, |
| [ |
| objectId, |
| receiver |
| ], |
| false); |
| } |
| |
| |
| /** |
| * @param { !number } objectId |
| */ |
| |
| objectWrapperDeleted( |
| objectId) { |
| this.proxy.sendMessage( |
| 1, |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_ParamsSpec.$, |
| null, |
| [ |
| objectId |
| ], |
| false); |
| } |
| }; |
| |
| /** |
| * An object which receives request messages for the GinJavaBridgeHost |
| * mojom interface. Must be constructed over an object which implements that |
| * interface. |
| * |
| * @export |
| */ |
| content.mojom.GinJavaBridgeHostReceiver = class { |
| /** |
| * @param {!content.mojom.GinJavaBridgeHostInterface } impl |
| */ |
| constructor(impl) { |
| /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!content.mojom.GinJavaBridgeHostRemote>} */ |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeHostRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeHostRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridgeHost_GetObject_ParamsSpec.$, |
| null, |
| impl.getObject.bind(impl), |
| false); |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_ParamsSpec.$, |
| null, |
| impl.objectWrapperDeleted.bind(impl), |
| false); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| }; |
| |
| /** |
| * @export |
| */ |
| content.mojom.GinJavaBridgeHost = class { |
| /** |
| * @return {!string} |
| */ |
| static get $interfaceName() { |
| return "content.mojom.GinJavaBridgeHost"; |
| } |
| |
| /** |
| * 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 {!content.mojom.GinJavaBridgeHostRemote} |
| * @export |
| */ |
| static getRemote() { |
| let remote = new content.mojom.GinJavaBridgeHostRemote; |
| remote.$.bindNewPipeAndPassReceiver().bindInBrowser(); |
| return remote; |
| } |
| }; |
| |
| |
| /** |
| * An object which receives request messages for the GinJavaBridgeHost |
| * 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 |
| */ |
| content.mojom.GinJavaBridgeHostCallbackRouter = class { |
| constructor() { |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| content.mojom.GinJavaBridgeHostRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!content.mojom.GinJavaBridgeHostRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| this.router_ = new mojo.internal.interfaceSupport.CallbackRouter; |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.getObject = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| content.mojom.GinJavaBridgeHost_GetObject_ParamsSpec.$, |
| null, |
| this.getObject.createReceiverHandler(false /* expectsResponse */), |
| false); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.objectWrapperDeleted = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 1, |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_ParamsSpec.$, |
| null, |
| this.objectWrapperDeleted.createReceiverHandler(false /* expectsResponse */), |
| false); |
| /** @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); |
| } |
| }; |
| |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridge_AddNamedObject_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridge_RemoveNamedObject_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridge_SetHost_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeHost_GetObject_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridge_AddNamedObject_ParamsSpec.$, |
| 'GinJavaBridge_AddNamedObject_Params', |
| [ |
| mojo.internal.StructField( |
| 'name', 0, |
| 0, |
| mojo.internal.String, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'objectId', 8, |
| 0, |
| mojo.internal.Int32, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'originMatcher', 16, |
| 0, |
| originMatcher.mojom.OriginMatcherSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 32],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridge_AddNamedObject_Params = class { |
| constructor() { |
| /** @export { !string } */ |
| this.name; |
| /** @export { !number } */ |
| this.objectId; |
| /** @export { !originMatcher.mojom.OriginMatcher } */ |
| this.originMatcher; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridge_RemoveNamedObject_ParamsSpec.$, |
| 'GinJavaBridge_RemoveNamedObject_Params', |
| [ |
| mojo.internal.StructField( |
| 'name', 0, |
| 0, |
| mojo.internal.String, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridge_RemoveNamedObject_Params = class { |
| constructor() { |
| /** @export { !string } */ |
| this.name; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridge_SetHost_ParamsSpec.$, |
| 'GinJavaBridge_SetHost_Params', |
| [ |
| mojo.internal.StructField( |
| 'host', 0, |
| 0, |
| mojo.internal.InterfaceProxy(content.mojom.GinJavaBridgeHostRemote), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridge_SetHost_Params = class { |
| constructor() { |
| /** @export { !content.mojom.GinJavaBridgeHostRemote } */ |
| this.host; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_GetMethods_Params', |
| [ |
| ], |
| [[0, 8],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_Params = class { |
| constructor() { |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_GetMethods_ResponseParams', |
| [ |
| mojo.internal.StructField( |
| 'methodNames', 0, |
| 0, |
| mojo.internal.Array(mojo.internal.String, false), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_GetMethods_ResponseParams = class { |
| constructor() { |
| /** @export { !Array<!string> } */ |
| this.methodNames; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_HasMethod_Params', |
| [ |
| mojo.internal.StructField( |
| 'methodName', 0, |
| 0, |
| mojo.internal.String, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_Params = class { |
| constructor() { |
| /** @export { !string } */ |
| this.methodName; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_HasMethod_ResponseParams', |
| [ |
| mojo.internal.StructField( |
| 'result', 0, |
| 0, |
| mojo.internal.Bool, |
| false, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_HasMethod_ResponseParams = class { |
| constructor() { |
| /** @export { !boolean } */ |
| this.result; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_InvokeMethod_Params', |
| [ |
| mojo.internal.StructField( |
| 'methodName', 0, |
| 0, |
| mojo.internal.String, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'arguments', 8, |
| 0, |
| mojoBase.mojom.ListValueSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 24],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_Params = class { |
| constructor() { |
| /** @export { !string } */ |
| this.methodName; |
| /** @export { !mojoBase.mojom.ListValue } */ |
| this.arguments; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParamsSpec.$, |
| 'GinJavaBridgeRemoteObject_InvokeMethod_ResponseParams', |
| [ |
| mojo.internal.StructField( |
| 'errorCode', 0, |
| 0, |
| content.mojom.GinJavaBridgeErrorSpec.$, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'result', 8, |
| 0, |
| mojoBase.mojom.ListValueSpec.$, |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 24],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeRemoteObject_InvokeMethod_ResponseParams = class { |
| constructor() { |
| /** @export { !content.mojom.GinJavaBridgeError } */ |
| this.errorCode; |
| /** @export { !mojoBase.mojom.ListValue } */ |
| this.result; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeHost_GetObject_ParamsSpec.$, |
| 'GinJavaBridgeHost_GetObject_Params', |
| [ |
| mojo.internal.StructField( |
| 'objectId', 0, |
| 0, |
| mojo.internal.Int32, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| mojo.internal.StructField( |
| 'receiver', 4, |
| 0, |
| mojo.internal.InterfaceRequest(content.mojom.GinJavaBridgeRemoteObjectPendingReceiver), |
| null, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeHost_GetObject_Params = class { |
| constructor() { |
| /** @export { !number } */ |
| this.objectId; |
| /** @export { !content.mojom.GinJavaBridgeRemoteObjectPendingReceiver } */ |
| this.receiver; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_ParamsSpec.$, |
| 'GinJavaBridgeHost_ObjectWrapperDeleted_Params', |
| [ |
| mojo.internal.StructField( |
| 'objectId', 0, |
| 0, |
| mojo.internal.Int32, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| content.mojom.GinJavaBridgeHost_ObjectWrapperDeleted_Params = class { |
| constructor() { |
| /** @export { !number } */ |
| this.objectId; |
| } |
| }; |
| |