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
   26

ash / webui / demo_mode_app_ui / mojom / demo_mode_app_untrusted_ui.mojom [blame]

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

module ash.mojom.demo_mode;

// Implemented in the browser process. Interface for the Demo Mode WebUI to
// retrieve an endpoint to the PageHandler interface, and to provide its own
// Page endpoint to receive notifications.
interface UntrustedPageHandlerFactory {
  // Create a page handler to provide one-way message passing between the WebUI
  // and browser process
  CreatePageHandler(pending_receiver<UntrustedPageHandler> handler);
};

// Implemented in the browser process. Interface for sending commands from the
// Demo Mode App Web UI to the browser process.
interface UntrustedPageHandler {
  // Fire-and-forget command to trigger enter or exit fullscreen on a native
  // window. Used for when we need to enter fullscreen without user interaction.
  ToggleFullscreen();

  // Fire-and-forget command to launch an already-installed app, specified by
  // the App Service/Registry app_id.
  LaunchApp(string app_id);
};