1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25

content / common / web_ui.mojom [blame]

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module content.mojom;

import "mojo/public/mojom/base/values.mojom";

// For WebUI APIs, implemented by browser.
interface WebUIHost {
  // A message from HTML-based UI. When (trusted) JavaScript calls
  // send(message, args), this message is sent to the browser.
  //
  // Because `args` may be an arbitrarily complex object, we tag this with
  // [UnlimitedSize] to ignore soft message length limits within Mojo.
  [UnlimitedSize]
  Send(string message, mojo_base.mojom.ListValue args);
};

// For adding a property to the WebUI binding object, implemented by renderer.
interface WebUI {
  // Add a property to the WebUI binding object. This only works if we allowed
  // WebUI bindings.
  SetProperty(string property_name, string property_value_json);
};