| // components/dom_distiller/content/common/mojom/distiller_javascript_service.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('domDistiller.mojom'); |
| |
| |
| |
| |
| |
| |
| |
| |
| /** |
| * @implements {mojo.internal.interfaceSupport.PendingReceiver} |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptServicePendingReceiver = 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, |
| domDistiller.mojom.DistillerJavaScriptService.$interfaceName, |
| scope); |
| } |
| }; |
| |
| |
| |
| /** |
| * @export |
| * @implements { domDistiller.mojom.DistillerJavaScriptServiceInterface } |
| */ |
| domDistiller.mojom.DistillerJavaScriptServiceRemote = class { |
| /** @param {MojoHandle|mojo.internal.interfaceSupport.Endpoint=} handle */ |
| constructor(handle = undefined) { |
| /** |
| * @private {!mojo.internal.interfaceSupport.InterfaceRemoteBase<!domDistiller.mojom.DistillerJavaScriptServicePendingReceiver>} |
| */ |
| this.proxy = |
| new mojo.internal.interfaceSupport.InterfaceRemoteBase( |
| domDistiller.mojom.DistillerJavaScriptServicePendingReceiver, |
| handle); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper<!domDistiller.mojom.DistillerJavaScriptServicePendingReceiver>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceRemoteBaseWrapper(this.proxy); |
| |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.proxy.getConnectionErrorEventRouter(); |
| } |
| |
| |
| /** |
| */ |
| |
| handleDistillerOpenSettingsCall() { |
| this.proxy.sendMessage( |
| 0, |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_ParamsSpec.$, |
| null, |
| [ |
| ]); |
| } |
| |
| |
| /** |
| * @param { !domDistiller.mojom.Theme } theme |
| */ |
| |
| handleStoreThemePref( |
| theme) { |
| this.proxy.sendMessage( |
| 1, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_ParamsSpec.$, |
| null, |
| [ |
| theme |
| ]); |
| } |
| |
| |
| /** |
| * @param { !domDistiller.mojom.FontFamily } fontFamily |
| */ |
| |
| handleStoreFontFamilyPref( |
| fontFamily) { |
| this.proxy.sendMessage( |
| 2, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_ParamsSpec.$, |
| null, |
| [ |
| fontFamily |
| ]); |
| } |
| |
| |
| /** |
| * @param { !number } fontScale |
| */ |
| |
| handleStoreFontScalingPref( |
| fontScale) { |
| this.proxy.sendMessage( |
| 3, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_ParamsSpec.$, |
| null, |
| [ |
| fontScale |
| ]); |
| } |
| }; |
| |
| /** |
| * An object which receives request messages for the DistillerJavaScriptService |
| * mojom interface. Must be constructed over an object which implements that |
| * interface. |
| * |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptServiceReceiver = class { |
| /** |
| * @param {!domDistiller.mojom.DistillerJavaScriptServiceInterface } impl |
| */ |
| constructor(impl) { |
| /** @private {!mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal<!domDistiller.mojom.DistillerJavaScriptServiceRemote>} */ |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| domDistiller.mojom.DistillerJavaScriptServiceRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!domDistiller.mojom.DistillerJavaScriptServiceRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_ParamsSpec.$, |
| null, |
| impl.handleDistillerOpenSettingsCall.bind(impl)); |
| this.helper_internal_.registerHandler( |
| 1, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_ParamsSpec.$, |
| null, |
| impl.handleStoreThemePref.bind(impl)); |
| this.helper_internal_.registerHandler( |
| 2, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_ParamsSpec.$, |
| null, |
| impl.handleStoreFontFamilyPref.bind(impl)); |
| this.helper_internal_.registerHandler( |
| 3, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_ParamsSpec.$, |
| null, |
| impl.handleStoreFontScalingPref.bind(impl)); |
| /** @public {!mojo.internal.interfaceSupport.ConnectionErrorEventRouter} */ |
| this.onConnectionError = this.helper_internal_.getConnectionErrorEventRouter(); |
| } |
| }; |
| |
| /** |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptService = class { |
| /** |
| * @return {!string} |
| */ |
| static get $interfaceName() { |
| return "dom_distiller.mojom.DistillerJavaScriptService"; |
| } |
| |
| /** |
| * 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 {!domDistiller.mojom.DistillerJavaScriptServiceRemote} |
| * @export |
| */ |
| static getRemote() { |
| let remote = new domDistiller.mojom.DistillerJavaScriptServiceRemote; |
| remote.$.bindNewPipeAndPassReceiver().bindInBrowser(); |
| return remote; |
| } |
| }; |
| |
| |
| /** |
| * An object which receives request messages for the DistillerJavaScriptService |
| * 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 |
| */ |
| domDistiller.mojom.DistillerJavaScriptServiceCallbackRouter = class { |
| constructor() { |
| this.helper_internal_ = new mojo.internal.interfaceSupport.InterfaceReceiverHelperInternal( |
| domDistiller.mojom.DistillerJavaScriptServiceRemote); |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceReceiverHelper<!domDistiller.mojom.DistillerJavaScriptServiceRemote>} |
| */ |
| this.$ = new mojo.internal.interfaceSupport.InterfaceReceiverHelper(this.helper_internal_); |
| |
| this.router_ = new mojo.internal.interfaceSupport.CallbackRouter; |
| |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.handleDistillerOpenSettingsCall = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 0, |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_ParamsSpec.$, |
| null, |
| this.handleDistillerOpenSettingsCall.createReceiverHandler(false /* expectsResponse */)); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.handleStoreThemePref = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 1, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_ParamsSpec.$, |
| null, |
| this.handleStoreThemePref.createReceiverHandler(false /* expectsResponse */)); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.handleStoreFontFamilyPref = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 2, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_ParamsSpec.$, |
| null, |
| this.handleStoreFontFamilyPref.createReceiverHandler(false /* expectsResponse */)); |
| /** |
| * @public {!mojo.internal.interfaceSupport.InterfaceCallbackReceiver} |
| */ |
| this.handleStoreFontScalingPref = |
| new mojo.internal.interfaceSupport.InterfaceCallbackReceiver( |
| this.router_); |
| |
| this.helper_internal_.registerHandler( |
| 3, |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_ParamsSpec.$, |
| null, |
| this.handleStoreFontScalingPref.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); |
| } |
| }; |
| |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| /** |
| * @const { {$:!mojo.internal.MojomType}} |
| * @export |
| */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_ParamsSpec = |
| { $: /** @type {!mojo.internal.MojomType} */ ({}) }; |
| |
| |
| |
| |
| mojo.internal.Struct( |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_ParamsSpec.$, |
| 'DistillerJavaScriptService_HandleDistillerOpenSettingsCall_Params', |
| [ |
| ], |
| [[0, 8],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleDistillerOpenSettingsCall_Params = class { |
| constructor() { |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_ParamsSpec.$, |
| 'DistillerJavaScriptService_HandleStoreThemePref_Params', |
| [ |
| mojo.internal.StructField( |
| 'theme', 0, |
| 0, |
| domDistiller.mojom.ThemeSpec.$, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreThemePref_Params = class { |
| constructor() { |
| /** @export { !domDistiller.mojom.Theme } */ |
| this.theme; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_ParamsSpec.$, |
| 'DistillerJavaScriptService_HandleStoreFontFamilyPref_Params', |
| [ |
| mojo.internal.StructField( |
| 'fontFamily', 0, |
| 0, |
| domDistiller.mojom.FontFamilySpec.$, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontFamilyPref_Params = class { |
| constructor() { |
| /** @export { !domDistiller.mojom.FontFamily } */ |
| this.fontFamily; |
| } |
| }; |
| |
| |
| |
| mojo.internal.Struct( |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_ParamsSpec.$, |
| 'DistillerJavaScriptService_HandleStoreFontScalingPref_Params', |
| [ |
| mojo.internal.StructField( |
| 'fontScale', 0, |
| 0, |
| mojo.internal.Float, |
| 0, |
| false, /* nullable */ |
| 0 /* minVersion */, |
| ), |
| ], |
| [[0, 16],]); |
| |
| |
| |
| |
| |
| /** @record */ |
| domDistiller.mojom.DistillerJavaScriptService_HandleStoreFontScalingPref_Params = class { |
| constructor() { |
| /** @export { !number } */ |
| this.fontScale; |
| } |
| }; |
| |