blob: b98c61c646e8e2f3f359b8f251e7ccacdf43bdec [file] [log] [blame]
// services/shape_detection/public/mojom/shape_detection_service.mojom.m.js is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {mojo} from '../../../../mojo/public/js/bindings.js';
import {
Sandbox as sandbox_mojom_Sandbox,
SandboxSpec as sandbox_mojom_SandboxSpec
} from '../../../../sandbox/policy/mojom/sandbox.mojom.m.js';
import {
BarcodeDetectionProviderRemote as shapeDetection_mojom_BarcodeDetectionProviderRemote,
BarcodeDetectionProviderPendingReceiver as shapeDetection_mojom_BarcodeDetectionProviderPendingReceiver
} from './barcodedetection_provider.mojom.m.js';
import {
FaceDetectionProviderRemote as shapeDetection_mojom_FaceDetectionProviderRemote,
FaceDetectionProviderPendingReceiver as shapeDetection_mojom_FaceDetectionProviderPendingReceiver
} from './facedetection_provider.mojom.m.js';
import {
TextDetectionRemote as shapeDetection_mojom_TextDetectionRemote,
TextDetectionPendingReceiver as shapeDetection_mojom_TextDetectionPendingReceiver
} from './textdetection.mojom.m.js';
/**
* @const { !sandbox_mojom_Sandbox }
*/
export const SHAPE_DETECTION_SANDBOX = sandbox_mojom_Sandbox.kGpu;
/**
* @implements {mojo.internal.interfaceSupport.PendingReceiver}
*/
export class ShapeDetectionServicePendingReceiver {
/**
* @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, 'shape_detection.mojom.ShapeDetectionService', scope);
}
}
/** @interface */
export class ShapeDetectionServiceInterface {
/**
* @param { !shapeDetection_mojom_BarcodeDetectionProviderPendingReceiver } receiver
*/
bindBarcodeDetectionProvider(receiver) {}
/**
* @param { !shapeDetection_mojom_FaceDetectionProviderPendingReceiver } receiver
*/
bindFaceDetectionProvider(receiver) {}
/**
* @param { !shapeDetection_mojom_TextDetectionPendingReceiver } receiver
*/
bindTextDetection(receiver) {}
}
/**
* @implements { ShapeDetectionServiceInterface }
*/
export class ShapeDetectionServiceRemote {
/** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */
constructor(handle = undefined) {
/**
* @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!ShapeDetectionServicePendingReceiver>}
*/
this.proxy =
new mojo.internal.interfaceSupport.InterfaceRemoteBase(
ShapeDetectionServicePendingReceiver,
handle);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!ShapeDetectionServicePendingReceiver>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
}
/**
* @param { !shapeDetection_mojom_BarcodeDetectionProviderPendingReceiver } receiver
*/
bindBarcodeDetectionProvider(
receiver) {
this.proxy.sendMessage(
2093367353,
ShapeDetectionService_BindBarcodeDetectionProvider_ParamsSpec.$,
null,
[
receiver
]);
}
/**
* @param { !shapeDetection_mojom_FaceDetectionProviderPendingReceiver } receiver
*/
bindFaceDetectionProvider(
receiver) {
this.proxy.sendMessage(
1374260677,
ShapeDetectionService_BindFaceDetectionProvider_ParamsSpec.$,
null,
[
receiver
]);
}
/**
* @param { !shapeDetection_mojom_TextDetectionPendingReceiver } receiver
*/
bindTextDetection(
receiver) {
this.proxy.sendMessage(
1918060044,
ShapeDetectionService_BindTextDetection_ParamsSpec.$,
null,
[
receiver
]);
}
}
/**
* An object which receives request messages for the ShapeDetectionService
* mojom interface. Must be constructed over an object which implements that
* interface.
*/
export class ShapeDetectionServiceReceiver {
/**
* @param {!ShapeDetectionServiceInterface } impl
*/
constructor(impl) {
/** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!ShapeDetectionServiceRemote>} */
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
ShapeDetectionServiceRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!ShapeDetectionServiceRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.helper_internal_.registerHandler(
2093367353,
ShapeDetectionService_BindBarcodeDetectionProvider_ParamsSpec.$,
null,
impl.bindBarcodeDetectionProvider.bind(impl));
this.helper_internal_.registerHandler(
1374260677,
ShapeDetectionService_BindFaceDetectionProvider_ParamsSpec.$,
null,
impl.bindFaceDetectionProvider.bind(impl));
this.helper_internal_.registerHandler(
1918060044,
ShapeDetectionService_BindTextDetection_ParamsSpec.$,
null,
impl.bindTextDetection.bind(impl));
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
}
}
export class ShapeDetectionService {
/**
* @return {!string}
*/
static get $interfaceName() {
return "shape_detection.mojom.ShapeDetectionService";
}
/**
* 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 {!ShapeDetectionServiceRemote}
*/
static getRemote() {
let remote = new ShapeDetectionServiceRemote;
remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
return remote;
}
}
/**
* An object which receives request messages for the ShapeDetectionService
* 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 class ShapeDetectionServiceCallbackRouter {
constructor() {
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
ShapeDetectionServiceRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!ShapeDetectionServiceRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.bindBarcodeDetectionProvider =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
2093367353,
ShapeDetectionService_BindBarcodeDetectionProvider_ParamsSpec.$,
null,
this.bindBarcodeDetectionProvider.createReceiverHandler(false /* expectsResponse */));
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.bindFaceDetectionProvider =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
1374260677,
ShapeDetectionService_BindFaceDetectionProvider_ParamsSpec.$,
null,
this.bindFaceDetectionProvider.createReceiverHandler(false /* expectsResponse */));
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.bindTextDetection =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
1918060044,
ShapeDetectionService_BindTextDetection_ParamsSpec.$,
null,
this.bindTextDetection.createReceiverHandler(false /* 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.
*/
removeListener(id) {
return this.router_.removeListener(id);
}
}
/**
* @const { {$:!mojo.internal.MojomType}}
*/
export const ShapeDetectionService_BindBarcodeDetectionProvider_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
/**
* @const { {$:!mojo.internal.MojomType}}
*/
export const ShapeDetectionService_BindFaceDetectionProvider_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
/**
* @const { {$:!mojo.internal.MojomType}}
*/
export const ShapeDetectionService_BindTextDetection_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
mojo.internal.Struct(
ShapeDetectionService_BindBarcodeDetectionProvider_ParamsSpec.$,
'ShapeDetectionService_BindBarcodeDetectionProvider_Params',
[
mojo.internal.StructField(
'receiver', 0,
0,
mojo.internal.InterfaceRequest(shapeDetection_mojom_BarcodeDetectionProviderPendingReceiver),
null,
false /* nullable */,
0),
],
[[0, 16],]);
/**
* @record
*/
export class ShapeDetectionService_BindBarcodeDetectionProvider_Params {
constructor() {
/** @type { !shapeDetection_mojom_BarcodeDetectionProviderPendingReceiver } */
this.receiver;
}
}
mojo.internal.Struct(
ShapeDetectionService_BindFaceDetectionProvider_ParamsSpec.$,
'ShapeDetectionService_BindFaceDetectionProvider_Params',
[
mojo.internal.StructField(
'receiver', 0,
0,
mojo.internal.InterfaceRequest(shapeDetection_mojom_FaceDetectionProviderPendingReceiver),
null,
false /* nullable */,
0),
],
[[0, 16],]);
/**
* @record
*/
export class ShapeDetectionService_BindFaceDetectionProvider_Params {
constructor() {
/** @type { !shapeDetection_mojom_FaceDetectionProviderPendingReceiver } */
this.receiver;
}
}
mojo.internal.Struct(
ShapeDetectionService_BindTextDetection_ParamsSpec.$,
'ShapeDetectionService_BindTextDetection_Params',
[
mojo.internal.StructField(
'receiver', 0,
0,
mojo.internal.InterfaceRequest(shapeDetection_mojom_TextDetectionPendingReceiver),
null,
false /* nullable */,
0),
],
[[0, 16],]);
/**
* @record
*/
export class ShapeDetectionService_BindTextDetection_Params {
constructor() {
/** @type { !shapeDetection_mojom_TextDetectionPendingReceiver } */
this.receiver;
}
}