blob: cea4f8a6a40115ee23fa5bdb08d6bf8e913a6a22 [file] [log] [blame]
// components/visitedlink/common/visitedlink.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('mojoBase.mojom.ReadOnlySharedMemoryRegion');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSinkReceiver');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSinkCallbackRouter');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSinkInterface');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSinkRemote');
goog.provide('visitedlink.mojom.VisitedLinkNotificationSinkPendingReceiver');
/**
* @implements {mojo.internal.interfaceSupport.PendingReceiver}
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSinkPendingReceiver = 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,
visitedlink.mojom.VisitedLinkNotificationSink.$interfaceName,
scope);
}
};
/** @interface */
visitedlink.mojom.VisitedLinkNotificationSinkInterface = class {
/**
* @param { !mojoBase.mojom.ReadOnlySharedMemoryRegion } tableRegion
*/
updateVisitedLinks(tableRegion) {}
/**
* @param { !Array<!bigint> } linkHashes
*/
addVisitedLinks(linkHashes) {}
/**
* @param { !boolean } invalidateCachedHashes
*/
resetVisitedLinks(invalidateCachedHashes) {}
};
/**
* @export
* @implements { visitedlink.mojom.VisitedLinkNotificationSinkInterface }
*/
visitedlink.mojom.VisitedLinkNotificationSinkRemote = class {
/** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */
constructor(handle = undefined) {
/**
* @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!visitedlink.mojom.VisitedLinkNotificationSinkPendingReceiver>}
*/
this.proxy =
new mojo.internal.interfaceSupport.InterfaceRemoteBase(
visitedlink.mojom.VisitedLinkNotificationSinkPendingReceiver,
handle);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!visitedlink.mojom.VisitedLinkNotificationSinkPendingReceiver>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy);
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.proxy.getConnectionErrorEventRouter();
}
/**
* @param { !mojoBase.mojom.ReadOnlySharedMemoryRegion } tableRegion
*/
updateVisitedLinks(
tableRegion) {
this.proxy.sendMessage(
0,
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec.$,
null,
[
tableRegion
]);
}
/**
* @param { !Array<!bigint> } linkHashes
*/
addVisitedLinks(
linkHashes) {
this.proxy.sendMessage(
1,
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec.$,
null,
[
linkHashes
]);
}
/**
* @param { !boolean } invalidateCachedHashes
*/
resetVisitedLinks(
invalidateCachedHashes) {
this.proxy.sendMessage(
2,
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec.$,
null,
[
invalidateCachedHashes
]);
}
};
/**
* An object which receives request messages for the VisitedLinkNotificationSink
* mojom interface. Must be constructed over an object which implements that
* interface.
*
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSinkReceiver = class {
/**
* @param {!visitedlink.mojom.VisitedLinkNotificationSinkInterface } impl
*/
constructor(impl) {
/** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!visitedlink.mojom.VisitedLinkNotificationSinkRemote>} */
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
visitedlink.mojom.VisitedLinkNotificationSinkRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!visitedlink.mojom.VisitedLinkNotificationSinkRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.helper_internal_.registerHandler(
0,
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec.$,
null,
impl.updateVisitedLinks.bind(impl));
this.helper_internal_.registerHandler(
1,
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec.$,
null,
impl.addVisitedLinks.bind(impl));
this.helper_internal_.registerHandler(
2,
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec.$,
null,
impl.resetVisitedLinks.bind(impl));
/** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */
this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter();
}
};
/**
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSink = class {
/**
* @return {!string}
*/
static get $interfaceName() {
return "visitedlink.mojom.VisitedLinkNotificationSink";
}
/**
* 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 {!visitedlink.mojom.VisitedLinkNotificationSinkRemote}
* @export
*/
static getRemote() {
let remote = new visitedlink.mojom.VisitedLinkNotificationSinkRemote;
remote.$.bindNewPipeAndPassReceiver().bindInBrowser();
return remote;
}
};
/**
* An object which receives request messages for the VisitedLinkNotificationSink
* 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
*/
visitedlink.mojom.VisitedLinkNotificationSinkCallbackRouter = class {
constructor() {
this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal(
visitedlink.mojom.VisitedLinkNotificationSinkRemote);
/**
* @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!visitedlink.mojom.VisitedLinkNotificationSinkRemote>}
*/
this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_);
this.router_ = new mojo.internal.interfaceSupport.CallbackRouter;
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.updateVisitedLinks =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
0,
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec.$,
null,
this.updateVisitedLinks.createReceiverHandler(false /* expectsResponse */));
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.addVisitedLinks =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
1,
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec.$,
null,
this.addVisitedLinks.createReceiverHandler(false /* expectsResponse */));
/**
* @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver}
*/
this.resetVisitedLinks =
new mojo.internal.interfaceSupport.InterfaceCallbackReceiver(
this.router_);
this.helper_internal_.registerHandler(
2,
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec.$,
null,
this.resetVisitedLinks.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.
* @export
*/
removeListener(id) {
return this.router_.removeListener(id);
}
};
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec');
/**
* @const { {$:!mojo.internal.MojomType}}
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec');
/**
* @const { {$:!mojo.internal.MojomType}}
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec');
/**
* @const { {$:!mojo.internal.MojomType}}
* @export
*/
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec =
{ $: /** @type {!mojo.internal.MojomType} */ ({}) };
mojo.internal.Struct(
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_ParamsSpec.$,
'VisitedLinkNotificationSink_UpdateVisitedLinks_Params',
[
mojo.internal.StructField(
'tableRegion', 0,
0,
mojoBase.mojom.ReadOnlySharedMemoryRegionSpec.$,
null,
false, /* nullable */
0 /* minVersion */,
),
],
[[0, 16],]);
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_Params');
/** @record */
visitedlink.mojom.VisitedLinkNotificationSink_UpdateVisitedLinks_Params = class {
constructor() {
/** @export { !mojoBase.mojom.ReadOnlySharedMemoryRegion } */
this.tableRegion;
}
};
mojo.internal.Struct(
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_ParamsSpec.$,
'VisitedLinkNotificationSink_AddVisitedLinks_Params',
[
mojo.internal.StructField(
'linkHashes', 0,
0,
mojo.internal.Array(mojo.internal.Uint64, false),
null,
false, /* nullable */
0 /* minVersion */,
),
],
[[0, 16],]);
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_Params');
/** @record */
visitedlink.mojom.VisitedLinkNotificationSink_AddVisitedLinks_Params = class {
constructor() {
/** @export { !Array<!bigint> } */
this.linkHashes;
}
};
mojo.internal.Struct(
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_ParamsSpec.$,
'VisitedLinkNotificationSink_ResetVisitedLinks_Params',
[
mojo.internal.StructField(
'invalidateCachedHashes', 0,
0,
mojo.internal.Bool,
false,
false, /* nullable */
0 /* minVersion */,
),
],
[[0, 16],]);
goog.provide('visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_Params');
/** @record */
visitedlink.mojom.VisitedLinkNotificationSink_ResetVisitedLinks_Params = class {
constructor() {
/** @export { !boolean } */
this.invalidateCachedHashes;
}
};