chromium/chromeos/crosapi/mojom/crosapi.mojom

// 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 crosapi.mojom;

import "chromeos/components/in_session_auth/mojom/in_session_auth.mojom";
import "chromeos/components/payments/mojom/payment_app.mojom";
import "chromeos/components/remote_apps/mojom/remote_apps.mojom";
import "chromeos/components/sensors/mojom/cros_sensor_service.mojom";
import "chromeos/crosapi/mojom/account_manager.mojom";
import "chromeos/crosapi/mojom/app_service.mojom";
import "chromeos/crosapi/mojom/app_window_tracker.mojom";
import "chromeos/crosapi/mojom/arc.mojom";
import "chromeos/crosapi/mojom/audio_service.mojom";
import "chromeos/crosapi/mojom/authentication.mojom";
import "chromeos/crosapi/mojom/automation.mojom";
import "chromeos/crosapi/mojom/browser_app_instance_registry.mojom";
import "chromeos/crosapi/mojom/browser_service.mojom";
import "chromeos/crosapi/mojom/browser_version.mojom";
import "chromeos/crosapi/mojom/guest_os_sk_forwarder.mojom";
import "chromeos/crosapi/mojom/cec_private.mojom";
import "chromeos/crosapi/mojom/cert_database.mojom";
import "chromeos/crosapi/mojom/cert_provisioning.mojom";
import "chromeos/crosapi/mojom/chaps_service.mojom";
import "chromeos/crosapi/mojom/chrome_app_kiosk_service.mojom";
import "chromeos/crosapi/mojom/clipboard.mojom";
import "chromeos/crosapi/mojom/clipboard_history.mojom";
import "chromeos/crosapi/mojom/content_protection.mojom";
import "chromeos/crosapi/mojom/cros_display_config.mojom";
import "chromeos/crosapi/mojom/debug_interface.mojom";
import "chromeos/crosapi/mojom/desk.mojom";
import "chromeos/crosapi/mojom/desk_profiles.mojom";
import "chromeos/crosapi/mojom/desk_template.mojom";
import "chromeos/crosapi/mojom/device_attributes.mojom";
import "chromeos/crosapi/mojom/device_local_account_extension_service.mojom";
import "chromeos/crosapi/mojom/device_oauth2_token_service.mojom";
import "chromeos/crosapi/mojom/device_settings_service.mojom";
import "chromeos/crosapi/mojom/diagnostics_service.mojom";
import "chromeos/crosapi/mojom/digital_goods.mojom";
import "chromeos/crosapi/mojom/dlp.mojom";
import "chromeos/crosapi/mojom/document_scan.mojom";
import "chromeos/crosapi/mojom/download_controller.mojom";
import "chromeos/crosapi/mojom/download_status_updater.mojom";
import "chromeos/crosapi/mojom/drive_integration_service.mojom";
import "chromeos/crosapi/mojom/echo_private.mojom";
import "chromeos/crosapi/mojom/editor_panel.mojom";
import "chromeos/crosapi/mojom/emoji_picker.mojom";
import "chromeos/crosapi/mojom/extension_info_private.mojom";
import "chromeos/crosapi/mojom/extension_keeplist.mojom";
import "chromeos/crosapi/mojom/extension_printer.mojom";
import "chromeos/crosapi/mojom/eye_dropper.mojom";
import "chromeos/crosapi/mojom/feedback.mojom";
import "chromeos/crosapi/mojom/field_trial.mojom";
import "chromeos/crosapi/mojom/file_change_service_bridge.mojom";
import "chromeos/crosapi/mojom/file_manager.mojom";
import "chromeos/crosapi/mojom/file_system_access_cloud_identifier.mojom";
import "chromeos/crosapi/mojom/file_system_provider.mojom";
import "chromeos/crosapi/mojom/firewall_hole.mojom";
import "chromeos/crosapi/mojom/force_installed_tracker.mojom";
import "chromeos/crosapi/mojom/full_restore.mojom";
import "chromeos/crosapi/mojom/fullscreen_controller.mojom";
import "chromeos/crosapi/mojom/geolocation.mojom";
import "chromeos/crosapi/mojom/holding_space_service.mojom";
import "chromeos/crosapi/mojom/identity_manager.mojom";
import "chromeos/crosapi/mojom/idle_service.mojom";
import "chromeos/crosapi/mojom/image_writer.mojom";
import "chromeos/crosapi/mojom/input_methods.mojom";
import "chromeos/crosapi/mojom/kerberos_in_browser.mojom";
import "chromeos/crosapi/mojom/keystore_service.mojom";
import "chromeos/crosapi/mojom/lacros_shelf_item_tracker.mojom";
import "chromeos/crosapi/mojom/launcher_search.mojom";
import "chromeos/crosapi/mojom/local_printer.mojom";
import "chromeos/crosapi/mojom/login.mojom";
import "chromeos/crosapi/mojom/login_screen_storage.mojom";
import "chromeos/crosapi/mojom/login_state.mojom";
import "chromeos/crosapi/mojom/policy_namespace.mojom";
import "chromeos/crosapi/mojom/policy_service.mojom";
import "chromeos/crosapi/mojom/message_center.mojom";
import "chromeos/crosapi/mojom/magic_boost.mojom";
import "chromeos/crosapi/mojom/mahi.mojom";
import "chromeos/crosapi/mojom/media_app.mojom";
import "chromeos/crosapi/mojom/metrics.mojom";
import "chromeos/crosapi/mojom/metrics_reporting.mojom";
import "chromeos/crosapi/mojom/multi_capture_service.mojom";
import "chromeos/crosapi/mojom/native_theme.mojom";
import "chromeos/crosapi/mojom/network_change.mojom";
import "chromeos/crosapi/mojom/networking_attributes.mojom";
import "chromeos/crosapi/mojom/networking_private.mojom";
import "chromeos/crosapi/mojom/one_drive_notification_service.mojom";
import "chromeos/crosapi/mojom/one_drive_integration_service.mojom";
import "chromeos/crosapi/mojom/power.mojom";
import "chromeos/crosapi/mojom/network_settings_service.mojom";
import "chromeos/crosapi/mojom/parent_access.mojom";
import "chromeos/crosapi/mojom/passkeys.mojom";
import "chromeos/crosapi/mojom/prefs.mojom";
import "chromeos/crosapi/mojom/nonclosable_app_toast_service.mojom";
import "chromeos/crosapi/mojom/print_preview_cros.mojom";
import "chromeos/crosapi/mojom/printing_metrics.mojom";
import "chromeos/crosapi/mojom/probe_service.mojom";
import "chromeos/crosapi/mojom/remoting.mojom";
import "chromeos/crosapi/mojom/resource_manager.mojom";
import "chromeos/crosapi/mojom/screen_ai_downloader.mojom";
import "chromeos/crosapi/mojom/screen_manager.mojom";
import "chromeos/crosapi/mojom/select_file.mojom";
import "chromeos/crosapi/mojom/sharesheet.mojom";
import "chromeos/crosapi/mojom/smart_reader.mojom";
import "chromeos/crosapi/mojom/speech_recognition.mojom";
import "chromeos/crosapi/mojom/structured_metrics_service.mojom";
import "chromeos/crosapi/mojom/suggestion_service.mojom";
import "chromeos/crosapi/mojom/sync.mojom";
import "chromeos/crosapi/mojom/system_display.mojom";
import "chromeos/crosapi/mojom/task_manager.mojom";
import "chromeos/crosapi/mojom/telemetry_diagnostic_routine_service.mojom";
import "chromeos/crosapi/mojom/telemetry_event_service.mojom";
import "chromeos/crosapi/mojom/telemetry_management_service.mojom";
import "chromeos/crosapi/mojom/test_controller.mojom";
import "chromeos/crosapi/mojom/timezone.mojom";
import "chromeos/crosapi/mojom/tts.mojom";
import "chromeos/crosapi/mojom/trusted_vault.mojom";
import "chromeos/crosapi/mojom/url_handler.mojom";
import "chromeos/crosapi/mojom/vpn_service.mojom";
import "chromeos/services/chromebox_for_meetings/public/mojom/cfm_service_manager.mojom";
import "chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom";
import "chromeos/crosapi/mojom/video_capture.mojom";
import "chromeos/crosapi/mojom/video_conference.mojom";
import "chromeos/crosapi/mojom/kiosk_session_service.mojom";
import "chromeos/crosapi/mojom/virtual_keyboard.mojom";
import "chromeos/crosapi/mojom/volume_manager.mojom";
import "chromeos/crosapi/mojom/vpn_extension_observer.mojom";
import "chromeos/crosapi/mojom/wallpaper.mojom";
import "chromeos/crosapi/mojom/web_app_service.mojom";
import "chromeos/crosapi/mojom/web_kiosk_service.mojom";
import "chromeos/crosapi/mojom/web_page_info.mojom";
import "chromeos/crosapi/mojom/media_ui.mojom";
import "mojo/public/mojom/base/big_string.mojom";
import "mojo/public/mojom/base/file_path.mojom";
import "mojo/public/mojom/base/generic_pending_receiver.mojom";
import "mojo/public/mojom/base/string16.mojom";
import "mojo/public/mojom/base/token.mojom";
import "mojo/public/mojom/base/values.mojom";
import "services/device/public/mojom/hid.mojom";
import "services/media_session/public/mojom/audio_focus.mojom";
import "services/media_session/public/mojom/media_controller.mojom";
import "chromeos/crosapi/mojom/embedded_accessibility_helper.mojom";
import "url/mojom/url.mojom";

// BrowserInfo is a set of parameters passed to ash from browser (such as
// lacros-chrome) upon its startup, which contains the browser information
// such as version, etc.
[Stable, RenamedFrom="crosapi.mojom.LacrosInfo"]
struct BrowserInfo {
  // Version of the browser displayed to user in feedback report, etc.
  // It includes both browser version and channel in the format of:
  // {browser version} {channel}
  // For example, "87.0.0.1 dev", "86.0.4240.38 beta".
  string browser_version@0;

  // Lacros publishes the set of workarounds it has implemented. This is needed
  // to cherry-picks of lacros bug fixes to older branches. See
  // `ash_workarounds` for more details.
  [MinVersion=1]
  array<string>? lacros_workarounds@1;

  // TODO(crbug.com/40145693): Add more parameters later.
};

// Crosapi defines the APIs that live in ash-chrome and are accessed from
// client applications (such as lacros-chrome). When adding a major new API
// please note the milestone when you added it, to help us reason about
// compatibility between the client applications and older ash-chrome binaries.
//
// Next version: 145
// Next method id: 147
[Stable, Uuid="8b79c34f-2bf8-4499-979a-b17cac522c1e",
 RenamedFrom="crosapi.mojom.AshChromeService"]
interface Crosapi {
  // Deprecated.
  // Added in M91.
  [MinVersion=18]
  BindAutomationDeprecated@23(pending_receiver<Automation> receiver);

  // Binds the audio devices service which provides audio info to Lacros
  [MinVersion=82] BindAudioService@85(
      pending_receiver<AudioService> receiver);

  // Deprecated.
  // Added in M97.
  [MinVersion=58] REMOVED_62@62(
      pending_receiver<AuthenticationDeprecated> receiver);

  // Binds the automation factory interface which allows ash to enableautomation
  // for Lacros and Lacros to send automation data to Ash.
  // Added in M91.
  [MinVersion=21]
  BindAutomationFactory@26(pending_receiver<AutomationFactory> receiver);

  // Binds Chrome OS Account Manager for Identity management.
  // Added in M87.
  [MinVersion=4]
  BindAccountManager@7(pending_receiver<AccountManager> receiver);

  // Bind the app service proxy, which allows the Lacros Browser to
  // interact with all apps installed in App Service in ash-chrome.
  // Added in M93.
  [MinVersion=40]
  BindAppServiceProxy@45(pending_receiver<AppServiceProxy> receiver);

  // Bind ARC.
  // Added in M98.
  [MinVersion=59]
  BindArc@63(pending_receiver<Arc> receiver);

  // Added in M95.
  [MinVersion=50] BindBrowserAppInstanceRegistry@54(
      pending_receiver<BrowserAppInstanceRegistry> receiver);

  // Binds the BrowserVersionService interface for getting browser version
  // information.
  // Added in M95.
  [MinVersion=45]
  BindBrowserVersionService@50(
      pending_receiver<BrowserVersionService> receiver);

  // Binds the BrowserServiceHost interface to prepare registering
  // a BrowserService to crosapi.
  // This is a part of lacros-chrome bootstrap sequence. First, Crosapi
  // interface is bound, and then lacros-chrome calls this so that it
  // obtains BrowserServiceHost proxy. Finally, lacros-chrome calls
  // BrowserServiceHost::AddBrowserService to register its BrowserService
  // so that ash-chrome can call it to ask browser operations to lacros-chrome.
  // Added in M90.
  [MinVersion=15]
  BindBrowserServiceHost@20(pending_receiver<BrowserServiceHost> receiver);

  // Binds the browser shortcuts publisher service to allow browser shortcuts
  // publishing from lacros-chrome to the App Service in ash-chrome.
  [MinVersion=123]
  BindBrowserShortcutPublisher@125(
      pending_receiver<AppShortcutPublisher> receiver);

  // Binds the BrowserCdmFactory interface for proxying communication to the
  // HWDRM CDM hosted in a ChromeOS daemon process. We need to use a
  // GenericPendingReceiver to avoid dependency circularities.
  // Added in M95.
  [MinVersion=42] BindBrowserCdmFactory@47(
      mojo_base.mojom.GenericPendingReceiver receiver);

  // CecPrivate is a service that allows setting and querying display power
  // modes using HDMI CEC in Lacros. Implemented in Ash.
  [MinVersion=138] BindCecPrivate@140(
      pending_receiver<CecPrivate> receiver);

  // Binds the CertDatabase interface for initializing certificate database in
  // client applications.
  // Added in M89.
  [MinVersion=7] BindCertDatabase@12(pending_receiver<CertDatabase> receiver);

  // Binds the CertProvisioning interface for implementing certificate
  // provisioning UI.
  // Added in M102.
  [MinVersion=83]
  BindCertProvisioning@86(pending_receiver<CertProvisioning> receiver);

  // Binds the CfmServiceContext interface for communicating with the Hotline
  // daemon available only on Meet Devices platforms
  // Added in M86.
  [MinVersion=140]
  BindCfmServiceContext@142(
      pending_receiver<chromeos.cfm.mojom.CfmServiceContext> receiver);

  // Binds the ChapsService interface for communicating with the Chaps daemon.
  // Added in M121.
  [MinVersion=125] BindChapsService@127(
      pending_receiver<ChapsService> receiver);

  // Binds the chrome app publisher service, which allows Lacros to connect its
  // Chrome apps to the app service.
  // Added in M93.
  [MinVersion=38]
  BindChromeAppPublisher@43(pending_receiver<AppPublisher> receiver);

  // Binds the window tracker for chrome apps. This allows Lacros to inform Ash
  // of the relationship between AppService app_ids and exo/Wayland/aura
  // windows.
  [MinVersion=44]
  BindChromeAppWindowTracker@49(pending_receiver<AppWindowTracker> receiver);

  // Bind the clipboard interface to allow lacros-chrome to interact with the
  // system clipboard.
  [MinVersion=10] BindClipboard@15(pending_receiver<Clipboard> receiver);

  // Bind the ClipboardHistory interface to allow lacros-chrome to show
  // ClipboardHistory.
  [MinVersion=23] BindClipboardHistory@28(
      pending_receiver<ClipboardHistory> receiver);

  // Binds the ContentProtection interface which is one dependency of the
  // content decryption module.
  [MinVersion=26] BindContentProtection@31(
      pending_receiver<ContentProtection> receiver);

  // Binds the CrosDisplayConfigController interface for querying display info.
  // Added in M106.
  [MinVersion=89] BindCrosDisplayConfigController@93(
      pending_receiver<CrosDisplayConfigController> receiver);

  // Binds the DebugInterfaceRegisterer for registering DebugInterface.
  // Added in M122.
  [MinVersion=131] BindDebugInterfaceRegisterer@133(
      pending_receiver<DebugInterfaceRegisterer> receiver);

  // Binds the desk factory interface.
  // Added in M109.
  [MinVersion=99] BindDesk@103(pending_receiver<Desk> receiver);

  // Binds the desk profiles interface.
  // Added in M119.
  [MinVersion=122] BindDeskProfileObserver@124(
      pending_receiver<DeskProfileObserver> receiver);

  // Binds the desk template factory interface.
  // Added in M101.
  [MinVersion=68] BindDeskTemplate@71(pending_receiver<DeskTemplate> receiver);

  // Binds the device attributes service which is used by enterprise extension
  // APIs to query information about the device.
  // Added in M89.
  [MinVersion=12] BindDeviceAttributes@17(
      pending_receiver<DeviceAttributes> receiver);

  // Binds the DeviceOAuth2TokenService interface for the device oauth2 token
  // service in Lacros-Chrome.
  // Added in M106.
  [MinVersion=91] BindDeviceOAuth2TokenService@95(
    pending_receiver<DeviceOAuth2TokenService> receiver);

  // Binds the DeviceSettingsService interface for initializing device settings
  // in Lacros-Chrome.
  // Added in 96.
  [MinVersion=55] BindDeviceSettingsService@59(
    pending_receiver<DeviceSettingsService> receiver);

  // Binds the diagnostics service to allow Lacros to initiate diagnostics
  // routines from Ash.
  // Added in M106.
  [MinVersion=95] BindDiagnosticsService@99(
    pending_receiver<crosapi.mojom.DiagnosticsService> receiver);

  // Added in M104.
  [MinVersion=76] BindDigitalGoodsFactory@79(
    pending_receiver<DigitalGoodsFactory> receiver);

  // Binds the DLP (Data Leak Prevention) interface for notifying Ash about
  // content restrictions applied to web content in Lacros.
  // Added in M98.
  [MinVersion=60] BindDlp@64(pending_receiver<Dlp> receiver);

  // Binds the DocumentScan interface, which allows Lacros to get scanner access
  // via Ash Chrome.
  // Added in M104.
  [MinVersion=77] BindDocumentScan@80(pending_receiver<DocumentScan> receiver);

  // Binds the DownloadController interface, which allows Lacros download
  // information to be passed into Ash Chrome.
  // Added in M92.
  [MinVersion=28] BindDownloadController@33(
      pending_receiver<DownloadController> receiver);

  // Binds the DownloadStatusUpdater interface, which allows Lacros download
  // status updates to be passed into Ash Chrome for rendering in the
  // appropriate System UI surface(s).
  // Added in M115.
  [MinVersion=107] BindDownloadStatusUpdater@110(
      pending_receiver<DownloadStatusUpdater> receiver);

  // Binds the DriveIntegrationService interface for getting information about
  // the local Google Drive mount.
  // Added in M93.
  [MinVersion=29] BindDriveIntegrationService@34(
      pending_receiver<DriveIntegrationService> receiver);

  // EchoPrivate is a service used to provide trusted websites a mechanism to
  // confirm the device is a ChromeOS device.
  [MinVersion=71] BindEchoPrivate@74(
      pending_receiver<EchoPrivate> receiver);

  // EditorPanelManager is a service to allow lacros to open the system editor
  // panel.
  [MinVersion=118] BindEditorPanelManager@120(
      pending_receiver<EditorPanelManager> receiver);

  // Binds the accessibility helper client factory interface which allows Lacros
  // to send information to Ash needed for accessibility features.
  [MinVersion=115]
  BindEmbeddedAccessibilityHelperClientFactory@118(
      pending_receiver<EmbeddedAccessibilityHelperClientFactory> receiver);

  // EmojiPicker is a service to allow lacros to open the system emoji picker.
  [MinVersion=85] BindEmojiPicker@89(pending_receiver<EmojiPicker> receiver);

  // ExtensionInfoPrivate is a service that allows trusted extensions in Lacros
  // to get and set system properties. Implemented in Ash.
  [MinVersion=72] BindExtensionInfoPrivate@75(
      pending_receiver<ExtensionInfoPrivate> receiver);

  // Binds the ExtensionPrinterService which gives ash access to lacros
  // extension printers.
  [MinVersion=139] BindExtensionPrinterService@141(
      pending_receiver<ExtensionPrinterService> receiver);

  // Deprecated in M114; use chromeos::FirewallHole directly.
  [MinVersion=101] REMOVED_105@105(
      pending_receiver<FirewallHoleServiceDeprecated> receiver);

  // NetworkingPrivate is a service that allows users to modify
  // network settings in Lacros. Implemented in Ash.
  [MinVersion=80] BindNetworkingPrivate@83(
      pending_receiver<NetworkingPrivate> receiver);

  // Binds the extension publisher service, which allows Lacros to connect its
  // extensions to the app service.
  // Added in M93.
  [MinVersion=70]
  BindExtensionPublisher@73(pending_receiver<AppPublisher> receiver);

  // Binds the bridge implemented in Ash which is connected to the
  // `FileChangeServiceBridge` in Lacros via crosapi. This bridge enables file
  // change events originating from Lacros to be propagated to the
  // `FileChangeService`, and its observers, in Ash.
  // Added in M122.
  [MinVersion=128]
  BindFileChangeServiceBridge@130(
      pending_receiver<FileChangeServiceBridge> receiver);

  // Binds the FileManager interface for showing files, folders, etc.
  // Added in M88.
  [MinVersion=5]
  BindFileManager@8(pending_receiver<FileManager> receiver);

  // Binds the provider for cloud identifiers for files and folders used through
  // the file system access web API.
  // Added in M117.
  [MinVersion=114]
  BindFileSystemAccessCloudIdentifierProvider@117(
    pending_receiver<FileSystemAccessCloudIdentifierProvider> receiver);

  // This interface allows Lacros extensions to implement file systems.
  // Added in M104.
  [MinVersion=78]
  BindFileSystemProviderService@81(
      pending_receiver<FileSystemProviderService> receiver);

  // Binds the ForceInstalledTracker interface for track the status of
  // force-installed extensions.
  // Added in M96.
  [MinVersion=53]
  BindForceInstalledTracker@57(
    pending_receiver<ForceInstalledTracker> receiver);

  // Binds the full restore interface for getting session restore data needed
  // to display the pine dialog.
  [MinVersion=135] BindFullRestore@137(
      pending_receiver<FullRestore> receiver);

  // Binds the full screen controller which determines whether to keep or exit
  // full screen mode.
  [MinVersion=94] BindFullscreenController@98(
      pending_receiver<FullscreenController> receiver);

  // Binds the GeolocationService interface for getting network access point
  // information.
  // Added in M95.
  [MinVersion=43]
  BindGeolocationService@48(pending_receiver<GeolocationService> receiver);

  // Binds the holding space service.
  // Added in M92.
  [MinVersion=27]
  BindHoldingSpaceService@32(pending_receiver<HoldingSpaceService> receiver);

  // Binds the IdentityManager interface for reading identity information.
  // Added in M96.
  [MinVersion=51]
  BindIdentityManager@55(pending_receiver<IdentityManager> receiver);

  // Binds the IdleService interface for reading idle states.
  // Added in M90.
  [MinVersion=16]
  BindIdleService@21(pending_receiver<IdleService> receiver);

  // Binds the ImageWriter interface for managing removable storage devices.
  // Added in M93.
  [MinVersion=37]
  BindImageWriter@42(pending_receiver<ImageWriter> receiver);

  // Binds the InSessionAuth interface for authenticating users in session
  // on ChromeOS
  // Added in M106.
  [MinVersion=92]
  BindInSessionAuth@96(
      pending_receiver<chromeos.auth.mojom.InSessionAuth> receiver);

  // Binds the NetworkSettingsService interface for reading and observing
  // network changes.
  // Added in M93.
  [MinVersion=41]
  BindNetworkSettingsService@46(
      pending_receiver<NetworkSettingsService> receiver);

  // Binds the KerberosInBrowser interface for showing Kerberos UI.
  // Added in M114.
  [MinVersion=108]
  BindKerberosInBrowser@111(pending_receiver<KerberosInBrowser> receiver);

  // Binds the KeystoreService interface for challenging keys.
  // Added in M87.
  BindKeystoreService@2(pending_receiver<KeystoreService> receiver);

  // Binds the LacrosShelfItemTracker interface for integrating ephemeral Lacros
  // Windows with Ash Shelf.
  [MinVersion=126]
  BindLacrosShelfItemTracker@128(
      pending_receiver<LacrosShelfItemTracker> receiver);

  // Binds the Lacros app publisher service, which allows Lacros to connect the
  // Lacros app to the app service.
  // Added in M118.
  [MinVersion=116]
  BindLacrosAppPublisher@119(pending_receiver<AppPublisher> receiver);

  // Binds the LocalPrinter interface for printing.
  // Added in M91.
  [MinVersion=25] BindLocalPrinter@30(pending_receiver<LocalPrinter> receiver);

  // Binds the login service.
  // Added in M99.
  [MinVersion=63] BindLogin@67(pending_receiver<Login> receiver);

  // Binds the login screen storage service.
  [MinVersion=64] BindLoginScreenStorage@68(
      pending_receiver<LoginScreenStorage> receiver);

  // Binds the login state service.
  [MinVersion=57] BindLoginState@61(pending_receiver<LoginState> receiver);

  // Binds the machine learning service.
  // Added in M90.
  [MinVersion=17] BindMachineLearningService@22(
      pending_receiver<chromeos.machine_learning.mojom.MachineLearningService> receiver);

  // MagicBoostController is a service to allow lacros to open the magic boost
  // opt-in flow.
  // Added in M127.
  [MinVersion=142] BindMagicBoostController@144(
      pending_receiver<MagicBoostController> receiver);

  // Binds the mahi browser delegate to the mahi browser client.
  // Added in M123.
  [MinVersion=132] BindMahiBrowserDelegate@134(
      pending_receiver<MahiBrowserDelegate> receiver);

  // Binds the MediaUI interface for the Global Media Controls UI.
  // Added in M113.
  [MinVersion=105] BindMediaUI@108(pending_receiver<MediaUI> receiver);

  // Binds the MessageCenter interface for showing notification messages.
  // Added in M86.
  BindMessageCenter@3(pending_receiver<MessageCenter> receiver);

  // Binds the NativeThemeService interface for reading native theme changes.
  // Added in M93.
  [MinVersion=33]
  BindNativeThemeService@38(pending_receiver<NativeThemeService> receiver);

  // Binds the Metrics interface for fetching metadata needed by the
  // metrics subsystem.
  // Added in M110.
  [MinVersion=102]
  BindMetrics@106(pending_receiver<Metrics> receiver);

  // Binds the MetricsReporting interface for metrics reporting consent.
  // Added in M89.
  [MinVersion=8]
  BindMetricsReporting@13(pending_receiver<MetricsReporting> receiver);

  // Binds the MultiCaptureService interface that handles multi capture related
  // usage indicators and notifications.
  [MinVersion=100]
  BindMultiCaptureService@104(pending_receiver<MultiCaptureService> receiver);

  // Binds the NetworkChange interface for getting network change notification.
  [MinVersion=88]
  BindNetworkChange@92(pending_receiver<NetworkChange> receiver);

  // Binds the networking attributes service which is used by enterprise
  // extension APIs to query details about the network.
  [MinVersion=39]
  BindNetworkingAttributes@44(pending_receiver<NetworkingAttributes> receiver);

  // Binds the OneDrive notification service which is used by the
  // odfsConfigPrivate extension API to show notifications.
  [MinVersion=130]
  BindOneDriveNotificationService@132(
      pending_receiver<OneDriveNotificationService> receiver);

  // Binds the OneDrive integration service which is used by Lacros to observe
  // OneDrive mount path changes. Added in M124.
  [MinVersion=133]
  BindOneDriveIntegrationService@135(
    pending_receiver<OneDriveIntegrationService> receiver);

  // Binds the Parent Access UI to allow Lacros to request parent access
  // from Ash when needed.
  [MinVersion=97]
  BindParentAccess@101(pending_receiver<ParentAccess> receiver);

  // Binds an interface for creating and asserting user passkeys.
  // Deprecated in M127. Never enabled.
  [MinVersion=124]
  BindPasskeyAuthenticatorDeprecated@126(
      pending_receiver<PasskeyAuthenticator> receiver);

  // Binds the PaymentAppInstance to allow Playstore payment to be made for
  // web apps listing in Playstore.
  [MinVersion=113] BindPaymentAppInstance@116(
    pending_receiver<chromeos.payments.mojom.PaymentAppInstance> receiver);

  // Binds the Policy service to allow Lacros request policy data from Ash when
  // needed.
  [MinVersion=56] BindPolicyService@60(
      pending_receiver<PolicyService> receiver);

  // Binds the prefs service which allows get, set, and notify update of prefs.
  // Added in M89.
  [MinVersion=11] BindPrefs@16(pending_receiver<Prefs> receiver);

  // Binds the prevent close service which can be used to provide user feedback
  // about nonclosable web apps.
  [MinVersion=129] BindNonclosableAppToastService@131(
      pending_receiver<NonclosableAppToastService> receiver);

  // Binds the RemoteAppsLacrosBridge for the Remote Apps private Mojo API.
  // Added in M103.
  [MinVersion=74] BindRemoteAppsLacrosBridge@77(
      pending_receiver<chromeos.remote_apps.mojom.RemoteAppsLacrosBridge>
          receiver);

  // Binds the Remoting service to allow websites running in Lacros to interact
  // with Chrome Remote Desktop functionality available in ash-chrome.
  // Added in M93.
  [MinVersion=32] BindRemoting@37(pending_receiver<Remoting> receiver);

  // Binds the Screen AI downloader interface which allows Lacros to send
  // component download request to Ash.
  // Added in M117.
  [MinVersion=110]
  BindScreenAIDownloader@113(pending_receiver<ScreenAIDownloader> receiver);

  // Binds the ScreenManager interface for interacting with windows, screens and
  // displays.
  // Added in M86.
  BindScreenManager@1(pending_receiver<ScreenManager> receiver);

  // Binds the SelectFile interface for open/save dialogs.
  // Added in M86.
  BindSelectFile@0(pending_receiver<SelectFile> receiver);

  // Binds the SensorHalClient interface for IIO sensors' data.
  // Added in M90.
  [MinVersion=14]
  BindSensorHalClient@19(
      pending_remote<chromeos.sensors.mojom.SensorHalClient> receiver);

  // Binds the Sharesheet interface.
  // Added in M99.
  [MinVersion=66]
  BindSharesheet@70(
      pending_receiver<Sharesheet> receiver);

  // Binds the Smart Reader manager to the Smart Reader client.
  [MinVersion=103]
  BindSmartReaderClient@107(
      pending_remote<crosapi.mojom.SmartReaderClient> remote);

  // Binds the SpeechRecognition interface to access on-device speech
  // recognition.
  // Added in M104.
  [MinVersion=81]
  BindSpeechRecognition@84(pending_receiver<SpeechRecognition> receiver);

  // Binds the StableVideoDecoderFactory, which allows lacros-chrome to request
  // hardware accelerated video decoding. We need to use a
  // GenericPendingReceiver to avoid dependency circularities.
  // TODO(b/202188196): split StableVideoDecoder API to try to avoid dependency
  // issues.
  // Added in M96.
  [MinVersion=52]
  BindStableVideoDecoderFactory@56(
      mojo_base.mojom.GenericPendingReceiver receiver);

  // Binds the StructuredMetricsService interface to record events.
  // Added in M96.
  [MinVersion=48]
  BindStructuredMetricsService@52(
      pending_receiver<StructuredMetricsService> receiver);

  // Binds the suggestion service.
  [MinVersion=134]
  BindSuggestionService@136(pending_receiver<SuggestionService> receiver);

  // Binds TrustedVaultBackend for the `chromesync` security domain, which
  // allows lacros-chrome to access data stored by ash-chrome
  // TrustedVaultClient.
  // TODO(crbug.com/342239249): Deprecate in favor of
  // `BindTrustedVaultBackendService` two milestones after that is rolled out,
  // and we can stop relying on this method as a fallback (M129).
  // Added in M119.
  [MinVersion=119]
  BindTrustedVaultBackend@121(
      pending_receiver<TrustedVaultBackend> receiver);

  // Binds TrustedVaultBackendService, which allows lacros-chrome to bind to
  // TrustedVaultBackend instances to access data stored by ash-chrome
  // TrustedVaultClients.
  // Added in M127.
  [MinVersion=143]
  BindTrustedVaultBackendService@145(
      pending_receiver<TrustedVaultBackendService> receiver);

  // Binds the HidManager interface for support HID devices.
  // Added in M87.
  BindHidManager@4(pending_receiver<device.mojom.HidManager> receiver);

  // Binds the EyeDropper interface for showing EyeDropper UI.
  // Added in M120.
  [MinVersion=120] BindEyeDropper@122(pending_receiver<EyeDropper> receiver);

  // Binds the Feedback interface for showing feedback UI.
  // Added in M87.
  [MinVersion=3] BindFeedback@5(pending_receiver<Feedback> receiver);

  // Binds the FieldTrial interface for reading active trial field group.
  // Added in M95.
  [MinVersion=46]
  BindFieldTrialService@51(pending_receiver<FieldTrialService> receiver);

  // Binds the Media App interface for special functions of Media App
  // Added in M128.
  [MinVersion=144] BindMediaApp@146(
      pending_remote<MediaApp> receiver);

  // Binds the Media Session service (controller) for enabling media playback
  // control.
  // Added in M88.
  [MinVersion=6] BindMediaSessionController@9(
      pending_receiver<media_session.mojom.MediaControllerManager> receiver);

  // Binds the Media Session service (audio focus) for enabling media sessions
  // to register with the service so they can be controlled.
  // Added in M88.
  [MinVersion=6] BindMediaSessionAudioFocus@10(
      pending_receiver<media_session.mojom.AudioFocusManager> receiver);

  // Binds the Media Session service (audio focus debug) for enabling debugging
  // of media playback sessions.
  // Added in M88.
  [MinVersion=6] BindMediaSessionAudioFocusDebug@11(
      pending_receiver<media_session.mojom.AudioFocusManagerDebug> receiver);

  // Binds the Power interface for power management.
  // Added in M93.
  [MinVersion=35] BindPower@40(pending_receiver<Power> receiver);

  // Binds the PrintingMetrics interface for chrome.printingMetrics API.
  [MinVersion=86] BindPrintingMetrics@90(
      pending_receiver<PrintingMetrics> receiver);

  // Binds the PrintPreviewCrosDelegate interface.
  [MinVersion=141] BindPrintPreviewCrosDelegate@143(
      pending_receiver<PrintPreviewCrosDelegate> receiver);

  // Binds the Resource Manager interface for querying resource status.
  // Added in M93.
  [MinVersion=36] BindResourceManager@41(
      pending_receiver<ResourceManager> receiver);

  // Binds the search controller factory for creating search controllers.
  // Added in M125.
  [MinVersion=136] BindSearchControllerFactory@138(
      pending_remote<SearchControllerFactory> remote);

  // Binds the search controller which send queries from ash to lacros.
  // Added in M99.
  [MinVersion=62] BindSearchControllerRegistry@66(
      pending_receiver<SearchControllerRegistry> receiver);

  // Binds the Sync Service interface to enable communication between Ash and
  // Lacros Sync. Ash Sync Service is not always available (e.g. Sync can be
  // disabled via command line flags or after/during profile destruction), in
  // this case call fails and caller notified via disconnection of |receiver|.
  // Added in M100.
  [MinVersion=65] BindSyncService@69(pending_receiver<SyncService> receiver);

  // Binds the System Display interface for querying display info.
  // Added in M92.
  [MinVersion=24] REMOVED_29@29(
      pending_receiver<SystemDisplayDeprecated> receiver);

  // Binds the Task Manager interface for integrating lacros tasks in ash
  // task manager.
  // Added in M91.
  [MinVersion=19] BindTaskManager@24(pending_receiver<TaskManager> receiver);

  // Binds the TelemetryDiagnosticRoutineService interface to allow Lacros to
  // initiate diagnostic routines from Ash.
  // Added in M116.
  [MinVersion=112] BindTelemetryDiagnosticRoutinesService@115(
    pending_receiver<TelemetryDiagnosticRoutinesService> receiver);

  // Binds the TelemetryEventService interface for registering telemetry events
  // in Lacros-Chrome.
  // Added in M114.
  [MinVersion=106] BindTelemetryEventService@109(
    pending_receiver<TelemetryEventService> receiver);

  // Binds the TelemetryManagementService interface for managing ChromeOS
  // settings in Lacros-Chrome.
  // Added in M122.
  [MinVersion=127] BindTelemetryManagementService@129(
    pending_receiver<TelemetryManagementService> receiver);

  // Binds the telemetry probe service to allow Lacros request telemetry data
  // from Ash.
  // Added in M106.
  [MinVersion=93] BindTelemetryProbeService@97(
      pending_receiver<crosapi.mojom.TelemetryProbeService> receiver);

  // Binds the test controller service, which tests can use to mutate ash. This
  // is not available on production devices.
  [MinVersion=9] BindTestController@14(
      pending_receiver<TestController> receiver);

  // Binds the TimeZoneService which notifies system timezone change.
  // Added in M99.
  [MinVersion=61] BindTimeZoneService@65(
      pending_receiver<TimeZoneService> receiver);

  // Binds the Tts service which process speech synthesis requests.
  [MinVersion=54] BindTts@58(pending_receiver<Tts> receiver);

  // Binds the url handler service which allows handling of urls by Ash.
  // Added in M90.
  [MinVersion=13] BindUrlHandler@18(pending_receiver<UrlHandler> receiver);

  // Binds the device factory in video capture service.
  // Added in M90.
  [MinVersion=20] BindVideoCaptureDeviceFactory@25(
      pending_receiver<crosapi.mojom.VideoCaptureDeviceFactory> receiver);

  // Binds the video conference manager to video conference mojo clients.
  [MinVersion=98] BindVideoConferenceManager@102(
    pending_receiver<crosapi.mojom.VideoConferenceManager> receiver);

  // VirtualKeyboard is a service that allows trusted extensions in Lacros
  // to control the virtual keyboard. Implemented in Ash.
  [MinVersion=87] BindVirtualKeyboard@91(
      pending_receiver<VirtualKeyboard> receiver);

  // Binds the vpn extension observer so that lacros can inform ash about
  // Vpn extension events.
  [MinVersion=75] BindVpnExtensionObserver@78(
      pending_receiver<VpnExtensionObserver> receiver);

  // Binds the Kiosk session service which sends session status changes from
  // lacros to ash.
  // Added in M96.
  [MinVersion=49] BindKioskSessionService@53(
      pending_receiver<KioskSessionService> receiver);

  // Binds the chrome app kiosk service. This service is used to install and
  // launch the chrome app inside lacros.
  [MinVersion=73] BindChromeAppKioskService@76(
      pending_receiver<ChromeAppKioskService> receiver);

  // Binds the web kiosk service. This service is used to install and launch the
  // web app inside lacros.
  [MinVersion=111] BindWebKioskService@114(
      pending_receiver<WebKioskService> receiver);

  // Binds the extension service for device local accounts. This service manages
  // the cached install of extensions into Lacros.
  [MinVersion=96] BindDeviceLocalAccountExtensionService@100(
      pending_receiver<DeviceLocalAccountExtensionService> receiver);

  // Binds the VolumeManager interface for accessing volume list, etc.
  // Added in M106.
  [MinVersion=90]
  BindVolumeManager@94(pending_receiver<VolumeManager> receiver);

  // Binds the vpn service. This service is used to facilirate
  // communication between chrome.vpnProvider extension in lacros and the
  // network services in ash.
  [MinVersion=79] BindVpnService@82(
      pending_receiver<VpnService> receiver);

  // Binds the web page info factory interface which allows ash to request web
  // page info from Lacros.
  // Added in M93.
  [MinVersion=34]
  BindWebPageInfoFactory@39(pending_receiver<WebPageInfoFactory> receiver);

  // Binds the web app publisher service to allow web app publishing from
  // lacros-chrome to the App Service in ash-chrome.
  // Added in M92.
  [MinVersion=22]
  BindWebAppPublisher@27(pending_receiver<AppPublisher> receiver);

  // Binds the service to allow web-app-related queries and actions between
  // lacros-chrome and ash-chrome. This is a web-app-specific interface,
  // independent of the App Service.
  // Added in M101.
  [MinVersion=69]
  BindWebAppService@72(pending_receiver<WebAppService> receiver);

  // Binds the service to allow lacros-chrome to set the chromeos wallpaper.
  [MinVersion=84] BindWallpaper@87(pending_receiver<Wallpaper> receiver);

  // Binds the GuestOS security key forwarding service.
  // Added in M120.
  [MinVersion=121] BindGuestOsSkForwarderFactory@123(
      pending_receiver<GuestOsSkForwarderFactory> receiver);

  // Passes generic browser information such as version, etc into ash in
  // |browser_info| during startup.
  // Added in M87.
  [MinVersion=3] OnBrowserStartup@6(BrowserInfo browser_info);

  // Binds the service containing input method related functionality such
  // as changing the keyboard input language.
  [MinVersion=137]
    BindInputMethods@139(pending_receiver<InputMethods> receiver);
};

[Stable, Extensible]
enum SessionType {
  [Default] kUnknown,
  kRegularSession,
  kGuestSession,
  kPublicSession,
  [MinVersion=40] kWebKioskSession,
  [MinVersion=41] kChildSession,
  [MinVersion=67] kAppKioskSession,
};

// Device mode (e.g. enterprise enrollment state). See policy::DeviceMode.
[Stable, Extensible]
enum DeviceMode {
  kUnknown = 0,
  // Not yet set.
  kNotSet,
  // Locally owned as consumer device.
  kConsumer,
  // Enrolled as an enterprise device.
  kEnterprise,
  // Deprecated in M115. No longer handled by Lacros, do not use.
  kEnterpriseActiveDirectoryDeprecated,
  // Retail kiosk device.
  kLegacyRetailMode,
  // Locally owned as consumer kiosk and can auto-launch a kiosk webapp.
  kConsumerKioskAutolaunch,
  // Demo mode, either enrolled online or setup in offline demo mode.
  kDemo,
};

// Whether or not metrics reporting in ash is managed by policy.
[Stable, Extensible]
enum MetricsReportingManaged {
  // Default value for backwards compatibility with old versions of ash.
  kUnknown = 0,
  kNotManaged = 1,
  kManaged = 2,
};

// Default directories on the system. We send the full path for each value for
// future compatibility, to avoid assumptions about where on disk the directory
// is located.
//
// Next version: 36
// Next id: 12
[Stable]
struct DefaultPaths {
  // The default (non-configurable) directory for documents. For example,
  // /home/chronos/u-<hash>/MyFiles.
  mojo_base.mojom.FilePath documents@0;

  // The default (non-configurable) directory for downloads. For example,
  // /home/chronos/u-<hash>/MyFiles/Downloads.
  mojo_base.mojom.FilePath downloads@1;

  // The (non-configurable) path of the mount point for drive in ChromeOS. For
  // example, /media/fuse/drivefs-<hash>.
  [MinVersion=23] mojo_base.mojom.FilePath? drivefs@2;

  // The path of the mount point for OneDrive in ChromeOS. For example,
  // /media/fuse/fusebox/fsp.<hash>.
  [MinVersion=35] mojo_base.mojom.FilePath? onedrive@11;

  // The (non-configurable) path of the software user NSS database. For
  // example, /home/chronos/u-<hash>/.pki/nssdb.
  [MinVersion=30] mojo_base.mojom.FilePath? user_nss_database@3;

  // The (non-configurable) path at which removable media is mounted. For
  // example, /media/removable.
  [MinVersion=31] mojo_base.mojom.FilePath? removable_media@4;

  // The (non-configurable) path at which ARC's storage is located (shown as
  // "Play Files" in Files app). For example, /run/arc/sdcard/write/emulated/0.
  [MinVersion=31] mojo_base.mojom.FilePath? android_files@5;

  // The (non-configurable) path at which Crostini's home directory is
  // mounted. For example, /media/fuse/crostini_<hash>_termina_penguin.
  [MinVersion=31] mojo_base.mojom.FilePath? linux_files@6;

  // The (non-configurable) directory for ash resources. For example,
  // /opt/google/chrome.
  [MinVersion=32] mojo_base.mojom.FilePath? ash_resources@7;

  // The default (non-configurable) directory for shared files. For example,
  // /home/chronos/u-<hash>/ShareCache.
  [MinVersion=33] mojo_base.mojom.FilePath? share_cache@8;

  // The directory where default web app configs are stored.
  [MinVersion=34] mojo_base.mojom.FilePath? preinstalled_web_app_config@9;

  // The directory where additional web app configs are stored.
  [MinVersion=34] mojo_base.mojom.FilePath?
      preinstalled_web_app_extra_config@10;
};

// The device specific data needed in Lacros.
// Next version: 4
// Next id: 9
[Stable]
struct DeviceProperties {
  // The value of device DM token. It is the raw data from the policy, not
  // encrypted.
  string device_dm_token@0;

  // The value of the device affiliation IDs, which represent which customer is
  // managing the device so that the user's affiliation to the device can be
  // determined. It is non-encrypted data corresponding to
  // PolicyData::device_affiliation_ids.
  [MinVersion=1] array<string>? device_affiliation_ids@1;

  // Whether ARC is installed and the current device is officially supported to
  // run ARC.
  [MinVersion=2] bool is_arc_available@2;

  // Whether the device is of tablet form factor.
  [MinVersion=2] bool is_tablet_form_factor@3;

  // The value of the device identifier of the directory API that is
  // generated by the server and identifies the cloud record of the device for
  // querying in the cloud directory API. See
  // https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices.
  [MinVersion=3] string? directory_device_id@4;

  // The device's serial number.
  [MinVersion=3] string? serial_number@5;

  // The administrator-annotated Asset Id.
  [MinVersion=3] string? annotated_asset_id@6;

  // The administrator-annotated location.
  [MinVersion=3] string? annotated_location@7;

  // The device's hostname as set by DeviceHostnameTemplate policy.
  [MinVersion=3] string? hostname@8;

  // If true, the device has a built-in touchscreen with stylus support. A null
  // value indicates that Ash was unable to determine stylus support (including
  // being too old to support it).
  [MinVersion=4]
  bool? has_stylus_enabled_touchscreen@9;
};

// Entropy variables which need to be kept in sync between Ash and Lacros
// throughout a session.
//
// Next version: 2
// Next id: 4
[Stable]
struct EntropySource {
  // Metrics service low entropy source of ash chrome.
  int32 low_entropy@0;

  // Metrics service old low entropy source of ash chrome.
  int32 old_low_entropy@1;

  // Metrics service pseudo low entropy source of ash chrome.
  int32 pseudo_low_entropy@2;

  // The limited entropy randomization source used by ash chrome, provided by
  // the metrics service. This field should not be null, but is required to be
  // optional by mojo for backward compatibility. See
  // https://chromium.googlesource.com/chromium/src/mojo/+/HEAD/public/tools/bindings/README.md#versioned-structs
  [MinVersion=1]
  string? limited_entropy_randomization_source@3;
};

[Stable, Extensible]
enum ExoImeSupport {
  kUnsupported = 0,

  // To work with the client IME implementation, exo has short term workaround
  // to filter some wayland key/keysym events by using ConsumedByIme().
  // Note that this is an approach consistent with ARC's behavior.
  kConsumedByImeWorkaround = 1,

  // Exo sends keysym events to a client using a separate API.
  // Once the client (lacros-chrome) gets ready to handle wl_keyboard::key and
  // zwp_text_input_v1::keysym properly in separate paths, exo can send each
  // each event without the ConsumedByIme() workaround above and tell the client
  // that it dropped the workaround using kSupported flag.
  [MinVersion=1] kSupported = 2,
};


// Which windows and tabs to show, if any, when first launching lacros.
// This values overrides the built-in chrome preference, with the exception of
// kUseStartupPreference.
[Stable, Extensible]
enum InitialBrowserAction {
  // Uses the Lacros preference SessionStartupPref.
  [Default] kUseStartupPreference = 0,

  // Deprecated in M114. No longer handled by Lacros, do not use.
  kOpenIncognitoWindowDeprecated = 1,

  // Deprecated in M114. No longer handled by Lacros, do not use.
  kRestoreLastSessionDeprecated = 2,

  // Lacros will launch but will not show any windows. It will continue running
  // in the background until a browser window is shown. At that point it will no
  // longer run in the background and will close when all windows are closed.
  [MinVersion=1] kDoNotOpenWindow = 3,

  // Deprecated in M114. No longer handled by Lacros, do not use.
  [MinVersion=2] kOpenNewTabPageWindowDeprecated = 4,

  // Deprecated in M114. No longer handled by Lacros, do not use.
  [MinVersion=3] kOpenWindowWithUrlsDeprecated = 5,

  // Deprecated in M114. No longer handled by Lacros, do not use.
  [MinVersion=4] kOpenGuestWindowDeprecated = 6,
};

// Whether / how mlservice on-device handwriting is supported.
[Stable, Extensible]
enum OndeviceHandwritingSupport {
  kUnsupported = 0,
  kUseRootfs = 1,
  kUseDlc = 2,
};

// Corresponds to BUILDFLAGs we use in ash-chrome that we want to propagate to
// Lacros Chrome. On the Lacros side we turn this into command line switches.
[Stable, Extensible]
enum BuildFlag {
  [Default] kUnknown = 0,
  kUseChromeosProtectedMedia = 1,
  kEnablePlatformEncryptedHevc = 2,
  kEnablePlatformHevc = 3,
  [MinVersion=47] kUseChromeosProtectedAv1 = 4,
};

// BrowserInitParams is a set of parameters for initialization of browsers
// (such as lacros-chrome), which is passed from ash-chrome to a browser.
// Since ash-chrome and browsers may have different versions, the browsers must
// handle this struct carefully.
//
// If ash-chrome is older than the browser, then some fields may not be
// present in the serialized IPC message. This manifests as the newer (missing)
// fields taking on default values in the browser. This means that the default
// value for each field must always be interpreted to mean:
// this field was not sent because ash-chrome was too old. If the default value
// needs to have a different meaning, then we must also add a bool field
// describing the validity of this field. Mojo currently does not support
// optional primitives.
//
// If ash-chrome is newer than the browser, then some fields may not be
// processed by the browser.
//
// IMPORTANT NOTE: These parameters are accessed via the BrowserParamsProxy
// wrapper class. Please update the methods of that class when adding new
// parameters here. If a new parameter is added and its value is only known
// after the user has logged in, please update BrowserPostLoginParams as well.
//
// Next version: 90
// Next id: 90
[Stable, RenamedFrom="crosapi.mojom.LacrosInitParams"]
struct BrowserInitParams {
  // This is ash-chrome's version of the Crosapi interface. This is used by
  // lacros-chrome to determine which interface methods are safe to call.
  [MinVersion=1]
  uint32 crosapi_version@0;

  // Deprecated in M88. |ash_metrics_enabled| always has a value.
  [MinVersion=2]
  bool deprecated_ash_metrics_enabled_has_value@1;

  // Whether metrics are enabled in ash-chrome. On browser first run we inherit
  // metrics consent from ash, because on Chrome OS metrics consent is chosen
  // during the out-of-box experience. After first run the browser handles
  // metrics consent via settings.
  [MinVersion=2]
  bool ash_metrics_enabled@2;

  // Type of the ash-chrome session at the browser startup time.
  [MinVersion=3]
  SessionType session_type@3;

  // Device mode at browser startup time. If the browser is running during the
  // out-of-box experience, the device mode might change later (e.g. if the
  // user chooses to enroll the device).
  [MinVersion=4]
  DeviceMode device_mode@4;

  // Ash sends all known crosapi interfaces and their versions at startup so
  // that a browser can synchronously query version info. Interfaces are
  // identified by a UUID, which is manually generated and assigned via the
  // UUID mojom qualifier.
  // Added in M88.
  [MinVersion=5]
  map<mojo_base.mojom.Token, uint32>? interface_versions@5;

  // Default directories on the system.
  // Added in M89.
  [MinVersion=6]
  DefaultPaths? default_paths@6;

  [MinVersion=7]
  string? REMOVED_7@7;

  // Whether or not metrics reporting in ash is managed by policy. This is
  // passed independently because the metrics reporting state is controlled by
  // ash-level device policy, but we want to show the "managed" icon in the
  // browser preferences UI as if it was controlled by user policy.
  // Added in M89.
  [MinVersion=8]
  MetricsReportingManaged ash_metrics_managed@8;

  // How exo supports IME on the wayland client (such as Lacros-chrome).
  // The client can control IME handling depending on the ash-chrome's support
  // status via this flag.
  [MinVersion=9]
  ExoImeSupport exo_ime_support@9;

  // Primary user ID hash. Used to set CROS_USER_ID_HASH env var in crosh.
  // Do not use this to construct paths, use DefaultPaths for that purpose.
  [MinVersion=10]
  string? cros_user_id_hash@10;

  // Policy blob of the device account. If present, it's a managed account with
  // policy data. If empty, it's unmanaged account. If absent, an error occurred
  // while loading policy data. The format is serialized PolicyFetchResponse
  // object. See components/policy/proto/device_management_backend.proto for
  // details.
  [MinVersion=11]
  array<uint8>? device_account_policy@11;

  // Timestamp (seconds since epoch in UTC) at which last device account policy
  // fetch was attempted.
  [MinVersion=42]
  uint64 last_policy_fetch_attempt_timestamp@42;

  // System idle info to initialize SystemIdleCache.
  [MinVersion=12]
  IdleInfo? idle_info@12;

  [MinVersion=13]
  bool REMOVED_13@13;
  [MinVersion=14]
  bool REMOVED_14@14;

  // Defines which windows or tabs to restore on launch.
  [MinVersion=15]
  InitialBrowserAction initial_browser_action@15;

  // The account used to sign into Chrome OS. This may be a Gaia account or a
  // Microsoft Active Directory account. This field will be null for
  // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  // Note that this is different from the concept of a Primary Account in the
  // browser. A user may not be signed into a Lacros browser Profile, or may be
  // signed into a browser Profile with an account which is different from the
  // account which they used to sign into the device - aka Device Account.
  // Note: Do NOT use the email id of an account as an identifier. Use
  // `AccountKey` - which has the necessary and sufficient information to
  // identify an account.
  // Added in M91.
  [MinVersion=16]
  Account? device_account@16;

  [MinVersion=17]
  bool REMOVED_17@17;
  [MinVersion=18]
  bool REMOVED_18@18;
  [MinVersion=19]
  bool REMOVED_19@19;

  [MinVersion=20]
  NativeThemeInfo? native_theme_info@20;

  // The set of static device specific data.
  [MinVersion=21]
  DeviceProperties? device_properties@21;

  [MinVersion=22]
  // Whether (and how) on-device handwriting recognition is supported, depending
  // ash-chrome's startup switches.
  OndeviceHandwritingSupport ondevice_handwriting_support@22;

  [MinVersion=23]
  // Build flags from ash-chrome that we turn into command line switches to
  // enforce at run-time in lacros-chrome.
  array<BuildFlag>? build_flags@23;

  // Specifies what requests the startup_urls.
  // This can be effective only when startup_urls is specified.
  // Added in M100.
  [MinVersion=36]
  OpenUrlFrom startup_urls_from@36;

  // URLs to be opened at the beginning. This works only when
  // initial_browser_action == OpenWindowWithUrls.
  // Added in M96.
  [MinVersion=24]
  array<url.mojom.Url>? REMOVED_24@24;

  // The set of device settings for Lacros. Lacros should *NOT* use this data,
  // but rely on DeviceSettingsLacros::GetDeviceSettings instead.
  [MinVersion=25]
  DeviceSettings? device_settings@25;

  // Metrics service client id of ash chrome.
  // Lacros needs to use the same client id as ash chrome.
  [MinVersion=26]
  string? metrics_service_client_id@26;

  // UKM client id of ash chrome.
  // Lacros needs to use the same client id as ash chrome.
  [MinVersion=38]
  uint64 ukm_client_id@38;

  [MinVersion=27]
  bool REMOVED_27@27;

  // When this flag is set, lacros will publish chrome apps to the app service.
  [MinVersion=28]
  bool publish_chrome_apps@28;

  // When this flag is set, lacros will publish hosted apps to the app service.
  [MinVersion=39]
  bool publish_hosted_apps@39;

  [Stable, Extensible]
  enum InitialKeepAlive {
    // ash-chrome is too old so the keep-alive settings in ash-chrome is not
    // available.
    [Default] kUnknown,

    // On the browser launching, keep-alive is disabled so lacros-chrome
    // process can be terminated at browser's preferred timing.
    kDisabled,

    // On the browser launching, keep-alive is enabled so lacros-chrome process
    // is expected to be kept, specifically, e.g. even if all windows are
    // closed.
    kEnabled,
  };

  // Initial keep-alive value. If ash-chrome is too old (M96 or earlier)
  // the default value kUnknown should be set.
  // This is initial value, and so the value can be updated later via
  // BrowserService::UpdateKeepAlive().
  [MinVersion=29]
  InitialKeepAlive initial_keep_alive@29;

  // Whether the ash::switches::kUnfilteredBluetoothDevices command line switch
  // is present for Ash.
  [MinVersion=31]
  bool is_unfiltered_bluetooth_device_enabled@30;

  // Ash publishes the list of capabilities it has implemented to Lacros so
  // that Lacros can dynamically change its behavior. This should typically take
  // the format of a bug identifier, e.g. "crbug/123" or "b/456". This is
  // primarily necessary for backporting behavior changes and fixes to older
  // branches. If applicable, when adding a new capability, please indicate with
  // a comment when we can stop publishing the capability -- e.g. once Ash and
  // Lacros are both past M100, then we can remove this capability.
  [MinVersion=32]
  array<string>? ash_capabilities@31;

  // Internal chrome:// URLs which can be handled by Ash. These are sent from
  // Ash to Lacros at startup so Lacros knows which URLs are OK to forward.
  // Added in M97.
  [MinVersion=33]
  array<url.mojom.Url>? accepted_internal_ash_urls@32;

  // Deprecated in M117. Enabled by default in M100.
  // Whether incognito profile integration is enabled with the feature that aims
  // to reduce context switching by enabling users to collect content and
  // transfer or access it later.
  // See `ash::features::IsHoldingSpaceIncognitoProfileIntegrationEnabled()`.
  [MinVersion=34]
  bool is_holding_space_incognito_profile_integration_enabled_deprecated@33;

  // Deprecated in M117. Never enabled.
  // Whether in-progress downloads notification suppression is enabled with the
  // feature that aims to reduce context switching by enabling users to collect
  // content and transfer or access it later.
  // See `ash::features::IsHoldingSpaceInProgressDownloadsNotificationSuppressionEnabled()`.
  [MinVersion=34]
  bool is_holding_space_in_progress_downloads_notification_suppression_enabled_deprecated@34;

  // Whether the device is either enterprise managed or in demo mode.
  [MinVersion=35]
  bool is_device_enterprised_managed@35;

  [Stable, Extensible]
  enum DeviceType {
    [Default] kUnknown,
    kChromebook,
    kChromebase,
    kChromebit,
    kChromebox,
  };

  // The form factor of the device.
  [MinVersion=37]
  DeviceType device_type@37;

  // Whether on-device speech recognition is supported on the platform.
  // Forwarded from ash flag OnDeviceSpeechRecognition.
  [MinVersion=40]
  bool is_ondevice_speech_supported@40;

  // Policy blob of the extension policy for the device account. The values of
  // the map are serialized PolicyFetchResponse proto messages from
  // components/policy/proto/device_management_backend.proto.
  [MinVersion=41]
  map<crosapi.mojom.PolicyNamespace, array<uint8>>? REMOVED_41@41;

  // Component (i.e. chrome extensions) policy for the device account.
  // Maps `PolicyNamespace` representing an extension to the JSON policy
  // value for that extension.
  [MinVersion=43]
  map<crosapi.mojom.PolicyNamespace, mojo_base.mojom.Value>? device_account_component_policy@43;

  // Ash-chrome versioning information
  // Example: 105.0.5124.0
  [MinVersion=44]
  string? ash_chrome_version@44;

  // Tells lacros whether ash uses CUPS (Common Unix Printing System) for
  // printing. This corresponds to the USE_CUPS flag being enabled in ash.
  [MinVersion=45]
  bool use_cups_for_printing@45;

  // Tells lacros whether ash uses floss for bluetooth.
  [MinVersion=46]
  bool use_floss_bluetooth@46;

  // Tells lacros whether the currently logged in user is the device owner.
  [MinVersion=47]
  bool is_current_user_device_owner@47;

  // When this is set to true, Lacros will not mux extension app ids. The
  // original reason for muxing was to avoid collision between lacros and ash
  // apps with the same id. This is no longer possible with the extension keep
  // list feature. This parameter is structured so that if ash is too old to
  // support this feature, the default value of false maintains pre-existing
  // behavior.
  [MinVersion=48]
  bool REMOVED_48@48;

  // When this flag is set to true, Lacros tts support feature will be enabled.
  [MinVersion=49]
  bool enable_lacros_tts_support@49;

  [Stable, Extensible]
  enum LacrosSelection {
    [Default] kUnspecified,
    // Instance residing in the rootfs partition.
    kRootfs,
    // Instance residing in the stateful partition.
    kStateful,
  };

  // The partition from which the lacros instance has been launched, which is
  // either rootfs or stateful.
  [MinVersion=50]
  LacrosSelection lacros_selection@50;

  // When this flag is set to true, Lacros float window support including the
  // multitask menu will be enabled.
  [MinVersion=51]
  bool REMOVED_51@51;

  // True if this is a device with cloud gaming features enabled.
  [MinVersion=52]
  bool is_cloud_gaming_device@52;

  [Stable, Extensible]
  enum GpuSandboxStartMode {
    [Default] kUnspecified,
    // Start the GPU process sandbox as if --gpu-sandbox-start-early was
    // supplied.
    kEarly,
    // Start the GPU process sandbox at the default time.
    kNormal,
  };

  // When to start the GPU process sandbox in lacros-chrome if
  // --gpu-sandbox-start-early is not supplied. If --gpu-sandbox-start-early is
  // supplied, this field is irrelevant.
  [MinVersion=53]
  GpuSandboxStartMode gpu_sandbox_start_mode@53;

  // Ash extension keep list.
  [MinVersion=54]
  ExtensionKeepList? extension_keep_list@54;

  // When this flag is set to true, partial split through the multitask menu
  // will be enabled.
  // Added in M110.
  [MinVersion=55]
  bool REMOVED_55@55;

  // Tells lacros-chrome if videoconference UI features are enabled. Used to
  // guard the creation of `VideoConferenceManagerClient`. This client
  // provides information about videoconference apps to the
  // VideoConferenceManager in ash.
  [MinVersion=56]
  bool vc_controls_ui_enabled@56;

  // App service block list for extension apps and extensions to be blocked
  // for app service in lacros.
  [MinVersion=57]
  StandaloneBrowserAppServiceBlockList?
      standalone_browser_app_service_blocklist@57;

  // When this flag is set to true, CPU-mappable native GpuMemoryBuffers are
  // enabled.
  //
  // TODO(b/278097642): improve this documentation. I think this only refers to
  // the ability of renderer processes to obtain such buffers because as far as
  // I know, the GPU process can allocate CPU-mappable native GpuMemoryBuffers
  // regardless of this flag.
  [MinVersion=58]
  bool enable_cpu_mappable_native_gpu_memory_buffers@58;

  // When this flag is set to true, OOP video decoding is available.
  [MinVersion=59]
  bool oop_video_decoding_enabled@59;

  // Set to true when the `chromeos::features::kUploadOfficeToCloud` flag is
  // enabled in Ash.
  [MinVersion=60]
  bool is_upload_office_to_cloud_enabled@60;

  // When this flag is on, the clipboard history refresh feature is enabled.
  [MinVersion=61]
  bool enable_clipboard_history_refresh@61;

  // When this flag is set to true, frames can be scheduled with variable
  // refresh rate timing.
  //
  // NOTE: If the lacros version is skewed later than the ash on M120, this flag
  // may have a false-positive state. The resulting behavior would regress as
  // though the lacros version matches the current ash version.
  [MinVersion=62, RenamedFrom="is_variable_refresh_rate_enabled"]
  bool is_variable_refresh_rate_always_on@62;

  // Tells lacros whether the currently logged in user is ephemeral.
  [MinVersion=63]
  bool is_current_user_ephemeral@63;

  // Tells if PDF OCR feature is enabled.
  [MinVersion=64]
  bool is_pdf_ocr_enabled@64;

  // If true, the DriveFsBulkPinning flag and it's accompanying feature
  // management flag has been enabled.
  [MinVersion=65, RenamedFrom="is_drivefs_bulk_pinning_enabled"]
  bool is_drivefs_bulk_pinning_available@65;

  // Tell lacros whether the device is available to enable Floss.
  [MinVersion=66]
  bool is_floss_available@66;

  // Indicates whether the new downloads integration with System UI surfaces is
  // enabled in Ash, so as to allow the browser to disable competing behaviors.
  [MinVersion=67]
  bool is_sys_ui_downloads_integration_v2_enabled@67;

  // Indicates whether ChromeOS Battery Saver is available, so browser specific
  // energy saving UI should defer to the OS.
  [MinVersion=68]
  bool is_cros_battery_saver_available@68;

  // Tells lacros whether to check Floss availability of the machine. The check
  // is used to block Floss from enabling if the machine is indicated
  // unavailable.
  [MinVersion=69]
  bool is_floss_availability_check_needed@69;

  // Tells lacros whether the app install service URI is enabled.
  [MinVersion=70]
  bool is_app_install_service_uri_enabled@70;

  // Tells if the desk profiles feature is enabled.
  [MinVersion=71]
  bool is_desk_profiles_enabled@71;

  // If true, the shortcuts in web app system will be published as shortcuts to
  // app service and displayed with updated UI in ash.
  [MinVersion=72]
  bool is_cros_web_app_shortcut_ui_update_enabled@72;

  // Metrics service low entropy source of ash chrome.
  // Lacros needs to use the same entropy values to be trustworthy for UMA data.
  [MinVersion=73]
  EntropySource? entropy_source@73;

  // If true, the shortstand feature is enabled, which introduces different
  // behaviour between web apps and browser created shortcuts to be displayed.
  [MinVersion=74]
  bool is_cros_shortstand_enabled@74;

  // If true, "Compose" will be disabled. Only applies on chromeos devices.
  [MinVersion=75]
  bool should_disable_chrome_compose_on_chromeos@75;

  // The seed that is used to randomize the limited entropy synthetic trial. The
  // group assignment of this trial needs to be the same between Lacros and ash
  // chrome.
  [MinVersion=76]
  uint64 limited_entropy_synthetic_trial_seed@76;

  // If true, captive portal signin windows are opened as a popup window.
  [MinVersion=77]
  bool is_captive_portal_popup_window_enabled@77;

  // Set to true when the
  // `chromeos::features::kFileSystemProviderCloudFileSystem` flag is enabled
  // in Ash.
  [MinVersion=78]
  bool is_file_system_provider_cloud_file_system_enabled@78;

  // Set to true when the `chromeos::features::kCrosWebAppInstallDialog` flag is
  // enabled in Ash.
  [MinVersion=79]
  bool is_cros_web_app_install_dialog_enabled@79;

  // If true, "Orca" will be enabled.
  [MinVersion=80]
  bool is_orca_enabled@80;

  // Set to true when the Mall web app is enabled in Ash.
  [MinVersion=81]
  bool is_cros_mall_web_app_enabled@81;

  // If true, "Mahi" will be enabled.
  [MinVersion=82]
  bool is_mahi_enabled@82;

  // If true, the container app should be preinstalled.
  [MinVersion=83]
  bool is_container_app_preinstall_enabled@83;

  // If true, Orca will use l10n strings, otherwise, en-us strings are used.
  [MinVersion=84]
  bool is_orca_use_l10n_strings_enabled@84;

  // Deprecated in M118. Do not use.
  // Set to true if the Mahi feature is supported and the feature key check has
  // been satisfied.
  [MinVersion=85]
  bool is_mahi_supported_with_correct_feature_key_deprecated@85;

  // Set to true when both the
  // `chromeos::features::kFileSystemProviderContentCache` and
  // `chromeos::features::kFileSystemProviderCloudFileSystem` flag is enabled in
  // Ash.
  [MinVersion=86]
  bool is_file_system_provider_content_cache_enabled@86;

  // Tell lacros whether the device is available to enable LL Privacy.
  [MinVersion=87]
  bool is_llprivacy_available@87;

  // Set to true when orca internationalization flag is enabled in Ash.
  [MinVersion=88]
  bool is_orca_internationalize_enabled@88;

  // If true, "Magic Boost" will be enabled.
  [MinVersion=89]
  bool is_magic_boost_enabled@89;
};

// BrowserPostLoginParams is the subset of parameters in BrowserInitParams
// that is only known after the user has successfully logged in.
//
// When lacros-chrome is pre-launched at login screen, the subset of
// BrowserInitParams which is already available is by ash-chrome at
// that time. The rest is passed after login via this structure.
//
// Next version: 3
// Next id: 21
[Stable]
struct BrowserPostLoginParams {
  // Type of the ash-chrome session at the browser startup time.
  SessionType session_type@0;

  // Default directories on the system.
  // Added in M89.
  DefaultPaths? default_paths@1;

  string? REMOVED_2@2;

  // Primary user ID hash. Used to set CROS_USER_ID_HASH env var in crosh.
  // Do not use this to construct paths, use DefaultPaths for that purpose.
  string? cros_user_id_hash@3;

  // Policy blob of the device account. If present, it's a managed account with
  // policy data. If empty, it's unmanaged account. If absent, an error occurred
  // while loading policy data. The format is serialized PolicyFetchResponse
  // object. See components/policy/proto/device_management_backend.proto for
  // details.
  array<uint8>? device_account_policy@4;

  // Timestamp (seconds since epoch in UTC) at which last device account policy
  // fetch was attempted.
  uint64 last_policy_fetch_attempt_timestamp@5;

  // Defines which windows or tabs to restore on launch.
  InitialBrowserAction initial_browser_action@6;

  // The account used to sign into Chrome OS. This may be a Gaia account or a
  // Microsoft Active Directory account. This field will be null for
  // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  // Note that this is different from the concept of a Primary Account in the
  // browser. A user may not be signed into a Lacros browser Profile, or may be
  // signed into a browser Profile with an account which is different from the
  // account which they used to sign into the device - aka Device Account.
  // Note: Do NOT use the email id of an account as an identifier. Use
  // `AccountKey` - which has the necessary and sufficient information to
  // identify an account.
  // Added in M91.
  Account? device_account@7;

  bool REMOVED_8@8;
  bool REMOVED_9@9;

  // Specifies what requests the startup_urls.
  // This can be effective only when startup_urls is specified.
  // Added in M100.
  OpenUrlFrom startup_urls_from@10;

  // URLs to be opened at the beginning. This works only when
  // initial_browser_action == OpenWindowWithUrls.
  // Added in M96.
  array<url.mojom.Url>? REMOVED_11@11;

  bool REMOVED_12@12;

  // When this flag is set, lacros will publish chrome apps to the app service.
  bool publish_chrome_apps@13;

  // When this flag is set, lacros will publish hosted apps to the app service.
  bool publish_hosted_apps@14;

  // Component (i.e. chrome extensions) policy for the device account.
  // Maps `PolicyNamespace` representing an extension to the JSON policy
  // value for that extension.
  map<crosapi.mojom.PolicyNamespace, mojo_base.mojom.Value>? device_account_component_policy@15;

  // Tells lacros whether the currently logged in user is the device owner.
  bool is_current_user_device_owner@16;

  // When this is set to true, Lacros will not mux extension app ids. The
  // original reason for muxing was to avoid collision between lacros and ash
  // apps with the same id. This is no longer possible with the extension keep
  // list feature. This parameter is structured so that if ash is too old to
  // support this feature, the default value of false maintains pre-existing
  // behavior.
  bool REMOVED_17@17;

  // When this flag is set to true, Lacros tts support feature will be enabled.
  bool enable_lacros_tts_support@18;

  // Tells lacros whether the currently logged in user is ephemeral.
  [MinVersion=1]
  bool is_current_user_ephemeral@19;

  // Deprecated in M118. Do not use.
  // Set to true if the Mahi feature is supported and the feature key check has
  // been satisfied.
  [MinVersion=2]
  bool is_mahi_supported_with_correct_feature_key_deprecated@20;
};