// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module crosapi.mojom;
import "url/mojom/url.mojom";
[Stable, Extensible]
enum WebKioskInstallState {
[Default] kUnknown = 0,
kInstalled = 1,
kPlaceholderInstalled = 2,
kNotInstalled = 3,
};
// A client implemented in lacros-chrome that takes care of the installation of
// web apps for Kiosk.
//
// Next MinVersion: 1
// Next ID: 2
[Stable]
interface WebKioskInstaller {
// Returns the current install state of the kiosk app based on its `url`.
// If `state` is `kInstalled`, also returns the App ID of the installed app.
GetWebKioskInstallState@0(url.mojom.Url url)
=> (WebKioskInstallState state, string? app_id);
// Installs the web kiosk app based on its `url`.
// Returns the App ID of the installed app if the install succeeded, `nullopt`
// otherwise.
InstallWebKiosk@1(url.mojom.Url url) => (string? app_id);
};
// Service used to register a ChromeAppKioskInstaller into ash.
// Implemented in ash-chrome.
//
// Next MinVersion: 1
// Next ID: 1
[Stable, Uuid="c07537c5-e543-4a35-a60f-b3e475626a57"]
interface WebKioskService{
// Binds the WebKioskInstaller interface, which allows the
// Kiosk startup process running in ash-chrome to trigger the installation of
// the kiosk app into lacros-chrome.
BindInstaller@0(
pending_remote<WebKioskInstaller> installer);
};