crosapi.mojom 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module crosapi.mojom;
  5. import "chromeos/components/remote_apps/mojom/remote_apps.mojom";
  6. import "chromeos/components/sensors/mojom/cros_sensor_service.mojom";
  7. import "chromeos/crosapi/mojom/account_manager.mojom";
  8. import "chromeos/crosapi/mojom/app_service.mojom";
  9. import "chromeos/crosapi/mojom/app_window_tracker.mojom";
  10. import "chromeos/crosapi/mojom/arc.mojom";
  11. import "chromeos/crosapi/mojom/audio_service.mojom";
  12. import "chromeos/crosapi/mojom/authentication.mojom";
  13. import "chromeos/crosapi/mojom/automation.mojom";
  14. import "chromeos/crosapi/mojom/browser_app_instance_registry.mojom";
  15. import "chromeos/crosapi/mojom/browser_version.mojom";
  16. import "chromeos/crosapi/mojom/cert_database.mojom";
  17. import "chromeos/crosapi/mojom/cert_provisioning.mojom";
  18. import "chromeos/crosapi/mojom/chrome_app_kiosk_service.mojom";
  19. import "chromeos/crosapi/mojom/clipboard.mojom";
  20. import "chromeos/crosapi/mojom/clipboard_history.mojom";
  21. import "chromeos/crosapi/mojom/content_protection.mojom";
  22. import "chromeos/crosapi/mojom/cros_display_config.mojom";
  23. import "chromeos/crosapi/mojom/desk_template.mojom";
  24. import "chromeos/crosapi/mojom/device_attributes.mojom";
  25. import "chromeos/crosapi/mojom/device_oauth2_token_service.mojom";
  26. import "chromeos/crosapi/mojom/device_settings_service.mojom";
  27. import "chromeos/crosapi/mojom/diagnostics_service.mojom";
  28. import "chromeos/crosapi/mojom/digital_goods.mojom";
  29. import "chromeos/crosapi/mojom/dlp.mojom";
  30. import "chromeos/crosapi/mojom/document_scan.mojom";
  31. import "chromeos/crosapi/mojom/download_controller.mojom";
  32. import "chromeos/crosapi/mojom/drive_integration_service.mojom";
  33. import "chromeos/crosapi/mojom/echo_private.mojom";
  34. import "chromeos/crosapi/mojom/emoji_picker.mojom";
  35. import "chromeos/crosapi/mojom/extension_info_private.mojom";
  36. import "chromeos/crosapi/mojom/feedback.mojom";
  37. import "chromeos/crosapi/mojom/field_trial.mojom";
  38. import "chromeos/crosapi/mojom/file_manager.mojom";
  39. import "chromeos/crosapi/mojom/file_system_provider.mojom";
  40. import "chromeos/crosapi/mojom/force_installed_tracker.mojom";
  41. import "chromeos/crosapi/mojom/fullscreen_controller.mojom";
  42. import "chromeos/crosapi/mojom/geolocation.mojom";
  43. import "chromeos/crosapi/mojom/holding_space_service.mojom";
  44. import "chromeos/crosapi/mojom/identity_manager.mojom";
  45. import "chromeos/crosapi/mojom/idle_service.mojom";
  46. import "chromeos/crosapi/mojom/image_writer.mojom";
  47. import "chromeos/crosapi/mojom/in_session_auth.mojom";
  48. import "chromeos/crosapi/mojom/keystore_service.mojom";
  49. import "chromeos/crosapi/mojom/launcher_search.mojom";
  50. import "chromeos/crosapi/mojom/local_printer.mojom";
  51. import "chromeos/crosapi/mojom/login.mojom";
  52. import "chromeos/crosapi/mojom/login_screen_storage.mojom";
  53. import "chromeos/crosapi/mojom/login_state.mojom";
  54. import "chromeos/crosapi/mojom/policy_namespace.mojom";
  55. import "chromeos/crosapi/mojom/policy_service.mojom";
  56. import "chromeos/crosapi/mojom/message_center.mojom";
  57. import "chromeos/crosapi/mojom/metrics_reporting.mojom";
  58. import "chromeos/crosapi/mojom/native_theme.mojom";
  59. import "chromeos/crosapi/mojom/network_change.mojom";
  60. import "chromeos/crosapi/mojom/networking_attributes.mojom";
  61. import "chromeos/crosapi/mojom/networking_private.mojom";
  62. import "chromeos/crosapi/mojom/power.mojom";
  63. import "chromeos/crosapi/mojom/network_settings_service.mojom";
  64. import "chromeos/crosapi/mojom/prefs.mojom";
  65. import "chromeos/crosapi/mojom/printing_metrics.mojom";
  66. import "chromeos/crosapi/mojom/probe_service.mojom";
  67. import "chromeos/crosapi/mojom/remoting.mojom";
  68. import "chromeos/crosapi/mojom/resource_manager.mojom";
  69. import "chromeos/crosapi/mojom/screen_manager.mojom";
  70. import "chromeos/crosapi/mojom/select_file.mojom";
  71. import "chromeos/crosapi/mojom/sharesheet.mojom";
  72. import "chromeos/crosapi/mojom/speech_recognition.mojom";
  73. import "chromeos/crosapi/mojom/structured_metrics_service.mojom";
  74. import "chromeos/crosapi/mojom/sync.mojom";
  75. import "chromeos/crosapi/mojom/system_display.mojom";
  76. import "chromeos/crosapi/mojom/task_manager.mojom";
  77. import "chromeos/crosapi/mojom/test_controller.mojom";
  78. import "chromeos/crosapi/mojom/timezone.mojom";
  79. import "chromeos/crosapi/mojom/tts.mojom";
  80. import "chromeos/crosapi/mojom/url_handler.mojom";
  81. import "chromeos/crosapi/mojom/vpn_service.mojom";
  82. import "chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom";
  83. import "chromeos/crosapi/mojom/video_capture.mojom";
  84. import "chromeos/crosapi/mojom/kiosk_session_service.mojom";
  85. import "chromeos/crosapi/mojom/virtual_keyboard.mojom";
  86. import "chromeos/crosapi/mojom/volume_manager.mojom";
  87. import "chromeos/crosapi/mojom/vpn_extension_observer.mojom";
  88. import "chromeos/crosapi/mojom/wallpaper.mojom";
  89. import "chromeos/crosapi/mojom/web_app_service.mojom";
  90. import "chromeos/crosapi/mojom/web_page_info.mojom";
  91. import "mojo/public/mojom/base/big_string.mojom";
  92. import "mojo/public/mojom/base/file_path.mojom";
  93. import "mojo/public/mojom/base/generic_pending_receiver.mojom";
  94. import "mojo/public/mojom/base/string16.mojom";
  95. import "mojo/public/mojom/base/token.mojom";
  96. import "mojo/public/mojom/base/values.mojom";
  97. import "services/device/public/mojom/hid.mojom";
  98. import "services/media_session/public/mojom/audio_focus.mojom";
  99. import "services/media_session/public/mojom/media_controller.mojom";
  100. import "url/mojom/url.mojom";
  101. // BrowserInfo is a set of parameters passed to ash from browser (such as
  102. // lacros-chrome) upon its startup, which contains the browser information
  103. // such as version, etc.
  104. [Stable, RenamedFrom="crosapi.mojom.LacrosInfo"]
  105. struct BrowserInfo {
  106. // Version of the browser displayed to user in feedback report, etc.
  107. // It includes both browser version and channel in the format of:
  108. // {browser version} {channel}
  109. // For example, "87.0.0.1 dev", "86.0.4240.38 beta".
  110. string browser_version@0;
  111. // Lacros publishes the set of workarounds it has implemented. This is needed
  112. // to cherry-picks of lacros bug fixes to older branches. See
  113. // `ash_workarounds` for more details.
  114. [MinVersion=1]
  115. array<string>? lacros_workarounds@1;
  116. // TODO(crbug.com/1119925): Add more parameters later.
  117. };
  118. // Crosapi defines the APIs that live in ash-chrome and are accessed from
  119. // client applications (such as lacros-chrome). When adding a major new API
  120. // please note the milestone when you added it, to help us reason about
  121. // compatibility between the client applications and older ash-chrome binaries.
  122. //
  123. // Next version: 96
  124. // Next method id: 100
  125. [Stable, Uuid="8b79c34f-2bf8-4499-979a-b17cac522c1e",
  126. RenamedFrom="crosapi.mojom.AshChromeService"]
  127. interface Crosapi {
  128. // Deprecated.
  129. // Added in M91.
  130. [MinVersion=18]
  131. BindAutomationDeprecated@23(pending_receiver<Automation> receiver);
  132. // Binds the audio devices service which provides audio info to Lacros
  133. [MinVersion=82] BindAudioService@85(
  134. pending_receiver<AudioService> receiver);
  135. // Binds the authenticate profile handler service which allows authentication
  136. // of profiles by Ash.
  137. // Added in M97.
  138. [MinVersion=58] BindAuthentication@62(
  139. pending_receiver<Authentication> receiver);
  140. // Binds the automation factory interface which allows ash to enableautomation
  141. // for Lacros and Lacros to send automation data to Ash.
  142. // Added in M91.
  143. [MinVersion=21]
  144. BindAutomationFactory@26(pending_receiver<AutomationFactory> receiver);
  145. // Binds Chrome OS Account Manager for Identity management.
  146. // Added in M87.
  147. [MinVersion=4]
  148. BindAccountManager@7(pending_receiver<AccountManager> receiver);
  149. // Bind the app service proxy, which allows the Lacros Browser to
  150. // interact with all apps installed in App Service in ash-chrome.
  151. // Added in M93.
  152. [MinVersion=40]
  153. BindAppServiceProxy@45(pending_receiver<AppServiceProxy> receiver);
  154. // Bind ARC.
  155. // Added in M98.
  156. [MinVersion=59]
  157. BindArc@63(pending_receiver<Arc> receiver);
  158. // Added in M95.
  159. [MinVersion=50] BindBrowserAppInstanceRegistry@54(
  160. pending_receiver<BrowserAppInstanceRegistry> receiver);
  161. // Binds the BrowserVersionService interface for getting browser version
  162. // information.
  163. // Added in M95.
  164. [MinVersion=45]
  165. BindBrowserVersionService@50(
  166. pending_receiver<BrowserVersionService> receiver);
  167. // Binds the BrowserServiceHost interface to prepare registering
  168. // a BrowserService to crosapi.
  169. // This is a part of lacros-chrome bootstrap sequence. First, Crosapi
  170. // interface is bound, and then lacros-chrome calls this so that it
  171. // obtains BrowserServiceHost proxy. Finally, lacros-chrome calls
  172. // BrowserServiceHost::AddBrowserService to register its BrowserService
  173. // so that ash-chrome can call it to ask browser operations to lacros-chrome.
  174. // Added in M90.
  175. [MinVersion=15]
  176. BindBrowserServiceHost@20(pending_receiver<BrowserServiceHost> receiver);
  177. // Binds the BrowserCdmFactory interface for proxying communication to the
  178. // HWDRM CDM hosted in a ChromeOS daemon process. We need to use a
  179. // GenericPendingReceiver to avoid dependency circularities.
  180. // Added in M95.
  181. [MinVersion=42] BindBrowserCdmFactory@47(
  182. mojo_base.mojom.GenericPendingReceiver receiver);
  183. // Binds the CertDatabase interface for initializing certificate database in
  184. // client applications.
  185. // Added in M89.
  186. [MinVersion=7] BindCertDatabase@12(pending_receiver<CertDatabase> receiver);
  187. // Binds the CertProvisioning interface for implementing certificate
  188. // provisioning UI.
  189. // Added in M102.
  190. [MinVersion=83]
  191. BindCertProvisioning@86(pending_receiver<CertProvisioning> receiver);
  192. // Binds the chrome app publisher service, which allows Lacros to connect its
  193. // Chrome apps to the app service.
  194. // Added in M93.
  195. [MinVersion=38]
  196. BindChromeAppPublisher@43(pending_receiver<AppPublisher> receiver);
  197. // Binds the window tracker for chrome apps. This allows Lacros to inform Ash
  198. // of the relationship between AppService app_ids and exo/Wayland/aura
  199. // windows.
  200. [MinVersion=44]
  201. BindChromeAppWindowTracker@49(pending_receiver<AppWindowTracker> receiver);
  202. // Bind the clipboard interface to allow lacros-chrome to interact with the
  203. // system clipboard.
  204. [MinVersion=10] BindClipboard@15(pending_receiver<Clipboard> receiver);
  205. // Bind the ClipboardHistory interface to allow lacros-chrome to show
  206. // ClipboardHistory.
  207. [MinVersion=23] BindClipboardHistory@28(
  208. pending_receiver<ClipboardHistory> receiver);
  209. // Binds the ContentProtection interface which is one dependency of the
  210. // content decryption module.
  211. [MinVersion=26] BindContentProtection@31(
  212. pending_receiver<ContentProtection> receiver);
  213. // Binds the CrosDisplayConfigController interface for querying display info.
  214. // Added in M106.
  215. [MinVersion=89] BindCrosDisplayConfigController@93(
  216. pending_receiver<CrosDisplayConfigController> receiver);
  217. // Binds the desk template factory interface.
  218. // Added in M101.
  219. [MinVersion=68] BindDeskTemplate@71(pending_receiver<DeskTemplate> receiver);
  220. // Binds the device attributes service which is used by enterprise extension
  221. // APIs to query information about the device.
  222. // Added in M89.
  223. [MinVersion=12] BindDeviceAttributes@17(
  224. pending_receiver<DeviceAttributes> receiver);
  225. // Binds the DeviceOAuth2TokenService interface for the device oauth2 token
  226. // service in Lacros-Chrome.
  227. // Added in M106.
  228. [MinVersion=91] BindDeviceOAuth2TokenService@95(
  229. pending_receiver<DeviceOAuth2TokenService> receiver);
  230. // Binds the DeviceSettingsService interface for initializing device settings
  231. // in Lacros-Chrome.
  232. // Added in 96.
  233. [MinVersion=55] BindDeviceSettingsService@59(
  234. pending_receiver<DeviceSettingsService> receiver);
  235. // Binds the diagnostics service to allow Lacros to initiate diagnostics
  236. // routines from Ash.
  237. // Added in M106.
  238. [MinVersion=95] BindDiagnosticsService@99(
  239. pending_receiver<crosapi.mojom.DiagnosticsService> receiver);
  240. // Added in M104.
  241. [MinVersion=76] BindDigitalGoodsFactory@79(
  242. pending_receiver<DigitalGoodsFactory> receiver);
  243. // Binds the DLP (Data Leak Prevention) interface for notifying Ash about
  244. // content restrictions applied to web content in Lacros.
  245. // Added in M98.
  246. [MinVersion=60] BindDlp@64(pending_receiver<Dlp> receiver);
  247. // Binds the DocumentScan interface, which allows Lacros to get scanner access
  248. // via Ash Chrome.
  249. // Added in M104.
  250. [MinVersion=77] BindDocumentScan@80(pending_receiver<DocumentScan> receiver);
  251. // Binds the DownloadController interface, which allows Lacros download
  252. // information to be passed into Ash Chrome.
  253. // Added in M92.
  254. [MinVersion=28] BindDownloadController@33(
  255. pending_receiver<DownloadController> receiver);
  256. // Binds the DriveIntegrationService interface for getting information about
  257. // the local Google Drive mount.
  258. // Added in M93.
  259. [MinVersion=29] BindDriveIntegrationService@34(
  260. pending_receiver<DriveIntegrationService> receiver);
  261. // EchoPrivate is a service used to provide trusted websites a mechanism to
  262. // confirm the device is a ChromeOS device.
  263. [MinVersion=71] BindEchoPrivate@74(
  264. pending_receiver<EchoPrivate> receiver);
  265. // EmojiPicker is a service to allow lacros to open the system emoji picker.
  266. [MinVersion=85] BindEmojiPicker@89(pending_receiver<EmojiPicker> receiver);
  267. // ExtensionInfoPrivate is a service that allows trusted extensions in Lacros
  268. // to get and set system properties. Implemented in Ash.
  269. [MinVersion=72] BindExtensionInfoPrivate@75(
  270. pending_receiver<ExtensionInfoPrivate> receiver);
  271. // NetworkingPrivate is a service that allows users to modify
  272. // network settings in Lacros. Implemented in Ash.
  273. [MinVersion=80] BindNetworkingPrivate@83(
  274. pending_receiver<NetworkingPrivate> receiver);
  275. // Binds the extension publisher service, which allows Lacros to connect its
  276. // extensions to the app service.
  277. // Added in M93.
  278. [MinVersion=70]
  279. BindExtensionPublisher@73(pending_receiver<AppPublisher> receiver);
  280. // Binds the FileManager interface for showing files, folders, etc.
  281. // Added in M88.
  282. [MinVersion=5]
  283. BindFileManager@8(pending_receiver<FileManager> receiver);
  284. // This interface allows Lacros extensions to implement file systems.
  285. // Added in M104.
  286. [MinVersion=78]
  287. BindFileSystemProviderService@81(
  288. pending_receiver<FileSystemProviderService> receiver);
  289. // Binds the ForceInstalledTracker interface for track the status of
  290. // force-installed extensions.
  291. // Added in M96.
  292. [MinVersion=53]
  293. BindForceInstalledTracker@57(
  294. pending_receiver<ForceInstalledTracker> receiver);
  295. // Binds the full screen controller which determines whether to keep or exit
  296. // full screen mode.
  297. [MinVersion=94] BindFullscreenController@98(
  298. pending_receiver<FullscreenController> receiver);
  299. // Binds the GeolocationService interface for getting network access point
  300. // information.
  301. // Added in M95.
  302. [MinVersion=43]
  303. BindGeolocationService@48(pending_receiver<GeolocationService> receiver);
  304. // Binds the holding space service.
  305. // Added in M92.
  306. [MinVersion=27]
  307. BindHoldingSpaceService@32(pending_receiver<HoldingSpaceService> receiver);
  308. // Binds the IdentityManager interface for reading identity information.
  309. // Added in M96.
  310. [MinVersion=51]
  311. BindIdentityManager@55(pending_receiver<IdentityManager> receiver);
  312. // Binds the IdleService interface for reading idle states.
  313. // Added in M90.
  314. [MinVersion=16]
  315. BindIdleService@21(pending_receiver<IdleService> receiver);
  316. // Binds the ImageWriter interface for managing removable storage devices.
  317. // Added in M93.
  318. [MinVersion=37]
  319. BindImageWriter@42(pending_receiver<ImageWriter> receiver);
  320. // Binds the InSessionAuth interface for authenticating users in session
  321. // on ChromeOS
  322. // Added in M106.
  323. [MinVersion=92]
  324. BindInSessionAuth@96(pending_receiver<InSessionAuth> receiver);
  325. // Binds the NetworkSettingsService interface for reading and observing
  326. // network changes.
  327. // Added in M93.
  328. [MinVersion=41]
  329. BindNetworkSettingsService@46(
  330. pending_receiver<NetworkSettingsService> receiver);
  331. // Binds the KeystoreService interface for challenging keys.
  332. // Added in M87.
  333. BindKeystoreService@2(pending_receiver<KeystoreService> receiver);
  334. // Binds the LocalPrinter interface for printing.
  335. // Added in M91.
  336. [MinVersion=25] BindLocalPrinter@30(pending_receiver<LocalPrinter> receiver);
  337. // Binds the login service.
  338. // Added in M99.
  339. [MinVersion=63] BindLogin@67(pending_receiver<Login> receiver);
  340. // Binds the login screen storage service.
  341. [MinVersion=64] BindLoginScreenStorage@68(
  342. pending_receiver<LoginScreenStorage> receiver);
  343. // Binds the login state service.
  344. [MinVersion=57] BindLoginState@61(pending_receiver<LoginState> receiver);
  345. // Binds the machine learning service.
  346. // Added in M90.
  347. [MinVersion=17] BindMachineLearningService@22(
  348. pending_receiver<chromeos.machine_learning.mojom.MachineLearningService> receiver);
  349. // Binds the MessageCenter interface for showing notification messages.
  350. // Added in M86.
  351. BindMessageCenter@3(pending_receiver<MessageCenter> receiver);
  352. // Binds the NativeThemeService interface for reading native theme changes.
  353. // Added in M93.
  354. [MinVersion=33]
  355. BindNativeThemeService@38(pending_receiver<NativeThemeService> receiver);
  356. // Binds the MetricsReporting interface for metrics reporting consent.
  357. // Added in M89.
  358. [MinVersion=8]
  359. BindMetricsReporting@13(pending_receiver<MetricsReporting> receiver);
  360. // Binds the NetworkChange interface for getting network change notification.
  361. [MinVersion=88]
  362. BindNetworkChange@92(pending_receiver<NetworkChange> receiver);
  363. // Binds the networking attributes service which is used by enterprise
  364. // extension APIs to query details about the network.
  365. [MinVersion=39]
  366. BindNetworkingAttributes@44(pending_receiver<NetworkingAttributes> receiver);
  367. // Binds the Policy service to allow Lacros request policy data from Ash when
  368. // needed.
  369. [MinVersion=56] BindPolicyService@60(
  370. pending_receiver<PolicyService> receiver);
  371. // Binds the prefs service which allows get, set, and notify update of prefs.
  372. // Added in M89.
  373. [MinVersion=11] BindPrefs@16(pending_receiver<Prefs> receiver);
  374. // Binds the RemoteAppsLacrosBridge for the Remote Apps private Mojo API.
  375. // Added in M103.
  376. [MinVersion=74] BindRemoteAppsLacrosBridge@77(
  377. pending_receiver<chromeos.remote_apps.mojom.RemoteAppsLacrosBridge>
  378. receiver);
  379. // Binds the Remoting service to allow websites running in Lacros to interact
  380. // with Chrome Remote Desktop functionality available in ash-chrome.
  381. // Added in M93.
  382. [MinVersion=32] BindRemoting@37(pending_receiver<Remoting> receiver);
  383. // Binds the ScreenManager interface for interacting with windows, screens and
  384. // displays.
  385. // Added in M86.
  386. BindScreenManager@1(pending_receiver<ScreenManager> receiver);
  387. // Binds the SelectFile interface for open/save dialogs.
  388. // Added in M86.
  389. BindSelectFile@0(pending_receiver<SelectFile> receiver);
  390. // Binds the SensorHalClient interface for IIO sensors' data.
  391. // Added in M90.
  392. [MinVersion=14]
  393. BindSensorHalClient@19(
  394. pending_remote<chromeos.sensors.mojom.SensorHalClient> receiver);
  395. // Binds the Sharesheet interface.
  396. // Added in M99.
  397. [MinVersion=66]
  398. BindSharesheet@70(
  399. pending_receiver<Sharesheet> receiver);
  400. // Binds the SpeechRecognition interface to access on-device speech
  401. // recognition.
  402. // Added in M104.
  403. [MinVersion=81]
  404. BindSpeechRecognition@84(pending_receiver<SpeechRecognition> receiver);
  405. // Binds the StableVideoDecoderFactory, which allows lacros-chrome to request
  406. // hardware accelerated video decoding. We need to use a
  407. // GenericPendingReceiver to avoid dependency circularities.
  408. // TODO(b/202188196): split StableVideoDecoder API to try to avoid dependency
  409. // issues.
  410. // Added in M96.
  411. [MinVersion=52]
  412. BindStableVideoDecoderFactory@56(
  413. mojo_base.mojom.GenericPendingReceiver receiver);
  414. // Binds the StructuredMetricsService interface to record events.
  415. // Added in M96.
  416. [MinVersion=48]
  417. BindStructuredMetricsService@52(
  418. pending_receiver<StructuredMetricsService> receiver);
  419. // Binds the HidManager interface for support HID devices.
  420. // Added in M87.
  421. BindHidManager@4(pending_receiver<device.mojom.HidManager> receiver);
  422. // Binds the Feedback interface for showing feedback UI.
  423. // Added in M87.
  424. [MinVersion=3] BindFeedback@5(pending_receiver<Feedback> receiver);
  425. // Binds the FieldTrial interface for reading active trial field group.
  426. // Added in M95.
  427. [MinVersion=46]
  428. BindFieldTrialService@51(pending_receiver<FieldTrialService> receiver);
  429. // Binds the Media Session service (controller) for enabling media playback
  430. // control.
  431. // Added in M88.
  432. [MinVersion=6] BindMediaSessionController@9(
  433. pending_receiver<media_session.mojom.MediaControllerManager> receiver);
  434. // Binds the Media Session service (audio focus) for enabling media sessions
  435. // to register with the service so they can be controlled.
  436. // Added in M88.
  437. [MinVersion=6] BindMediaSessionAudioFocus@10(
  438. pending_receiver<media_session.mojom.AudioFocusManager> receiver);
  439. // Binds the Media Session service (audio focus debug) for enabling debugging
  440. // of media playback sessions.
  441. // Added in M88.
  442. [MinVersion=6] BindMediaSessionAudioFocusDebug@11(
  443. pending_receiver<media_session.mojom.AudioFocusManagerDebug> receiver);
  444. // Binds the Power interface for power management.
  445. // Added in M93.
  446. [MinVersion=35] BindPower@40(pending_receiver<Power> receiver);
  447. // Binds the PrintingMetrics interface for chrome.printingMetrics API.
  448. [MinVersion=86] BindPrintingMetrics@90(
  449. pending_receiver<PrintingMetrics> receiver);
  450. // Binds the Resource Manager interface for querying resource status.
  451. // Added in M93.
  452. [MinVersion=36] BindResourceManager@41(
  453. pending_receiver<ResourceManager> receiver);
  454. // Binds the search controller which send queries from ash to lacros.
  455. // Added in M99.
  456. [MinVersion=62] BindSearchControllerRegistry@66(
  457. pending_receiver<SearchControllerRegistry> receiver);
  458. // Binds the Sync Service interface to enable communication between Ash and
  459. // Lacros Sync. Ash Sync Service is not always available (e.g. Sync can be
  460. // disabled via command line flags or after/during profile destruction), in
  461. // this case call fails and caller notified via disconnection of |receiver|.
  462. // Added in M100.
  463. [MinVersion=65] BindSyncService@69(pending_receiver<SyncService> receiver);
  464. // Binds the System Display interface for querying display info.
  465. // Added in M92.
  466. [MinVersion=24] BindSystemDisplay@29(
  467. pending_receiver<SystemDisplay> receiver);
  468. // Binds the Task Manager interface for integrating lacros tasks in ash
  469. // task manager.
  470. // Added in M91.
  471. [MinVersion=19] BindTaskManager@24(pending_receiver<TaskManager> receiver);
  472. // Binds the telemetry probe service to allow Lacros request telemetry data
  473. // from Ash.
  474. // Added in M106.
  475. [MinVersion=93] BindTelemetryProbeService@97(
  476. pending_receiver<crosapi.mojom.TelemetryProbeService> receiver);
  477. // Binds the test controller service, which tests can use to mutate ash. This
  478. // is not available on production devices.
  479. [MinVersion=9] BindTestController@14(
  480. pending_receiver<TestController> receiver);
  481. // Binds the TimeZoneService which notifies system timezone change.
  482. // Added in M99.
  483. [MinVersion=61] BindTimeZoneService@65(
  484. pending_receiver<TimeZoneService> receiver);
  485. // Binds the Tts service which process speech synthesis requests.
  486. [MinVersion=54] BindTts@58(pending_receiver<Tts> receiver);
  487. // Binds the url handler service which allows handling of urls by Ash.
  488. // Added in M90.
  489. [MinVersion=13] BindUrlHandler@18(pending_receiver<UrlHandler> receiver);
  490. // Binds the device factory in video capture service.
  491. // Added in M90.
  492. [MinVersion=20] BindVideoCaptureDeviceFactory@25(
  493. pending_receiver<crosapi.mojom.VideoCaptureDeviceFactory> receiver);
  494. // VirtualKeyboard is a service that allows trusted extensions in Lacros
  495. // to control the virtual keyboard. Implemented in Ash.
  496. [MinVersion=87] BindVirtualKeyboard@91(
  497. pending_receiver<VirtualKeyboard> receiver);
  498. // Binds the vpn extension observer so that lacros can inform ash about
  499. // Vpn extension events.
  500. [MinVersion=75] BindVpnExtensionObserver@78(
  501. pending_receiver<VpnExtensionObserver> receiver);
  502. // Binds the Kiosk session service which sends session status changes from
  503. // lacros to ash.
  504. // Added in M96.
  505. [MinVersion=49] BindKioskSessionService@53(
  506. pending_receiver<KioskSessionService> receiver);
  507. // Binds the chrome app kiosk service. This service is used to install and
  508. // launch the chrome app inside lacros.
  509. [MinVersion=73] BindChromeAppKioskService@76(
  510. pending_receiver<ChromeAppKioskService> receiver);
  511. // Binds the VolumeManager interface for accessing volume list, etc.
  512. // Added in M106.
  513. [MinVersion=90]
  514. BindVolumeManager@94(pending_receiver<VolumeManager> receiver);
  515. // Binds the vpn service. This service is used to facilirate
  516. // communication between chrome.vpnProvider extension in lacros and the
  517. // network services in ash.
  518. [MinVersion=79] BindVpnService@82(
  519. pending_receiver<VpnService> receiver);
  520. // Binds the web page info factory interface which allows ash to request web
  521. // page info from Lacros.
  522. // Added in M93.
  523. [MinVersion=34]
  524. BindWebPageInfoFactory@39(pending_receiver<WebPageInfoFactory> receiver);
  525. // Binds the web app publisher service to allow web app publishing from
  526. // lacros-chrome to the App Service in ash-chrome.
  527. // Added in M92.
  528. [MinVersion=22]
  529. BindWebAppPublisher@27(pending_receiver<AppPublisher> receiver);
  530. // Binds the service to allow web-app-related queries and actions between
  531. // lacros-chrome and ash-chrome. This is a web-app-specific interface,
  532. // independent of the App Service.
  533. // Added in M101.
  534. [MinVersion=69]
  535. BindWebAppService@72(pending_receiver<WebAppService> receiver);
  536. // Binds the service to allow lacros-chrome to set the chromeos wallpaper.
  537. [MinVersion=84] BindWallpaper@87(pending_receiver<Wallpaper> receiver);
  538. // Passes generic browser information such as version, etc into ash in
  539. // |browser_info| during startup.
  540. // Added in M87.
  541. [MinVersion=3] OnBrowserStartup@6(BrowserInfo browser_info);
  542. };
  543. [Stable, Extensible]
  544. enum SessionType {
  545. [Default] kUnknown,
  546. kRegularSession,
  547. kGuestSession,
  548. kPublicSession,
  549. [MinVersion=40] kWebKioskSession,
  550. [MinVersion=41] kChildSession,
  551. [MinVersion=67] kAppKioskSession,
  552. };
  553. // Device mode (e.g. enterprise enrollment state). See policy::DeviceMode.
  554. [Stable, Extensible]
  555. enum DeviceMode {
  556. kUnknown = 0,
  557. // Not yet set.
  558. kNotSet,
  559. // Locally owned as consumer device.
  560. kConsumer,
  561. // Enrolled as an enterprise device.
  562. kEnterprise,
  563. // Joined Active Directory.
  564. kEnterpriseActiveDirectory,
  565. // Retail kiosk device.
  566. kLegacyRetailMode,
  567. // Locally owned as consumer kiosk and can auto-launch a kiosk webapp.
  568. kConsumerKioskAutolaunch,
  569. // Demo mode, either enrolled online or setup in offline demo mode.
  570. kDemo,
  571. };
  572. // Whether or not metrics reporting in ash is managed by policy.
  573. [Stable, Extensible]
  574. enum MetricsReportingManaged {
  575. // Default value for backwards compatibility with old versions of ash.
  576. kUnknown = 0,
  577. kNotManaged = 1,
  578. kManaged = 2,
  579. };
  580. // Default directories on the system. We send the full path for each value for
  581. // future compatibility, to avoid assumptions about where on disk the directory
  582. // is located.
  583. //
  584. // Next version: 35
  585. // Next id: 11
  586. [Stable]
  587. struct DefaultPaths {
  588. // The default (non-configurable) directory for documents. For example,
  589. // /home/chronos/u-<hash>/MyFiles.
  590. mojo_base.mojom.FilePath documents@0;
  591. // The default (non-configurable) directory for downloads. For example,
  592. // /home/chronos/u-<hash>/MyFiles/Downloads.
  593. mojo_base.mojom.FilePath downloads@1;
  594. // The (non-configurable) path of the mount point for drive in ChromeOS. For
  595. // example, /media/fuse/drivefs-<hash>.
  596. [MinVersion=23] mojo_base.mojom.FilePath? drivefs@2;
  597. // The (non-configurable) path of the software user NSS database. For
  598. // example, /home/chronos/u-<hash>/.pki/nssdb.
  599. [MinVersion=30] mojo_base.mojom.FilePath? user_nss_database@3;
  600. // The (non-configurable) path at which removable media is mounted. For
  601. // example, /media/removable.
  602. [MinVersion=31] mojo_base.mojom.FilePath? removable_media@4;
  603. // The (non-configurable) path at which ARC's storage is located (shown as
  604. // "Play Files" in Files app). For example, /run/arc/sdcard/write/emulated/0.
  605. [MinVersion=31] mojo_base.mojom.FilePath? android_files@5;
  606. // The (non-configurable) path at which Crostini's home directory is
  607. // mounted. For example, /media/fuse/crostini_<hash>_termina_penguin.
  608. [MinVersion=31] mojo_base.mojom.FilePath? linux_files@6;
  609. // The (non-configurable) directory for ash resources. For example,
  610. // /opt/google/chrome.
  611. [MinVersion=32] mojo_base.mojom.FilePath? ash_resources@7;
  612. // The default (non-configurable) directory for shared files. For example,
  613. // /home/chronos/u-<hash>/ShareCache.
  614. [MinVersion=33] mojo_base.mojom.FilePath? share_cache@8;
  615. // The directory where default web app configs are stored.
  616. [MinVersion=34] mojo_base.mojom.FilePath? preinstalled_web_app_config@9;
  617. // The directory where additional web app configs are stored.
  618. [MinVersion=34] mojo_base.mojom.FilePath?
  619. preinstalled_web_app_extra_config@10;
  620. };
  621. // The device specific data needed in Lacros.
  622. // Next version: 4
  623. // Next id: 9
  624. [Stable]
  625. struct DeviceProperties {
  626. // The value of device DM token. It is the raw data from the policy, not
  627. // encrypted.
  628. string device_dm_token@0;
  629. // The value of the device affiliation IDs, which represent which customer is
  630. // managing the device so that the user's affiliation to the device can be
  631. // determined. It is non-encrypted data corresponding to
  632. // PolicyData::device_affiliation_ids.
  633. [MinVersion=1] array<string>? device_affiliation_ids@1;
  634. // Whether ARC is installed and the current device is officially supported to
  635. // run ARC.
  636. [MinVersion=2] bool is_arc_available@2;
  637. // Whether the device is of tablet form factor.
  638. [MinVersion=2] bool is_tablet_form_factor@3;
  639. // The value of the device identifier of the directory API that is
  640. // generated by the server and identifies the cloud record of the device for
  641. // querying in the cloud directory API. See
  642. // https://developers.google.com/admin-sdk/directory/v1/guides/manage-chrome-devices.
  643. [MinVersion=3] string? directory_device_id@4;
  644. // The device's serial number.
  645. [MinVersion=3] string? serial_number@5;
  646. // The administrator-annotated Asset Id.
  647. [MinVersion=3] string? annotated_asset_id@6;
  648. // The administrator-annotated location.
  649. [MinVersion=3] string? annotated_location@7;
  650. // The device's hostname as set by DeviceHostnameTemplate policy.
  651. [MinVersion=3] string? hostname@8;
  652. };
  653. [Stable, Extensible]
  654. enum ExoImeSupport {
  655. kUnsupported = 0,
  656. // To work with the client IME implementation, exo has short term workaround
  657. // to filter some wayland key/keysym events by using ConsumedByIme().
  658. // Note that this is an approach consistent with ARC's behavior.
  659. kConsumedByImeWorkaround = 1,
  660. // Exo sends keysym events to a client using a separate API.
  661. // Once the client (lacros-chrome) gets ready to handle wl_keyboard::key and
  662. // zwp_text_input_v1::keysym properly in separate paths, exo can send each
  663. // each event without the ConsumedByIme() workaround above and tell the client
  664. // that it dropped the workaround using kSupported flag.
  665. [MinVersion=1] kSupported = 2,
  666. };
  667. // Which windows and tabs to show, if any, when first launching lacros.
  668. // This values overrides the built-in chrome preference, with the exception of
  669. // kUseStartupPreference.
  670. [Stable, Extensible]
  671. enum InitialBrowserAction {
  672. // Uses the Lacros preference SessionStartupPref.
  673. [Default] kUseStartupPreference = 0,
  674. // TODO(hidehiko): This should be kOpenNTPIncognitoWindow
  675. kOpenIncognitoWindow = 1,
  676. // TODO(hidehiko): This should be kRestoreLastTab.
  677. kRestoreLastSession = 2,
  678. // Lacros will launch but will not show any windows. It will continue running
  679. // in the background until a browser window is shown. At that point it will no
  680. // longer run in the background and will close when all windows are closed.
  681. [MinVersion=1] kDoNotOpenWindow = 3,
  682. // Opens a new window with a new tab, regardless of users' preference.
  683. [MinVersion=2] kOpenNewTabPageWindow = 4,
  684. // Opens a new window with specified URLs with the primary profile.
  685. // The URLs should be set with BrowserInitParams::startup_urls.
  686. // Added in M96.
  687. [MinVersion=3] kOpenWindowWithUrls = 5,
  688. // Opens a new Guest mode window.
  689. // Added in M100.
  690. [MinVersion=4] kOpenGuestWindow = 6,
  691. };
  692. // Whether / how mlservice on-device handwriting is supported.
  693. [Stable, Extensible]
  694. enum OndeviceHandwritingSupport {
  695. kUnsupported = 0,
  696. kUseRootfs = 1,
  697. kUseDlc = 2,
  698. };
  699. // Corresponds to BUILDFLAGs we use in ash-chrome that we want to propagate to
  700. // Lacros Chrome. On the Lacros side we turn this into command line switches.
  701. [Stable, Extensible]
  702. enum BuildFlag {
  703. [Default] kUnknown = 0,
  704. kUseChromeosProtectedMedia = 1,
  705. kEnablePlatformEncryptedHevc = 2,
  706. kEnablePlatformHevc = 3,
  707. [MinVersion=47] kUseChromeosProtectedAv1 = 4,
  708. };
  709. // Indicates whether a browser window is created successfully or not.
  710. [Stable, Extensible]
  711. enum CreationResult {
  712. kUnknown = 0,
  713. kSuccess = 1,
  714. kUnsupported = 2,
  715. kBrowserNotRunning = 3,
  716. kServiceDisconnected = 4,
  717. [MinVersion=1] kProfileNotExist = 5,
  718. [MinVersion=1] kBrowserWindowUnavailable = 6,
  719. };
  720. // Represents the source of this OpenUrl request.
  721. [Stable, Extensible]
  722. enum OpenUrlFrom {
  723. // From is not specified or unknown.
  724. [Default] kUnspecified = 0,
  725. // ARC app made a request of this OpenUrl.
  726. kArc = 1,
  727. };
  728. // BrowserInitParams is a set of parameters for initialization of browsers
  729. // (such as lacros-chrome), which is passed from ash-chrome to a browser.
  730. // Since ash-chrome and browsers may have different versions, the browsers must
  731. // handle this struct carefully.
  732. //
  733. // If ash-chrome is older than the browser, then some fields may not be
  734. // present in the serialized IPC message. This manifests as the newer (missing)
  735. // fields taking on default values in the browser. This means that the default
  736. // value for each field must always be interpreted to mean:
  737. // this field was not sent because ash-chrome was too old. If the default value
  738. // needs to have a different meaning, then we must also add a bool field
  739. // describing the validity of this field. Mojo currently does not support
  740. // optional primitives.
  741. //
  742. // If ash-chrome is newer than the browser, then some fields may not be
  743. // processed by the browser.
  744. //
  745. // IMPORTANT NOTE: These parameters are accessed via the BrowserParamsProxy
  746. // wrapper class. Please update the methods of that class when adding new
  747. // parameters here. If a new parameter is added and its value is only known after
  748. // the user has logged in, please update BrowserPostLoginParams as well.
  749. //
  750. // Next version: 53
  751. // Next id: 53
  752. [Stable, RenamedFrom="crosapi.mojom.LacrosInitParams"]
  753. struct BrowserInitParams {
  754. // This is ash-chrome's version of the Crosapi interface. This is used by
  755. // lacros-chrome to determine which interface methods are safe to call.
  756. [MinVersion=1]
  757. uint32 crosapi_version@0;
  758. // Deprecated in M88. |ash_metrics_enabled| always has a value.
  759. [MinVersion=2]
  760. bool deprecated_ash_metrics_enabled_has_value@1;
  761. // Whether metrics are enabled in ash-chrome. On browser first run we inherit
  762. // metrics consent from ash, because on Chrome OS metrics consent is chosen
  763. // during the out-of-box experience. After first run the browser handles
  764. // metrics consent via settings.
  765. [MinVersion=2]
  766. bool ash_metrics_enabled@2;
  767. // Type of the ash-chrome session at the browser startup time.
  768. [MinVersion=3]
  769. SessionType session_type@3;
  770. // Device mode at browser startup time. If the browser is running during the
  771. // out-of-box experience, the device mode might change later (e.g. if the
  772. // user chooses to enroll the device).
  773. [MinVersion=4]
  774. DeviceMode device_mode@4;
  775. // Ash sends all known crosapi interfaces and their versions at startup so
  776. // that a browser can synchronously query version info. Interfaces are
  777. // identified by a UUID, which is manually generated and assigned via the
  778. // UUID mojom qualifier.
  779. // Added in M88.
  780. [MinVersion=5]
  781. map<mojo_base.mojom.Token, uint32>? interface_versions@5;
  782. // Default directories on the system.
  783. // Added in M89.
  784. [MinVersion=6]
  785. DefaultPaths? default_paths@6;
  786. // Device Account's obfuscated Gaia id, if present.
  787. // This is null for older versions of ash, for Active Directory sessions,
  788. // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  789. // Added in M89.
  790. // Deprecated in M91. Use `device_account` (field id 16) instead.
  791. // TODO(crbug.com/1195865): Remove this in M93.
  792. [MinVersion=7]
  793. string? device_account_gaia_id@7;
  794. // Whether or not metrics reporting in ash is managed by policy. This is
  795. // passed independently because the metrics reporting state is controlled by
  796. // ash-level device policy, but we want to show the "managed" icon in the
  797. // browser preferences UI as if it was controlled by user policy.
  798. // Added in M89.
  799. [MinVersion=8]
  800. MetricsReportingManaged ash_metrics_managed@8;
  801. // How exo supports IME on the wayland client (such as Lacros-chrome).
  802. // The client can control IME handling depending on the ash-chrome's support
  803. // status via this flag.
  804. [MinVersion=9]
  805. ExoImeSupport exo_ime_support@9;
  806. // Primary user ID hash. Used to set CROS_USER_ID_HASH env var in crosh.
  807. // Do not use this to construct paths, use DefaultPaths for that purpose.
  808. [MinVersion=10]
  809. string? cros_user_id_hash@10;
  810. // Policy blob of the device account. If present, it's a managed account with
  811. // policy data. If empty, it's unmanaged account. If absent, an error occurred
  812. // while loading policy data. The format is serialized PolicyFetchResponse
  813. // object. See components/policy/proto/device_management_backend.proto for
  814. // details.
  815. [MinVersion=11]
  816. array<uint8>? device_account_policy@11;
  817. // Timestamp (seconds since epoch in UTC) at which last device account policy
  818. // fetch was attempted.
  819. [MinVersion=42]
  820. uint64 last_policy_fetch_attempt_timestamp@42;
  821. // System idle info to initialize SystemIdleCache.
  822. [MinVersion=12]
  823. IdleInfo? idle_info@12;
  824. [MinVersion=13]
  825. bool REMOVED_13@13;
  826. [MinVersion=14]
  827. bool REMOVED_14@14;
  828. // Defines which windows or tabs to restore on launch.
  829. [MinVersion=15]
  830. InitialBrowserAction initial_browser_action@15;
  831. // The account used to sign into Chrome OS. This may be a Gaia account or a
  832. // Microsoft Active Directory account. This field will be null for
  833. // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  834. // Note that this is different from the concept of a Primary Account in the
  835. // browser. A user may not be signed into a Lacros browser Profile, or may be
  836. // signed into a browser Profile with an account which is different from the
  837. // account which they used to sign into the device - aka Device Account.
  838. // Note: Do NOT use the email id of an account as an identifier. Use
  839. // `AccountKey` - which has the necessary and sufficient information to
  840. // identify an account.
  841. // Added in M91.
  842. [MinVersion=16]
  843. Account? device_account@16;
  844. // Whether the lacros web apps is enabled in ash-chrome. When this flag is on
  845. // the ash-chrome will interact with web apps publishing from lacros-chrome
  846. // instead of ash-chrome.
  847. // Added in M92.
  848. [MinVersion=17]
  849. bool web_apps_enabled@17;
  850. [MinVersion=18]
  851. bool REMOVED_18@18;
  852. // When this flag is |true|, Lacros is the primary browser and Ash is the
  853. // secondary backup.
  854. // When this flag is |false|, Lacros is a secondary browser.
  855. // This flag should be deprecated before a full launch of Lacros, as it relies
  856. // on the assumption that Ash is always available as a browser.
  857. [MinVersion=19]
  858. bool standalone_browser_is_primary@19;
  859. [MinVersion=20]
  860. NativeThemeInfo? native_theme_info@20;
  861. // The set of static device specific data.
  862. [MinVersion=21]
  863. DeviceProperties? device_properties@21;
  864. [MinVersion=22]
  865. // Whether (and how) on-device handwriting recognition is supported, depending
  866. // ash-chrome's startup switches.
  867. OndeviceHandwritingSupport ondevice_handwriting_support@22;
  868. [MinVersion=23]
  869. // Build flags from ash-chrome that we turn into command line switches to
  870. // enforce at run-time in lacros-chrome.
  871. array<BuildFlag>? build_flags@23;
  872. // Specifies what requests the startup_urls.
  873. // This can be effective only when startup_urls is specified.
  874. // Added in M100.
  875. [MinVersion=36]
  876. OpenUrlFrom startup_urls_from@36;
  877. // URLs to be opened at the beginning. This works only when
  878. // initial_browser_action == OpenWindowWithUrls.
  879. // Added in M96.
  880. [MinVersion=24]
  881. array<url.mojom.Url>? startup_urls@24;
  882. // The set of device settings for Lacros. Lacros should *NOT* use this data,
  883. // but rely on DeviceSettingsLacros::GetDeviceSettings instead.
  884. [MinVersion=25]
  885. DeviceSettings? device_settings@25;
  886. // Metrics service client id of ash chrome.
  887. // Lacros needs to use the same client id as ash chrome.
  888. [MinVersion=26]
  889. string? metrics_service_client_id@26;
  890. // UKM client id of ash chrome.
  891. // Lacros needs to use the same client id as ash chrome.
  892. [MinVersion=38]
  893. uint64 ukm_client_id@38;
  894. // When this flag is |true|, Lacros is the only browser.
  895. [MinVersion=27]
  896. bool standalone_browser_is_only_browser@27;
  897. // When this flag is set, lacros will publish chrome apps to the app service.
  898. [MinVersion=28]
  899. bool publish_chrome_apps@28;
  900. // When this flag is set, lacros will publish hosted apps to the app service.
  901. [MinVersion=39]
  902. bool publish_hosted_apps@39;
  903. [Stable, Extensible]
  904. enum InitialKeepAlive {
  905. // ash-chrome is too old so the keep-alive settings in ash-chrome is not
  906. // available.
  907. [Default] kUnknown,
  908. // On the browser launching, keep-alive is disabled so lacros-chrome
  909. // process can be terminated at browser's preferred timing.
  910. kDisabled,
  911. // On the browser launching, keep-alive is enabled so lacros-chrome process
  912. // is expected to be kept, specifically, e.g. even if all windows are
  913. // closed.
  914. kEnabled,
  915. };
  916. // Initial keep-alive value. If ash-chrome is too old (M96 or earlier)
  917. // the default value kUnknown should be set.
  918. // This is initial value, and so the value can be updated later via
  919. // BrowserService::UpdateKeepAlive().
  920. [MinVersion=29]
  921. InitialKeepAlive initial_keep_alive@29;
  922. // Whether the ash::switches::kUnfilteredBluetoothDevices command line switch
  923. // is present for Ash.
  924. [MinVersion=31]
  925. bool is_unfiltered_bluetooth_device_enabled@30;
  926. // Ash publishes the list of capabilities it has implemented to Lacros so
  927. // that Lacros can dynamically change its behavior. This should typically take
  928. // the format of a bug identifier, e.g. "crbug/123" or "b/456". This is
  929. // primarily necessary for backporting behavior changes and fixes to older
  930. // branches. If applicable, when adding a new capability, please indicate with
  931. // a comment when we can stop publishing the capability -- e.g. once Ash and
  932. // Lacros are both past M100, then we can remove this capability.
  933. [MinVersion=32]
  934. array<string>? ash_capabilities@31;
  935. // Internal chrome:// URLs which can be handled by Ash. These are sent from
  936. // Ash to Lacros at startup so Lacros knows which URLs are OK to forward.
  937. // Added in M97.
  938. [MinVersion=33]
  939. array<url.mojom.Url>? accepted_internal_ash_urls@32;
  940. // Whether incognito profile integration is enabled with the feature that aims
  941. // to reduce context switching by enabling users to collect content and
  942. // transfer or access it later.
  943. // See `ash::features::IsHoldingSpaceIncognitoProfileIntegrationEnabled()`.
  944. [MinVersion=34]
  945. bool is_holding_space_incognito_profile_integration_enabled@33;
  946. // Whether in-progress downloads notification suppression is enabled with the
  947. // feature that aims to reduce context switching by enabling users to collect
  948. // content and transfer or access it later.
  949. // See `ash::features::IsHoldingSpaceInProgressDownloadsNotificationSuppressionEnabled()`.
  950. [MinVersion=34]
  951. bool is_holding_space_in_progress_downloads_notification_suppression_enabled@34;
  952. // Whether the device is either enterprise managed or in demo mode.
  953. [MinVersion=35]
  954. bool is_device_enterprised_managed@35;
  955. [Stable, Extensible]
  956. enum DeviceType {
  957. [Default] kUnknown,
  958. kChromebook,
  959. kChromebase,
  960. kChromebit,
  961. kChromebox,
  962. };
  963. // The form factor of the device.
  964. [MinVersion=37]
  965. DeviceType device_type@37;
  966. // Whether on-device speech recognition is supported on the platform.
  967. // Forwarded from ash flag OnDeviceSpeechRecognition.
  968. [MinVersion=40]
  969. bool is_ondevice_speech_supported@40;
  970. // Policy blob of the extension policy for the device account. The values of
  971. // the map are serialized PolicyFetchResponse proto messages from
  972. // components/policy/proto/device_management_backend.proto.
  973. [MinVersion=41]
  974. map<crosapi.mojom.PolicyNamespace, array<uint8>>? REMOVED_41@41;
  975. // Component (i.e. chrome extensions) policy for the device account.
  976. // Maps `PolicyNamespace` representing an extension to the JSON policy
  977. // value for that extension.
  978. [MinVersion=43]
  979. map<crosapi.mojom.PolicyNamespace, mojo_base.mojom.Value>? device_account_component_policy@43;
  980. // Ash-chrome versioning information
  981. // Example: 105.0.5124.0
  982. [MinVersion=44]
  983. string? ash_chrome_version@44;
  984. // Tells lacros whether ash uses CUPS (Common Unix Printing System) for
  985. // printing. This corresponds to the USE_CUPS flag being enabled in ash.
  986. [MinVersion=45]
  987. bool use_cups_for_printing@45;
  988. // Tells lacros whether ash uses floss for bluetooth.
  989. [MinVersion=46]
  990. bool use_floss_bluetooth@46;
  991. // Tells lacros whether the currently logged in user is the device owner.
  992. [MinVersion=47]
  993. bool is_current_user_device_owner@47;
  994. // When this is set to true, Lacros will not mux extension app ids. The
  995. // original reason for muxing was to avoid collision between lacros and ash
  996. // apps with the same id. This is no longer possible with the extension keep
  997. // list feature. This parameter is structured so that if ash is too old to
  998. // support this feature, the default value of false maintains pre-existing
  999. // behavior.
  1000. [MinVersion=48]
  1001. bool do_not_mux_extension_app_ids@48;
  1002. // When this flag is set to true, Lacros tts support feature will be enabled.
  1003. [MinVersion=49]
  1004. bool enable_lacros_tts_support@49;
  1005. [Stable, Extensible]
  1006. enum LacrosSelection {
  1007. [Default] kUnspecified,
  1008. // Instance residing in the rootfs partition.
  1009. kRootfs,
  1010. // Instance residing in the stateful partition.
  1011. kStateful,
  1012. };
  1013. // The partition from which the lacros instance has been launched, which is
  1014. // either rootfs or stateful.
  1015. [MinVersion=50]
  1016. LacrosSelection lacros_selection@50;
  1017. // When this flag is set to true, Lacros float window support including the
  1018. // multitask menu will be enabled.
  1019. [MinVersion=51]
  1020. bool enable_float_window@51;
  1021. // True if this is a device with cloud gaming features enabled.
  1022. [MinVersion=52]
  1023. bool is_cloud_gaming_device@52;
  1024. };
  1025. // BrowserPostLoginParams is the subset of parameters in BrowserInitParams
  1026. // that is only known after the user has successfully logged in.
  1027. //
  1028. // When lacros-chrome is pre-launched at login screen, the subset of
  1029. // BrowserInitParams which is already available is by ash-chrome at
  1030. // that time. The rest is passed after login via this structure.
  1031. //
  1032. // Next version: 1
  1033. // Next id: 19
  1034. [Stable]
  1035. struct BrowserPostLoginParams {
  1036. // Type of the ash-chrome session at the browser startup time.
  1037. SessionType session_type@0;
  1038. // Default directories on the system.
  1039. // Added in M89.
  1040. DefaultPaths? default_paths@1;
  1041. // Device Account's obfuscated Gaia id, if present.
  1042. // This is null for older versions of ash, for Active Directory sessions,
  1043. // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  1044. // Added in M89.
  1045. // Deprecated in M91. Use `device_account` (field id 16) instead.
  1046. // TODO(crbug.com/1195865): Remove this in M93.
  1047. string? device_account_gaia_id@2;
  1048. // Primary user ID hash. Used to set CROS_USER_ID_HASH env var in crosh.
  1049. // Do not use this to construct paths, use DefaultPaths for that purpose.
  1050. string? cros_user_id_hash@3;
  1051. // Policy blob of the device account. If present, it's a managed account with
  1052. // policy data. If empty, it's unmanaged account. If absent, an error occurred
  1053. // while loading policy data. The format is serialized PolicyFetchResponse
  1054. // object. See components/policy/proto/device_management_backend.proto for
  1055. // details.
  1056. array<uint8>? device_account_policy@4;
  1057. // Timestamp (seconds since epoch in UTC) at which last device account policy
  1058. // fetch was attempted.
  1059. uint64 last_policy_fetch_attempt_timestamp@5;
  1060. // Defines which windows or tabs to restore on launch.
  1061. InitialBrowserAction initial_browser_action@6;
  1062. // The account used to sign into Chrome OS. This may be a Gaia account or a
  1063. // Microsoft Active Directory account. This field will be null for
  1064. // Guest sessions, Managed Guest sessions, Demo mode, and Kiosks.
  1065. // Note that this is different from the concept of a Primary Account in the
  1066. // browser. A user may not be signed into a Lacros browser Profile, or may be
  1067. // signed into a browser Profile with an account which is different from the
  1068. // account which they used to sign into the device - aka Device Account.
  1069. // Note: Do NOT use the email id of an account as an identifier. Use
  1070. // `AccountKey` - which has the necessary and sufficient information to
  1071. // identify an account.
  1072. // Added in M91.
  1073. Account? device_account@7;
  1074. // Whether the lacros web apps is enabled in ash-chrome. When this flag is on
  1075. // the ash-chrome will interact with web apps publishing from lacros-chrome
  1076. // instead of ash-chrome.
  1077. // Added in M92.
  1078. bool web_apps_enabled@8;
  1079. // When this flag is |true|, Lacros is the primary browser and Ash is the
  1080. // secondary backup.
  1081. // When this flag is |false|, Lacros is a secondary browser.
  1082. // This flag should be deprecated before a full launch of Lacros, as it relies
  1083. // on the assumption that Ash is always available as a browser.
  1084. bool standalone_browser_is_primary@9;
  1085. // Specifies what requests the startup_urls.
  1086. // This can be effective only when startup_urls is specified.
  1087. // Added in M100.
  1088. OpenUrlFrom startup_urls_from@10;
  1089. // URLs to be opened at the beginning. This works only when
  1090. // initial_browser_action == OpenWindowWithUrls.
  1091. // Added in M96.
  1092. array<url.mojom.Url>? startup_urls@11;
  1093. // When this flag is |true|, Lacros is the only browser.
  1094. bool standalone_browser_is_only_browser@12;
  1095. // When this flag is set, lacros will publish chrome apps to the app service.
  1096. bool publish_chrome_apps@13;
  1097. // When this flag is set, lacros will publish hosted apps to the app service.
  1098. bool publish_hosted_apps@14;
  1099. // Component (i.e. chrome extensions) policy for the device account.
  1100. // Maps `PolicyNamespace` representing an extension to the JSON policy
  1101. // value for that extension.
  1102. map<crosapi.mojom.PolicyNamespace, mojo_base.mojom.Value>? device_account_component_policy@15;
  1103. // Tells lacros whether the currently logged in user is the device owner.
  1104. bool is_current_user_device_owner@16;
  1105. // When this is set to true, Lacros will not mux extension app ids. The
  1106. // original reason for muxing was to avoid collision between lacros and ash
  1107. // apps with the same id. This is no longer possible with the extension keep
  1108. // list feature. This parameter is structured so that if ash is too old to
  1109. // support this feature, the default value of false maintains pre-existing
  1110. // behavior.
  1111. bool do_not_mux_extension_app_ids@17;
  1112. // When this flag is set to true, Lacros tts support feature will be enabled.
  1113. bool enable_lacros_tts_support@18;
  1114. };
  1115. // Parameters to specify OpenUrl behavior.
  1116. [Stable]
  1117. struct OpenUrlParams {
  1118. // Decides the disposition of the opening page.
  1119. [Stable, Extensible]
  1120. enum WindowOpenDisposition {
  1121. // DEPRECATED. OpenUrl used to check the URL to decide the disposition
  1122. // of the page. This is kept just for the compatibility. New callers
  1123. // should not use this value.
  1124. [Default] kLegacyAutoDetection = 0,
  1125. // Opens the given URL in a new tab.
  1126. kNewForegroundTab = 1,
  1127. // If there's an existing tab showing the given URL, activate it.
  1128. // If not, if the tab is NTP and does not have history, navigate it
  1129. // to the given URL. Otherwise, opens a new tab and navigate it to
  1130. // the given URL.
  1131. kSwitchToTab = 2,
  1132. // Opens the given URL in a new window.
  1133. [MinVersion=1] kNewWindow = 3,
  1134. };
  1135. WindowOpenDisposition disposition@0;
  1136. [MinVersion=1] OpenUrlFrom from@1;
  1137. // Decides how the URL's path is to be considered when WindowOpenDisposition
  1138. // is kSwitchToTab, i.e. a search is performed for an existing tab that
  1139. // matches a given URL.
  1140. [Stable, Extensible]
  1141. enum SwitchToTabPathBehavior {
  1142. // If the two paths are different, the URLs do not match.
  1143. [Default] kRespect = 0,
  1144. // Path is ignored when testing two URLs for a match.
  1145. kIgnore = 1,
  1146. };
  1147. [MinVersion=2] SwitchToTabPathBehavior path_behavior@2;
  1148. };
  1149. // BrowserService defines the APIs that live in a browser (such as
  1150. // lacros-chrome) and are accessed from ash-chrome.
  1151. // IMPORTANT NOTE: If you are exposing a new capability from Lacros to Ash,
  1152. // create a new mojom file. See automation.mojom for an example. This interface
  1153. // has accidentally become a kitchen sink for different features. This was not
  1154. // intentional.
  1155. //
  1156. // Next MinVersion: 70.
  1157. // Next ID: 19
  1158. //
  1159. [Stable, Uuid="4e04dc16-b34c-40fd-9e3f-3c55c2c6cf91",
  1160. RenamedFrom="crosapi.mojom.LacrosChromeService"]
  1161. interface BrowserService {
  1162. // Removed method. No longer used.
  1163. REMOVED_0@0() => (pending_receiver<Crosapi> receiver);
  1164. REMOVED_2@2(BrowserInitParams params);
  1165. // Opens a new window in the browser with, currently, the last used profile.
  1166. // The callback is called on the command execution.
  1167. // If `should_trigger_session_restore` is true, a new window opening should be
  1168. // treated like the start of a new session (with potential session restore,
  1169. // startup URLs, etc). Otherwise, don't restore the session and instead open a
  1170. // new window with the default blank tab.
  1171. NewWindow@1(
  1172. [MinVersion=10] bool incognito,
  1173. [MinVersion=61] bool should_trigger_session_restore) => ();
  1174. // Opens a new fullscreen window in the browser with, currently, the last
  1175. // used profile. The only tab will be navigated to the given `url` once the
  1176. // window is launched. The callback is called on the command execution.
  1177. // NOTE: This method is used by Chrome OS web Kiosk session only. The behavior
  1178. // may change and it shouldn't be used by anybody else.
  1179. // Added in M96.
  1180. [MinVersion=11]
  1181. NewFullscreenWindow@9(url.mojom.Url url) => (CreationResult result);
  1182. // Opens a new window in the browser and transfers the given tab (or group)
  1183. // to it.
  1184. // NOTE: This method is used by Chrome OS WebUI in tablet mode as a response
  1185. // to a drag'n drop operation from the user.
  1186. [MinVersion=13]
  1187. NewWindowForDetachingTab@11(
  1188. mojo_base.mojom.String16 tab_id, mojo_base.mojom.String16 group_id)
  1189. => (CreationResult result, string app_id);
  1190. // Opens a new window in the browser with the Guest profile if the Guest mode
  1191. // is enabled.
  1192. // Added in M100.
  1193. [MinVersion=63]
  1194. NewGuestWindow@14() => ();
  1195. // Opens a new tab in the browser with, currently, the last used profile.
  1196. // This may open a new window, if there's no window. If a new browser is
  1197. // opened and `should_trigger_session_restore` is set, the new browser will
  1198. // open with the profile's session startup pref. If this is not set the
  1199. // browser will open without considering the user's session startup pref.
  1200. // Please see also the Chrome's NewTab command for details.
  1201. // The callback is called on the command execution.
  1202. // This is designed to be equivalent of CTRL+T behavior. By default, this
  1203. // opens a new-tab-page, but extensions may override the behavior.
  1204. // Added in M91.
  1205. [MinVersion=10]
  1206. NewTab@7([MinVersion=68] bool should_trigger_session_restore) => ();
  1207. // Opens the specified URL in the browser. This opens a new tab and loads
  1208. // the page at specified URL.
  1209. // This is designed to handle opening URL requests from other OS parts,
  1210. // such as web-page opening request from ash features, or Crostini/ARC apps.
  1211. // Added in M96.
  1212. [MinVersion=12]
  1213. OpenUrl@10(url.mojom.Url url,
  1214. [MinVersion=62] OpenUrlParams? params) => ();
  1215. // Restores a tab (or a window) recently closed in the browser with,
  1216. // currently, the last used profile. Please see also RestoreTab command
  1217. // for details.
  1218. // The callback is called on the command execution.
  1219. // Added in M91.
  1220. [MinVersion=10]
  1221. RestoreTab@8() => ();
  1222. // Signals Lacros that a multi-finger horizontal swipe has occurred in Ash.
  1223. // The browser usually responds by switching tabs
  1224. //
  1225. // |x_offset| is in DIP coordinates.
  1226. [MinVersion=15]
  1227. HandleTabScrubbing@13(float x_offset);
  1228. // Returns the browser's feedback data used for generating feedback report in
  1229. // a dictionary object, each entry representing a log entry in the feedback
  1230. // report, for example, "Lacros crash_report_ids: xxx",
  1231. // "Lacros extensions: xxx", "Lacros mem_usage: xxx", etc.
  1232. [MinVersion=6]
  1233. GetFeedbackData@3() => (
  1234. mojo_base.mojom.DeprecatedDictionaryValue feedback_info);
  1235. // Returns the browser histograms used for generating feedback report.
  1236. // The histograms returned is zip compressed and is typically around 100KB.
  1237. [MinVersion=7]
  1238. GetHistograms@4() => (mojo_base.mojom.BigString compressed_histograms);
  1239. // Returns Url of the active tab from the browser if there is any.
  1240. [MinVersion=8]
  1241. GetActiveTabUrl@5() => (url.mojom.Url? url);
  1242. // Notifies Lacros to update the policy data from the device account with the
  1243. // new data from input. The data is serialized blob of PolicyFetchResponse
  1244. // object.
  1245. [MinVersion=9]
  1246. UpdateDeviceAccountPolicy@6(array<uint8> policy);
  1247. // Notifies Lacros about an attempt to update device account policy.
  1248. [MinVersion=66]
  1249. NotifyPolicyFetchAttempt@17();
  1250. // Updates keep-alive instance to maintain the browser lifetime.
  1251. // Note: there is always timing issue. If the browser is in the process of
  1252. // termination, this may not work. To fully implement keep-alive, ash-chrome
  1253. // may need to relaunch Lacros soon after the termination.
  1254. // Introduced in M97.
  1255. [MinVersion=14]
  1256. UpdateKeepAlive@12(bool enabled);
  1257. // Opens lacros with a full restore (all previously open windows from the
  1258. // previous lacros session). This must be called before a browser has been
  1259. // created as this will update the state of the last opened profiles.
  1260. // If `skip_crash_restore` is true full restore will restore the previous
  1261. // session, bypassing the typical crash restore flow (i.e. the crash restore
  1262. // bubble anchored to the browser's app menu button).
  1263. [MinVersion=64]
  1264. OpenForFullRestore@15([MinVersion=69] bool skip_crash_restore);
  1265. // The old UpdateComponentPolicy method.
  1266. [MinVersion=67]
  1267. REMOVED_16@16(map<crosapi.mojom.PolicyNamespace, array<uint8>> policy);
  1268. // Notifies Lacros to update the component policy data. The values of the map
  1269. // are JSON policy data downloaded by Ash. The `component_policy` argument
  1270. // maps `PolicyNamespace` representing an extension to the JSON policy value
  1271. // for that extension.
  1272. [MinVersion=67]
  1273. UpdateComponentPolicy@18(map<crosapi.mojom.PolicyNamespace, mojo_base.mojom.Value> component_policy);
  1274. };
  1275. // TODO(crbug.com/1180712): move to its own file. Currently due to circular
  1276. // dependency BrowserServiceHost -> BrowserService -> Crosapi, we cannot
  1277. // split files.
  1278. // This interface is used to register BrowserService provided by a
  1279. // crosapi client.
  1280. //
  1281. // Next MinVersion: 2.
  1282. // Next ID: 2
  1283. //
  1284. [Stable, Uuid="7864a7d6-c74d-4e5f-8589-8cdb99d0c92e"]
  1285. interface BrowserServiceHost {
  1286. // Registers the remote as a BrowserService. Crosapi host (ash-chrome)
  1287. // can make requests to control the registered browser.
  1288. AddBrowserService@0(pending_remote<BrowserService> browser);
  1289. // Requests to relaunch the browser again, soon after its shutdown.
  1290. // The browser is expected to be terminated sometime soon by itself,
  1291. // i.e., Crosapi host (ash-chrome) will not forcibly kill the process.
  1292. // It is important to terminate soon, because otherwise the users may be
  1293. // surprised of unexpected relaunching on later termination.
  1294. // If there's multiple requests before termination, they'll be degenerated
  1295. // into one relaunching.
  1296. // Added in M93.
  1297. [MinVersion=1]
  1298. RequestRelaunch@1();
  1299. };