blob: ab80e75f0dbf388cb876d2610a8174b948fbe412 [file] [log] [blame]
// Copyright 2019 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.
module android_webview.mojom;
import "services/network/public/mojom/proxy_config.mojom";
// For JavaScript postMessage() API, implemented by browser.
interface JsApiHandler {
// Called from renderer, browser receives |message| and possible |ports| with
// the current frame |origin|.
// The |message| is an opaque type and the contents are defined by the client
// of this API.
PostMessage(string message, array<handle<message_pipe>> ports);
// For browser to configure renderer, implemented by renderer.
interface JsJavaConfigurator {
// Called from browser, to tell renderer that if we need to inject
// a JavaScript object with the given |js_object_name| based on
// |need_to_inject_js_object| flag. Only frames with the origin matches
// |allowed_origin_rules| will have the object injected.
SetJsApiService(bool need_to_inject_js_object, string js_object_name,
network.mojom.ProxyBypassRules allowed_origin_rules);