blob: a8bd0f9bbb1e9dee06d722edcf1550c5ad9f7209 [file] [log] [blame]
// components/services/patch/public/mojom/file_patcher.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('patch.mojom');
/**
* @implements {mojo.internal.interfaceSupport.PendingReceiver}
* @export
*/
patch.mojom.FilePatcherPendingReceiver = 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,
patch.mojom.FilePatcher.$interfaceName,
scope);
}
};
/**
* @export
* @implements { patch.mojom.FilePatcherInterface }
*/
patch.mojom.FilePatcherRemote = class {
/** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */
constructor(handle = undefined) {
/**
* @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!patch.mojom.FilePatcherPendingReceiver>}
*/
this.proxy =
new mojo.internal.interfaceSupport.InterfaceRemoteBase(
patch.mojom.FilePatcherPendingReceiver,
handle);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!patch.mojom.FilePatcherPendingReceiver>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
}
/**
* @param { !mojoBase.mojom.ReadOnlyFile } inputFile
* @param { !mojoBase.mojom.ReadOnlyFile } patchFile
* @param { !mojoBase.mojom.File } outputFile
* @return {!Promise<{
result: !number,
* }>}
*/
patchFilePuffPatch(
inputFile,
patchFile,
outputFile) {
return this.proxy.sendMessage(
0,
patch.mojom.FilePatcher_PatchFilePuffPatch_ParamsSpec.$,
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParamsSpec.$,
[
inputFile,
patchFile,
outputFile
]);
}
};
/**
* An object which receives request messages for the FilePatcher
* mojom interface. Must be constructed over an object which implements that
* interface.
*
* @export
*/
patch.mojom.FilePatcherReceiver = class {
/**
* @param {!patch.mojom.FilePatcherInterface } impl
*/
constructor(impl) {
/** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!patch.mojom.FilePatcherRemote>} */
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
patch.mojom.FilePatcherRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!patch.mojom.FilePatcherRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.helper_internal_.registerHandler(
0,
patch.mojom.FilePatcher_PatchFilePuffPatch_ParamsSpec.$,
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParamsSpec.$,
impl.patchFilePuffPatch.bind(impl));
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
}
};
/**
* @export
*/
patch.mojom.FilePatcher = class {
/**
* @return {!string}
*/
static get $interfaceName() {
return "patch.mojom.FilePatcher";
}
/**
* 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 {!patch.mojom.FilePatcherRemote}
* @export
*/
static getRemote() {
let remote = new patch.mojom.FilePatcherRemote;
remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
return remote;
}
};
/**
* An object which receives request messages for the FilePatcher
* 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
*/
patch.mojom.FilePatcherCallbackRouter = class {
constructor() {
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
patch.mojom.FilePatcherRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!patch.mojom.FilePatcherRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.patchFilePuffPatch =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
0,
patch.mojom.FilePatcher_PatchFilePuffPatch_ParamsSpec.$,
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParamsSpec.$,
this.patchFilePuffPatch.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);
}
};
/**
* @const { {$:!mojo.internal.MojomType}}
* @export
*/
patch.mojom.FilePatcher_PatchFilePuffPatch_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
/**
* @const { {$:!mojo.internal.MojomType}}
* @export
*/
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
mojo.internal.Struct(
patch.mojom.FilePatcher_PatchFilePuffPatch_ParamsSpec.$,
'FilePatcher_PatchFilePuffPatch_Params',
[
mojo.internal.StructField(
'inputFile', 0,
0,
mojoBase.mojom.ReadOnlyFileSpec.$,
null,
false, /* nullable */
0 /* minVersion */,
),
mojo.internal.StructField(
'patchFile', 8,
0,
mojoBase.mojom.ReadOnlyFileSpec.$,
null,
false, /* nullable */
0 /* minVersion */,
),
mojo.internal.StructField(
'outputFile', 16,
0,
mojoBase.mojom.FileSpec.$,
null,
false, /* nullable */
0 /* minVersion */,
),
],
[[0, 32],]);
/** @record */
patch.mojom.FilePatcher_PatchFilePuffPatch_Params = class {
constructor() {
/** @export { !mojoBase.mojom.ReadOnlyFile } */
this.inputFile;
/** @export { !mojoBase.mojom.ReadOnlyFile } */
this.patchFile;
/** @export { !mojoBase.mojom.File } */
this.outputFile;
}
};
mojo.internal.Struct(
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParamsSpec.$,
'FilePatcher_PatchFilePuffPatch_ResponseParams',
[
mojo.internal.StructField(
'result', 0,
0,
mojo.internal.Int32,
0,
false, /* nullable */
0 /* minVersion */,
),
],
[[0, 16],]);
/** @record */
patch.mojom.FilePatcher_PatchFilePuffPatch_ResponseParams = class {
constructor() {
/** @export { !number } */
this.result;
}
};