diff options
Diffstat (limited to 'chromium/components/arc/mojom')
48 files changed, 394 insertions, 195 deletions
diff --git a/chromium/components/arc/mojom/BUILD.gn b/chromium/components/arc/mojom/BUILD.gn index 13896b9dc98..ebb973f531e 100644 --- a/chromium/components/arc/mojom/BUILD.gn +++ b/chromium/components/arc/mojom/BUILD.gn @@ -41,8 +41,6 @@ if (is_chromeos) { "midis.mojom", "net.mojom", "obb_mounter.mojom", - "oemcrypto.mojom", - "oemcrypto_daemon.mojom", "pip.mojom", "policy.mojom", "power.mojom", @@ -69,7 +67,7 @@ if (is_chromeos) { ":camera_intent", ":media", ":notifications", - "//components/chromeos_camera/common:camera_app_helper", + ":oemcrypto", "//media/capture/video/chromeos/mojom:cros_camera", "//mojo/public/mojom/base", "//printing/mojom", @@ -112,21 +110,33 @@ if (is_chromeos) { public_deps = [ "//ui/gfx/geometry/mojom" ] } + mojom("oemcrypto") { + sources = [ "oemcrypto.mojom" ] + } + source_set("mojom_traits") { - sources = [ "ime_mojom_traits.h" ] + sources = [ + "ime_mojom_traits.cc", + "ime_mojom_traits.h", + ] deps = [ ":mojom", "//ui/base/ime:text_input_types", + "//ui/events", ] } source_set("unit_tests") { testonly = true - sources = [ "video_accelerator_mojom_traits_unittest.cc" ] + sources = [ + "ime_mojom_traits_unittest.cc", + "video_accelerator_mojom_traits_unittest.cc", + ] deps = [ ":mojom", + ":mojom_traits", "//media", "//mojo/public/cpp/test_support:test_utils", "//testing/gtest", diff --git a/chromium/components/arc/mojom/accessibility_helper.mojom b/chromium/components/arc/mojom/accessibility_helper.mojom index 1092b141686..e8cfb41a789 100644 --- a/chromium/components/arc/mojom/accessibility_helper.mojom +++ b/chromium/components/arc/mojom/accessibility_helper.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 22 +// Next MinVersion: 23 module arc.mojom; @@ -47,6 +47,22 @@ enum AccessibilityEventType { ASSIST_READING_CONTEXT, }; +// ContentChangeType lists the possible sub types of WINDOW_STATE_CHANGED and +// WINDOW_CONTENT_CHANGED events on Android ordered as same as developer guide +// of return value of getContentChangeTypes. +// https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent?hl=en#getContentChangeTypes() +[Extensible] +enum ContentChangeType { + CONTENT_DESCRIPTION, + STATE_DESCRIPTION, + SUBTREE, + TEXT, + PANE_TITLE, + UNDEFINED, + PANE_APPEARED, + PANE_DISAPPEARED, +}; + // Possible actions that can be performed on an AccessibilityNodeInfo. [Extensible] enum AccessibilityActionType { @@ -129,7 +145,8 @@ enum AccessibilityStringProperty { ROLE_DESCRIPTION, // Chrome only TOOLTIP, PANE_TITLE, - HINT_TEXT + HINT_TEXT, + STATE_DESCRIPTION }; // These fields are taken from int instance members of @@ -355,6 +372,13 @@ enum AccessibilityEventStringProperty { CONTENT_DESCRIPTION, }; +// These fields are taken from List<Integer> like instance members of +// AccessibilityEvent and AccessibilityRecord. +[Extensible] +enum AccessibilityEventIntListProperty{ + CONTENT_CHANGE_TYPES, +}; + // AccessibilityEventData is a struct to contain info of // AccessibilityEvent in Android. // https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html @@ -390,6 +414,8 @@ struct AccessibilityEventData { [MinVersion=21] map<AccessibilityEventIntProperty, int32>? int_properties; [MinVersion=21] map<AccessibilityEventStringProperty, string>? string_properties; + [MinVersion=23] + map<AccessibilityEventIntListProperty, array<int32>>? int_list_properties; }; // AccessibilityActionData is a struct to contain info of AccessibilityAction in @@ -472,7 +498,8 @@ interface AccessibilityHelperHost { // Next method ID: 12 interface AccessibilityHelperInstance { // Establishes full-duplex communication with the host. - [MinVersion=9] Init@7(AccessibilityHelperHost host) => (); + [MinVersion=9] Init@7( + pending_remote<AccessibilityHelperHost> host_remote) => (); // Set a filter on the event types received. SetFilter@2(AccessibilityFilterType filter_type); diff --git a/chromium/components/arc/mojom/app.mojom b/chromium/components/arc/mojom/app.mojom index 25ff611be6a..ad1fa0ecfd9 100644 --- a/chromium/components/arc/mojom/app.mojom +++ b/chromium/components/arc/mojom/app.mojom @@ -87,6 +87,19 @@ enum ShowPackageInfoPage { MANAGE_LINKS = 1, }; +// Describes the raw icon png data published by an Android application. +struct RawIconPngData { + // True if the icon is an adaptive icon, or false otherwise. + bool is_adaptive_icon; + // The raw icon for the non-adaptive icon, or the generated standard icon done + // by the ARC side for the adaptive icon. + array<uint8>? icon_png_data; + // The foreground image for the adaptive icon. + array<uint8>? foreground_icon_png_data; + // The background image for the adaptive icon. + array<uint8>? background_icon_png_data; +}; + // Describes a Play Store app discovery result. struct AppDiscoveryResult { string? launch_intent_uri; @@ -364,10 +377,10 @@ interface AppHost { // Deprecated method IDs: 2, 3, 13 interface AppInstance { // DEPRECATED: Please use Init@21 instead. - InitDeprecated@0(AppHost host_ptr); + InitDeprecated@0(pending_remote<AppHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=26] Init@21(AppHost host_ptr) => (); + [MinVersion=26] Init@21(pending_remote<AppHost> host_remote) => (); [MinVersion=1] CanHandleResolutionDeprecated@4( string package_name, string activity, Rect dimension) => diff --git a/chromium/components/arc/mojom/appfuse.mojom b/chromium/components/arc/mojom/appfuse.mojom index ee81f3c788b..b78d30d99e7 100644 --- a/chromium/components/arc/mojom/appfuse.mojom +++ b/chromium/components/arc/mojom/appfuse.mojom @@ -23,5 +23,5 @@ interface AppfuseHost { // Next Method ID: 1 interface AppfuseInstance { // Establishes full-duplex communication with the host. - Init@0(AppfuseHost host_ptr) => (); + Init@0(pending_remote<AppfuseHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/arc_bridge.mojom b/chromium/components/arc/mojom/arc_bridge.mojom index 8f6a38fc033..127c81924de 100644 --- a/chromium/components/arc/mojom/arc_bridge.mojom +++ b/chromium/components/arc/mojom/arc_bridge.mojom @@ -64,164 +64,198 @@ interface ArcBridgeHost { // Notifies Chrome that the AccessibilityHelperInstance interface is ready. [MinVersion=21] OnAccessibilityHelperInstanceReady@127( - AccessibilityHelperInstance instance_ptr); + pending_remote<AccessibilityHelperInstance> instance_remote); // Notifies Chrome that the AppInstance interface is ready. - OnAppInstanceReady@100(AppInstance instance_ptr); + OnAppInstanceReady@100(pending_remote<AppInstance> instance_remote); // Notifies Chrome that the AppPermissionsInstance interface is ready. - [MinVersion=44] OnAppPermissionsInstanceReady@149(AppPermissionsInstance instance_ptr); + [MinVersion=44] OnAppPermissionsInstanceReady@149( + pending_remote<AppPermissionsInstance> instance_remote); // Notifies Chrome that the AppfuseInstance interface is ready. - [MinVersion=40] OnAppfuseInstanceReady@145(AppfuseInstance instance_ptr); + [MinVersion=40] OnAppfuseInstanceReady@145( + pending_remote<AppfuseInstance> instance_remote); // Notifies Chrome that the AudioInstance interface is ready. - [MinVersion=8] OnAudioInstanceReady@115(AudioInstance instance_ptr); + [MinVersion=8] OnAudioInstanceReady@115( + pending_remote<AudioInstance> instance_remote); // Notifies Chrome that the AuthInstance interface is ready. - [MinVersion=1] OnAuthInstanceReady@106(AuthInstance instance_ptr); + [MinVersion=1] OnAuthInstanceReady@106( + pending_remote<AuthInstance> instance_remote); // Notifies Chrome that the BackupSettingsInstance interface is ready. - [MinVersion=33] OnBackupSettingsInstanceReady@138(BackupSettingsInstance instance_ptr); + [MinVersion=33] OnBackupSettingsInstanceReady@138( + pending_remote<BackupSettingsInstance> instance_remote); // Notifies Chrome that the BluetoothInstance interface is ready. - [MinVersion=9] OnBluetoothInstanceReady@113(BluetoothInstance instance_ptr); + [MinVersion=9] OnBluetoothInstanceReady@113( + pending_remote<BluetoothInstance> instance_remote); // Notifies Chrome that the BootPhaseMonitorInstance interface is ready. [MinVersion=19] OnBootPhaseMonitorInstanceReady@125( - BootPhaseMonitorInstance instance_ptr); + pending_remote<BootPhaseMonitorInstance> instance_remote); // Notifies Chrome that the CameraInstance is ready. - [MinVersion=46] OnCameraInstanceReady@151(CameraInstance instance_ptr); + [MinVersion=46] OnCameraInstanceReady@151( + pending_remote<CameraInstance> instance_remote); // Notifies Chrome that the CastReceiverInstance interface is ready. [MinVersion=27] OnCastReceiverInstanceReady@132( - CastReceiverInstance instance_ptr); + pending_remote<CastReceiverInstance> instance_remote); // Notifies Chrome that the CertStoreInstance interface is ready. [MinVersion=31] OnCertStoreInstanceReady@136( - CertStoreInstance instance_ptr); + pending_remote<CertStoreInstance> instance_remote); // Notifies Chrome that the ClipboardInstance interface is ready. - [MinVersion=2] OnClipboardInstanceReady@109(ClipboardInstance instance_ptr); + [MinVersion=2] OnClipboardInstanceReady@109( + pending_remote<ClipboardInstance> instance_remote); // Notifies Chrome that the CrashCollectorInstance interface is ready. [MinVersion=7] OnCrashCollectorInstanceReady@112( - CrashCollectorInstance instance_ptr); + pending_remote<CrashCollectorInstance> instance_remote); // Notifies Chrome that the DiskQuotaInstance interface is ready. - [MinVersion=39] OnDiskQuotaInstanceReady@144(DiskQuotaInstance instance_ptr); + [MinVersion=39] OnDiskQuotaInstanceReady@144( + pending_remote<DiskQuotaInstance> instance_remote); // Notifies Chrome that the EnterpriseReportingInstance interface is ready. [MinVersion=15] OnEnterpriseReportingInstanceReady@122( - EnterpriseReportingInstance instance_ptr); + pending_remote<EnterpriseReportingInstance> instance_remote); // Notifies Chrome that the FileSystemInstance interface is ready. [MinVersion=13] OnFileSystemInstanceReady@119( - FileSystemInstance instance_ptr); + pending_remote<FileSystemInstance> instance_remote); // Notifies Chrome that the ImeInstance interface is ready. - [MinVersion=3] OnImeInstanceReady@110(ImeInstance instance_ptr); + [MinVersion=3] OnImeInstanceReady@110( + pending_remote<ImeInstance> instance_remote); // Notifies Chrome that the InputMethodManagerInstance interface is ready. [MinVersion=38] OnInputMethodManagerInstanceReady@143( - InputMethodManagerInstance instance_ptr); + pending_remote<InputMethodManagerInstance> instance_remote); // Notifies Chrome that the IntentHelperInstance interface is ready. [MinVersion=4] OnIntentHelperInstanceReady@111( - IntentHelperInstance instance_ptr); + pending_remote<IntentHelperInstance> instance_remote); // Notifies Chrome that the KeymasterInstance interface is ready. - [MinVersion=47] OnKeymasterInstanceReady@152(KeymasterInstance instance_ptr); + [MinVersion=47] OnKeymasterInstanceReady@152( + pending_remote<KeymasterInstance> instance_remote); // Notifies Chrome that the KioskInstance interface is ready. - [MinVersion=20] OnKioskInstanceReady@126(KioskInstance instance_ptr); + [MinVersion=20] OnKioskInstanceReady@126( + pending_remote<KioskInstance> instance_remote); // Notifies Chrome that the LockScreenInstance interface is ready. - [MinVersion=29] OnLockScreenInstanceReady@134(LockScreenInstance instance_ptr); + [MinVersion=29] OnLockScreenInstanceReady@134( + pending_remote<LockScreenInstance> instance_remote); // Notifies Chrome that the MediaSessionInstance interface is ready. - [MinVersion=43] OnMediaSessionInstanceReady@148(MediaSessionInstance instance_ptr); + [MinVersion=43] OnMediaSessionInstanceReady@148( + pending_remote<MediaSessionInstance> instance_remote); // Notifies Chrome that the MetricsInstance interface is ready. - [MinVersion=10] OnMetricsInstanceReady@116(MetricsInstance instance_ptr); + [MinVersion=10] OnMetricsInstanceReady@116( + pending_remote<MetricsInstance> instance_remote); // Notifies Chrome that the MidisInstance interface is ready. - [MinVersion=30] OnMidisInstanceReady@135(MidisInstance instance_ptr); + [MinVersion=30] OnMidisInstanceReady@135( + pending_remote<MidisInstance> instance_remote); // Notifies Chrome that the NetInstance interface is ready. - [MinVersion=5] OnNetInstanceReady@108(NetInstance instance_ptr); + [MinVersion=5] OnNetInstanceReady@108( + pending_remote<NetInstance> instance_remote); // Notifies Chrome that the NotificationsInstance interface is ready. - OnNotificationsInstanceReady@102(NotificationsInstance instance_ptr); + OnNotificationsInstanceReady@102( + pending_remote<NotificationsInstance> instance_remote); // Notifies Chrome that the ObbMounter interface is ready. - [MinVersion=14] OnObbMounterInstanceReady@120(ObbMounterInstance instance_ptr); + [MinVersion=14] OnObbMounterInstanceReady@120( + pending_remote<ObbMounterInstance> instance_remote); // Notifies Chrome that the OemCryptoInstance interface is ready. - [MinVersion=28] OnOemCryptoInstanceReady@133(OemCryptoInstance instance_ptr); + [MinVersion=28] OnOemCryptoInstanceReady@133( + pending_remote<OemCryptoInstance> instance_remote); // Notifies Chrome that the PipInstance interface is ready. - [MinVersion=41] OnPipInstanceReady@146(PipInstance instance_ptr); + [MinVersion=41] OnPipInstanceReady@146( + pending_remote<PipInstance> instance_remote); // Notifies Chrome that the PolicyInstance interface is ready. - [MinVersion=7] OnPolicyInstanceReady@114(PolicyInstance instance_ptr); + [MinVersion=7] OnPolicyInstanceReady@114( + pending_remote<PolicyInstance> instance_remote); // Notifies Chrome that the PowerInstance interface is ready. - OnPowerInstanceReady@103(PowerInstance instance_ptr); + OnPowerInstanceReady@103(pending_remote<PowerInstance> instance_remote); // Notifies Chrome that the PrintSpoolerInstance interface is ready. [MinVersion=45] OnPrintSpoolerInstanceReady@150( - PrintSpoolerInstance instance_ptr); + pending_remote<PrintSpoolerInstance> instance_remote); // Notifies Chrome that the ProcessInstance interface is ready. - OnProcessInstanceReady@104(ProcessInstance instance_ptr); + OnProcessInstanceReady@104(pending_remote<ProcessInstance> instance_remote); // Notifies Chrome that the PropertyInstance interface is ready. - [MinVersion=42] OnPropertyInstanceReady@147(PropertyInstance instance_ptr); + [MinVersion=42] OnPropertyInstanceReady@147( + pending_remote<PropertyInstance> instance_remote); // Notifies Chrome that the RotationLockInstance interface is ready. - [MinVersion=32] OnRotationLockInstanceReady@137(RotationLockInstance instance_ptr); + [MinVersion=32] OnRotationLockInstanceReady@137( + pending_remote<RotationLockInstance> instance_remote); // Notifies Chrome that the ScreenCaptureInstance interface is ready. - [MinVersion=35] OnScreenCaptureInstanceReady@140(ScreenCaptureInstance instance_ptr); + [MinVersion=35] OnScreenCaptureInstanceReady@140( + pending_remote<ScreenCaptureInstance> instance_remote); // Notifies Chrome that the SmartCardManagerInstance interface is ready. [MinVersion=48] OnSmartCardManagerInstanceReady@153( - SmartCardManagerInstance instance_ptr); + pending_remote<SmartCardManagerInstance> instance_remote); // Notifies Chrome that the StorageManagerInstance interface is ready. - [MinVersion=12] OnStorageManagerInstanceReady@118(StorageManagerInstance instance_ptr); + [MinVersion=12] OnStorageManagerInstanceReady@118( + pending_remote<StorageManagerInstance> instance_remote); // Notifies Chrome that the TimerInstance interface is ready. - [MinVersion=36] OnTimerInstanceReady@141(TimerInstance instance_ptr); + [MinVersion=36] OnTimerInstanceReady@141( + pending_remote<TimerInstance> instance_remote); // Notifies Chrome that the TracingInstance interface is ready. - [MinVersion=22] OnTracingInstanceReady@128(TracingInstance instance_ptr); + [MinVersion=22] OnTracingInstanceReady@128( + pending_remote<TracingInstance> instance_remote); // Notifies Chrome that the TtsInstance interface is ready. - [MinVersion=17] OnTtsInstanceReady@123(TtsInstance instance_ptr); + [MinVersion=17] OnTtsInstanceReady@123( + pending_remote<TtsInstance> instance_remote); // Notifies Chrome that the UsbHostInstance interface is ready. - [MinVersion=34] OnUsbHostInstanceReady@139(UsbHostInstance instance_ptr); + [MinVersion=34] OnUsbHostInstanceReady@139( + pending_remote<UsbHostInstance> instance_remote); // Notifies Chrome that the VideoInstance interface is ready. - [MinVersion=6] OnVideoInstanceReady@107(VideoInstance instance_ptr); + [MinVersion=6] OnVideoInstanceReady@107( + pending_remote<VideoInstance> instance_remote); // Notifies Chrome that the VoiceInteractionArcHomeInstance is ready. [MinVersion=24] OnVoiceInteractionArcHomeInstanceReady@130( - VoiceInteractionArcHomeInstance instance_ptr); + pending_remote<VoiceInteractionArcHomeInstance> instance_remote); // Notifies Chrome that the VoiceInteractionFrameworkInstance is ready. [MinVersion=23] OnVoiceInteractionFrameworkInstanceReady@129( - VoiceInteractionFrameworkInstance instance_ptr); + pending_remote<VoiceInteractionFrameworkInstance> instance_remote); // Notifies Chrome that the VolumeMounter interface is ready. - [MinVersion=25] OnVolumeMounterInstanceReady@131(VolumeMounterInstance instance_ptr); + [MinVersion=25] OnVolumeMounterInstanceReady@131( + pending_remote<VolumeMounterInstance> instance_remote); // Notifies Chrome that the WakeLockInstance interface is ready. - [MinVersion=37] OnWakeLockInstanceReady@142(WakeLockInstance instance_ptr); + [MinVersion=37] OnWakeLockInstanceReady@142( + pending_remote<WakeLockInstance> instance_remote); // Notifies Chrome that the WallpaperInstance interface is ready. - [MinVersion=18] OnWallpaperInstanceReady@124(WallpaperInstance instance_ptr); + [MinVersion=18] OnWallpaperInstanceReady@124( + pending_remote<WallpaperInstance> instance_remote); }; diff --git a/chromium/components/arc/mojom/audio.mojom b/chromium/components/arc/mojom/audio.mojom index eceb20e4cdf..6d90a02569a 100644 --- a/chromium/components/arc/mojom/audio.mojom +++ b/chromium/components/arc/mojom/audio.mojom @@ -27,10 +27,10 @@ interface AudioHost { // Next method ID: 4 interface AudioInstance { // DEPRECATED: Please use Init@3 instead. - [MinVersion=1] InitDeprecated@1(AudioHost host); + [MinVersion=1] InitDeprecated@1(pending_remote<AudioHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=4] Init@3(AudioHost host) => (); + [MinVersion=4] Init@3(pending_remote<AudioHost> host_remote) => (); // Notify plug states of headphone, microphone, etc. Each switch state is // represented by the corresponding bit, if the bit is set then the switch diff --git a/chromium/components/arc/mojom/auth.mojom b/chromium/components/arc/mojom/auth.mojom index beea834ece7..caa93bdea8f 100644 --- a/chromium/components/arc/mojom/auth.mojom +++ b/chromium/components/arc/mojom/auth.mojom @@ -352,10 +352,10 @@ interface AuthHost { // Next Method ID: 6 interface AuthInstance { // DEPRECATED: Please use Init@2 instead. - InitDeprecated@0(AuthHost host_ptr); + InitDeprecated@0(pending_remote<AuthHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=12] Init@2(AuthHost host_ptr) => (); + [MinVersion=12] Init@2(pending_remote<AuthHost> host_remote) => (); // Callback from RequestAccountInfo. This cannot be a normal callback since // the result can sometimes take a few minutes in some cases (Kiosk mode), diff --git a/chromium/components/arc/mojom/bluetooth.mojom b/chromium/components/arc/mojom/bluetooth.mojom index 495be3cb939..64e3f6d24f3 100644 --- a/chromium/components/arc/mojom/bluetooth.mojom +++ b/chromium/components/arc/mojom/bluetooth.mojom @@ -447,10 +447,10 @@ interface BluetoothHost { // Deprecated Method ID: 2, 6, 11, 12 interface BluetoothInstance { // DEPRECATED: Please use Init@18 instead. - InitDeprecated@0(BluetoothHost host_ptr); + InitDeprecated@0(pending_remote<BluetoothHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=7] Init@18(BluetoothHost host_ptr) => (); + [MinVersion=7] Init@18(pending_remote<BluetoothHost> host_remote) => (); OnAdapterProperties@1(BluetoothStatus status, array<BluetoothProperty> properties); diff --git a/chromium/components/arc/mojom/boot_phase_monitor.mojom b/chromium/components/arc/mojom/boot_phase_monitor.mojom index 045270f3e1f..703df7f5dc2 100644 --- a/chromium/components/arc/mojom/boot_phase_monitor.mojom +++ b/chromium/components/arc/mojom/boot_phase_monitor.mojom @@ -15,8 +15,8 @@ interface BootPhaseMonitorHost { // Next method ID: 2 interface BootPhaseMonitorInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(BootPhaseMonitorHost host_ptr); + InitDeprecated@0(pending_remote<BootPhaseMonitorHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@1(BootPhaseMonitorHost host_ptr) => (); + [MinVersion=1] Init@1(pending_remote<BootPhaseMonitorHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/camera.mojom b/chromium/components/arc/mojom/camera.mojom index 6437d710c2a..a90eb6524e7 100644 --- a/chromium/components/arc/mojom/camera.mojom +++ b/chromium/components/arc/mojom/camera.mojom @@ -96,7 +96,7 @@ interface CameraService { interface CameraHost { // Notifies Chrome that CameraService is requested and returns an interface // pointer bound to a newly created service. Used by camera HAL v1. - StartCameraService@0() => (CameraService service); + StartCameraService@0() => (pending_remote<CameraService> service); // Registers the camera HAL client. Used by camera HAL v3. [MinVersion=2] RegisterCameraHalClient@1( @@ -106,5 +106,5 @@ interface CameraHost { // Next method ID: 1 interface CameraInstance { // Establishes full-duplex communication with the host. - Init@0(CameraHost host_ptr) => (); + Init@0(pending_remote<CameraHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/cert_store.mojom b/chromium/components/arc/mojom/cert_store.mojom index 90f1d8c3ff9..24ec3fb3ed3 100644 --- a/chromium/components/arc/mojom/cert_store.mojom +++ b/chromium/components/arc/mojom/cert_store.mojom @@ -111,10 +111,10 @@ interface CertStoreHost { // Next method ID: 4 interface CertStoreInstance { // DEPRECATED: Please use Init@3 instead. - InitDeprecated@0(CertStoreHost host_ptr); + InitDeprecated@0(pending_remote<CertStoreHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@3(CertStoreHost host_ptr) => (); + [MinVersion=1] Init@3(pending_remote<CertStoreHost> host_remote) => (); // Informs the key permissions are changed: only listed packages are allowed // to use exposed certificates. @@ -134,5 +134,5 @@ interface SmartCardManagerHost { // Next method ID: 1 interface SmartCardManagerInstance { // Establishes full-duplex communication with the host. - Init@0(SmartCardManagerHost host_ptr) => (); + Init@0(pending_remote<SmartCardManagerHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/clipboard.mojom b/chromium/components/arc/mojom/clipboard.mojom index 11ea94683c4..452599c6f0a 100644 --- a/chromium/components/arc/mojom/clipboard.mojom +++ b/chromium/components/arc/mojom/clipboard.mojom @@ -53,10 +53,10 @@ interface ClipboardHost { // Deprecated method IDs: 1 interface ClipboardInstance { // DEPRECATED: Please use Init@3 instead. - InitDeprecated@0(ClipboardHost host_ptr); + InitDeprecated@0(pending_remote<ClipboardHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=2] Init@3(ClipboardHost host_ptr) => (); + [MinVersion=2] Init@3(pending_remote<ClipboardHost> host_remote) => (); // Tells that the Host clipboard has been updated. [MinVersion=1] OnHostClipboardUpdated@2(); diff --git a/chromium/components/arc/mojom/crash_collector.mojom b/chromium/components/arc/mojom/crash_collector.mojom index 70611023476..b25907a42c3 100644 --- a/chromium/components/arc/mojom/crash_collector.mojom +++ b/chromium/components/arc/mojom/crash_collector.mojom @@ -24,8 +24,8 @@ interface CrashCollectorHost { // Next Method ID: 2 interface CrashCollectorInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(CrashCollectorHost host_ptr); + InitDeprecated@0(pending_remote<CrashCollectorHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=2] Init@1(CrashCollectorHost host_ptr) => (); + [MinVersion=2] Init@1(pending_remote<CrashCollectorHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/disk_quota.mojom b/chromium/components/arc/mojom/disk_quota.mojom index 006537a6c95..68b4418ee06 100644 --- a/chromium/components/arc/mojom/disk_quota.mojom +++ b/chromium/components/arc/mojom/disk_quota.mojom @@ -18,5 +18,6 @@ interface DiskQuotaHost { // Next Method ID: 1 interface DiskQuotaInstance { - Init@0(DiskQuotaHost host_ptr) => (); + // Establishes full-duplex communication with the host. + Init@0(pending_remote<DiskQuotaHost> host_remote) => (); };
\ No newline at end of file diff --git a/chromium/components/arc/mojom/enterprise_reporting.mojom b/chromium/components/arc/mojom/enterprise_reporting.mojom index 3130ee9fc54..a302a5d21bc 100644 --- a/chromium/components/arc/mojom/enterprise_reporting.mojom +++ b/chromium/components/arc/mojom/enterprise_reporting.mojom @@ -28,10 +28,11 @@ interface EnterpriseReportingHost { // Next method ID: 3 interface EnterpriseReportingInstance { // DEPRECATED: Please use Init@2 instead. - InitDeprecated@0(EnterpriseReportingHost host_ptr); + InitDeprecated@0(pending_remote<EnterpriseReportingHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=2] Init@2(EnterpriseReportingHost host_ptr) => (); + [MinVersion=2] Init@2( + pending_remote<EnterpriseReportingHost> host_remote) => (); // Requests that a JSON status blob be generated and passed to the // host. diff --git a/chromium/components/arc/mojom/file_system.mojom b/chromium/components/arc/mojom/file_system.mojom index 4c3176e4a45..7a74c610d13 100644 --- a/chromium/components/arc/mojom/file_system.mojom +++ b/chromium/components/arc/mojom/file_system.mojom @@ -382,10 +382,10 @@ interface FileSystemInstance { (Document? document); // DEPRECATED: Please use Init@10 instead. - [MinVersion=3] InitDeprecated@5(FileSystemHost host_ptr); + [MinVersion=3] InitDeprecated@5(pending_remote<FileSystemHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=7] Init@10(FileSystemHost host_ptr) => (); + [MinVersion=7] Init@10(pending_remote<FileSystemHost> host_remote) => (); // Asks the ContentResolver to get a FD to read the file specified by the // URL. diff --git a/chromium/components/arc/mojom/ime.mojom b/chromium/components/arc/mojom/ime.mojom index bae292e5e65..f65ee6679e0 100644 --- a/chromium/components/arc/mojom/ime.mojom +++ b/chromium/components/arc/mojom/ime.mojom @@ -43,6 +43,19 @@ struct CompositionSegment { bool emphasized; }; +// Represents the information of a key event. +struct KeyEventData { + // Whether the event is a press event or a release event. + bool pressed; + // The key touched in the event represented in |ui::KeyboardCode|. + int32 key_code; + // The flags for modifiers state. + bool is_shift_down; + bool is_control_down; + bool is_alt_down; + bool is_capslock_on; +}; + // Next method ID: 6 interface ImeHost { // Notifies Chrome that the text input focus is changed. @@ -97,10 +110,10 @@ interface ImeHost { // Next method ID: 8 interface ImeInstance { // DEPRECATED: Please use Init@6 instead. - InitDeprecated@0(ImeHost host_ptr); + InitDeprecated@0(pending_remote<ImeHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=6] Init@6(ImeHost host_ptr) => (); + [MinVersion=6] Init@6(pending_remote<ImeHost> host_remote) => (); // Sets composition text and attributes requested by the host IME. SetCompositionText@1(string text, array<CompositionSegment> segments); diff --git a/chromium/components/arc/mojom/ime.typemap b/chromium/components/arc/mojom/ime.typemap index d82e98af726..6d6c89dc7a9 100644 --- a/chromium/components/arc/mojom/ime.typemap +++ b/chromium/components/arc/mojom/ime.typemap @@ -1,4 +1,10 @@ mojom = "//components/arc/mojom/ime.mojom" -public_headers = [ "//ui/base/ime/text_input_type.h" ] +public_headers = [ + "//ui/base/ime/text_input_type.h", + "//ui/events/event.h", +] traits_headers = [ "//components/arc/mojom/ime_mojom_traits.h" ] -type_mappings = [ "arc.mojom.TextInputType=::ui::TextInputType" ] +type_mappings = [ + "arc.mojom.TextInputType=::ui::TextInputType", + "arc.mojom.KeyEventData=::std::unique_ptr<::ui::KeyEvent>[move_only]", +] diff --git a/chromium/components/arc/mojom/ime_mojom_traits.cc b/chromium/components/arc/mojom/ime_mojom_traits.cc new file mode 100644 index 00000000000..1687c4635c4 --- /dev/null +++ b/chromium/components/arc/mojom/ime_mojom_traits.cc @@ -0,0 +1,42 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/arc/mojom/ime_mojom_traits.h" + +#include "ui/events/keycodes/keyboard_code_conversion.h" + +namespace mojo { +using KeyEventUniquePtr = std::unique_ptr<ui::KeyEvent>; + +bool StructTraits<arc::mojom::KeyEventDataDataView, KeyEventUniquePtr>::Read( + arc::mojom::KeyEventDataDataView data, + KeyEventUniquePtr* out) { + const ui::EventType type = + data.pressed() ? ui::ET_KEY_PRESSED : ui::ET_KEY_RELEASED; + // TODO(yhanada): Currently we have no way to know the correct keyboard layout + // here, so assuming US layout. Find a way to get the more precise DomCode. + const ui::DomCode dom_code = ui::UsLayoutKeyboardCodeToDomCode( + static_cast<ui::KeyboardCode>(data.key_code())); + + int flags = 0; + if (data.is_shift_down()) + flags |= ui::EF_SHIFT_DOWN; + if (data.is_control_down()) + flags |= ui::EF_CONTROL_DOWN; + if (data.is_alt_down()) + flags |= ui::EF_ALT_DOWN; + if (data.is_capslock_on()) + flags |= ui::EF_CAPS_LOCK_ON; + + ui::KeyboardCode key_code; + ui::DomKey dom_key; + if (!DomCodeToUsLayoutDomKey(dom_code, flags, &dom_key, &key_code)) + return false; + + *out = std::make_unique<ui::KeyEvent>(type, key_code, dom_code, flags, + dom_key, base::TimeTicks::Now()); + return true; +} + +} // namespace mojo diff --git a/chromium/components/arc/mojom/ime_mojom_traits.h b/chromium/components/arc/mojom/ime_mojom_traits.h index 5dc61426d55..3941f6161ec 100644 --- a/chromium/components/arc/mojom/ime_mojom_traits.h +++ b/chromium/components/arc/mojom/ime_mojom_traits.h @@ -5,8 +5,9 @@ #ifndef COMPONENTS_ARC_MOJOM_IME_MOJOM_TRAITS_H_ #define COMPONENTS_ARC_MOJOM_IME_MOJOM_TRAITS_H_ -#include "components/arc/mojom/ime.mojom-shared.h" +#include "components/arc/mojom/ime.mojom.h" #include "ui/base/ime/text_input_type.h" +#include "ui/events/event.h" namespace mojo { @@ -107,6 +108,32 @@ struct EnumTraits<arc::mojom::TextInputType, ui::TextInputType> { } }; +using KeyEventUniquePtr = std::unique_ptr<ui::KeyEvent>; +template <> +struct StructTraits<arc::mojom::KeyEventDataDataView, KeyEventUniquePtr> { + static bool pressed(const KeyEventUniquePtr& key_event) { + return key_event->type() == ui::ET_KEY_PRESSED; + } + static int32_t key_code(const KeyEventUniquePtr& key_event) { + return key_event->key_code(); + } + static bool is_shift_down(const KeyEventUniquePtr& key_event) { + return key_event->IsShiftDown(); + } + static bool is_control_down(const KeyEventUniquePtr& key_event) { + return key_event->IsControlDown(); + } + static bool is_alt_down(const KeyEventUniquePtr& key_event) { + return key_event->IsAltDown(); + } + static bool is_capslock_on(const KeyEventUniquePtr& key_event) { + return key_event->IsCapsLockOn(); + } + + static bool Read(arc::mojom::KeyEventDataDataView data, + KeyEventUniquePtr* out); +}; + } // namespace mojo #endif // COMPONENTS_ARC_MOJOM_IME_MOJOM_TRAITS_H_ diff --git a/chromium/components/arc/mojom/ime_mojom_traits_unittest.cc b/chromium/components/arc/mojom/ime_mojom_traits_unittest.cc new file mode 100644 index 00000000000..7dfece3f529 --- /dev/null +++ b/chromium/components/arc/mojom/ime_mojom_traits_unittest.cc @@ -0,0 +1,45 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/arc/mojom/ime_mojom_traits.h" + +#include "mojo/public/cpp/test_support/test_utils.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/events/event.h" +#include "ui/events/keycodes/dom/dom_code.h" + +namespace mojo { + +namespace { + +void ExpectKeyEventsEqual(const ui::KeyEvent& expected, + const ui::KeyEvent& actual) { + EXPECT_EQ(expected.type(), actual.type()); + EXPECT_EQ(expected.key_code(), actual.key_code()); + EXPECT_EQ(expected.code(), actual.code()); + EXPECT_EQ(expected.IsShiftDown(), actual.IsShiftDown()); + EXPECT_EQ(expected.IsAltDown(), actual.IsAltDown()); + EXPECT_EQ(expected.IsControlDown(), actual.IsControlDown()); + EXPECT_EQ(expected.IsCapsLockOn(), actual.IsCapsLockOn()); +} + +} // namespace + +TEST(KeyEventStructTraitsTest, Convert) { + const ui::KeyEvent kTestData[] = { + {ui::ET_KEY_PRESSED, ui::VKEY_A, ui::DomCode::US_A, ui::EF_CONTROL_DOWN}, + {ui::ET_KEY_PRESSED, ui::VKEY_B, ui::DomCode::US_B, ui::EF_ALT_DOWN}, + {ui::ET_KEY_RELEASED, ui::VKEY_B, ui::DomCode::US_B, ui::EF_SHIFT_DOWN}, + {ui::ET_KEY_PRESSED, ui::VKEY_A, ui::DomCode::US_A, ui::EF_CAPS_LOCK_ON}, + }; + for (size_t idx = 0; idx < base::size(kTestData); ++idx) { + auto copy = std::make_unique<ui::KeyEvent>(kTestData[idx]); + std::unique_ptr<ui::KeyEvent> output; + mojo::test::SerializeAndDeserialize<arc::mojom::KeyEventData>(©, + &output); + ExpectKeyEventsEqual(*copy, *output); + } +} + +} // namespace mojo diff --git a/chromium/components/arc/mojom/input_method_manager.mojom b/chromium/components/arc/mojom/input_method_manager.mojom index c8e3dcde029..273eac40c5f 100644 --- a/chromium/components/arc/mojom/input_method_manager.mojom +++ b/chromium/components/arc/mojom/input_method_manager.mojom @@ -59,20 +59,6 @@ struct TextInputState { [MinVersion=6] Range? composition_text_range; }; -// Represents the information of a key event. -[MinVersion=7] -struct KeyEventData { - // Whether the event is a press event or a release event. - bool pressed; - // The key touched in the event represented in |ui::KeyboardCode|. - int32 key_code; - // The flags for modifiers state. - bool is_shift_down; - bool is_control_down; - bool is_alt_down; - bool is_capslock_on; -}; - // This interface provides methods to control a text field. // It is generated for each focused text field and passed to Android. // This interface will be closed when the focus moves to another text field. @@ -135,7 +121,7 @@ interface InputMethodManagerHost { // Next method ID: 7 interface InputMethodManagerInstance { // Establishes full-duplex communication with the host. - Init@0(InputMethodManagerHost host_ptr) => (); + Init@0(pending_remote<InputMethodManagerHost> host_remote) => (); // Enables/Disables an IME in Android. Calling this method will add/remove // the specified IME to/from ENABLED_INPUT_METHODS settings. diff --git a/chromium/components/arc/mojom/intent_helper.mojom b/chromium/components/arc/mojom/intent_helper.mojom index 3be1655ab7b..c37690fce69 100644 --- a/chromium/components/arc/mojom/intent_helper.mojom +++ b/chromium/components/arc/mojom/intent_helper.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Next MinVersion: 37 +// Next MinVersion: 39 module arc.mojom; @@ -82,6 +82,7 @@ struct IntentFilter { [MinVersion=10] array<PatternMatcher>? data_paths; [MinVersion=10] array<PatternMatcher>? deprecated_data_scheme_specific_parts; [MinVersion=21] string? package_name; // Package which registered the filter. + [MinVersion=38] array<string>? mime_types; // Intent filer mime types. }; // Describes a package that can handle an intent. @@ -147,7 +148,7 @@ enum ChromePage { ABOUTBLANK, ABOUTDOWNLOADS, ABOUTHISTORY, - CROSTINIDISKRESIZE, + DEPRECATED_CROSTINIDISKRESIZE, ACCESSIBILITY, ACCOUNTMANAGER, ANDROIDAPPSDETAILS, @@ -314,7 +315,7 @@ interface IntentHelperHost { }; // Sends intents to ARC on behalf of Chrome. -// Next method ID: 19 +// Next method ID: 20 interface IntentHelperInstance { // Sets the given package as a preferred package. The next time an ACTION_VIEW // intent is sent with a URL that requires disambiguation, instead of opening @@ -354,10 +355,10 @@ interface IntentHelperInstance { ActionType action_type); // DEPRECATED: Please use Init@13 instead. - InitDeprecated@0(IntentHelperHost host_ptr); + InitDeprecated@0(pending_remote<IntentHelperHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=19] Init@13(IntentHelperHost host_ptr) => (); + [MinVersion=19] Init@13(pending_remote<IntentHelperHost> host_remote) => (); // DEPRECATED. Use FileSystemInstance.OpenFileToRead() instead. [MinVersion=15] OpenFileToReadDeprecated@12(string url) => (handle? fd); @@ -413,4 +414,8 @@ interface IntentHelperInstance { CameraIntentAction action, array<uint8> data) => (bool is_success); + + // Request ARC to send the domain verification status update for all packages + // to Chrome OS. + [MinVersion=37] RequestDomainVerificationStatusUpdate@19(); }; diff --git a/chromium/components/arc/mojom/keymaster.mojom b/chromium/components/arc/mojom/keymaster.mojom index 24475b72636..6aa80cf3284 100644 --- a/chromium/components/arc/mojom/keymaster.mojom +++ b/chromium/components/arc/mojom/keymaster.mojom @@ -12,13 +12,14 @@ module arc.mojom; // Host is implemented in Chrome. Listens until server and instance come online // and forwards a server handle to the instance. interface KeymasterHost { - GetServer@0() => (KeymasterServer server_ptr); + GetServer@0() => (pending_remote<KeymasterServer>? server_remote); }; // Instance is implemented in ARC. Retrieves a server pointer from the host and // uses it to fulfill Android Keymaster operations. interface KeymasterInstance { - Init@0(KeymasterHost host_ptr) => (); + // Establishes full-duplex communication with the host. + Init@0(pending_remote<KeymasterHost> host_remote) => (); }; // Server is implemented in arc-keymasterd in Chrome OS. This interface is the diff --git a/chromium/components/arc/mojom/kiosk.mojom b/chromium/components/arc/mojom/kiosk.mojom index 39beb508f79..852991b17a7 100644 --- a/chromium/components/arc/mojom/kiosk.mojom +++ b/chromium/components/arc/mojom/kiosk.mojom @@ -23,8 +23,8 @@ interface KioskHost { // Next method ID: 2 interface KioskInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(KioskHost host_ptr); + InitDeprecated@0(pending_remote<KioskHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@1(KioskHost host_ptr) => (); + [MinVersion=1] Init@1(pending_remote<KioskHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/metrics.mojom b/chromium/components/arc/mojom/metrics.mojom index c5befd6601b..b076bb6031e 100644 --- a/chromium/components/arc/mojom/metrics.mojom +++ b/chromium/components/arc/mojom/metrics.mojom @@ -108,8 +108,8 @@ interface MetricsHost { // Next method ID: 2 interface MetricsInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(MetricsHost host_ptr); + InitDeprecated@0(pending_remote<MetricsHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=2] Init@1(MetricsHost host_ptr) => (); + [MinVersion=2] Init@1(pending_remote<MetricsHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/midis.mojom b/chromium/components/arc/mojom/midis.mojom index 4a8e1735e20..18d9e40376e 100644 --- a/chromium/components/arc/mojom/midis.mojom +++ b/chromium/components/arc/mojom/midis.mojom @@ -66,7 +66,8 @@ interface MidisServer { // by the client). // Next Method ID: 1 interface MidisHost { - Connect@0(MidisServer& server, MidisClient client); + Connect@0( + pending_receiver<MidisServer> server, pending_remote<MidisClient> client); }; // MidisInstance is implemented in the ARC MIDI JNI code that @@ -74,8 +75,8 @@ interface MidisHost { // Next Method ID: 2 interface MidisInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(MidisHost host_ptr); + InitDeprecated@0(pending_remote<MidisHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@1(MidisHost host_ptr) => (); + [MinVersion=1] Init@1(pending_remote<MidisHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/net.mojom b/chromium/components/arc/mojom/net.mojom index 81791af10f1..8faca92ca21 100644 --- a/chromium/components/arc/mojom/net.mojom +++ b/chromium/components/arc/mojom/net.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 14 +// Next MinVersion: 15 // This file defines the mojo interface between the ARC networking stack and // Chrome OS. There are three different groups of interactions: @@ -92,7 +92,8 @@ enum IPAddressType { IPV6, }; -// Layer 3 and proxy configuration information for an IP network. +// Deprecated. Individual fields added to NetworkConfiguration in version 13 of +// this file should be used instead. struct IPConfiguration { // Literal representation of the IP address of the ARC gateway. @@ -126,7 +127,8 @@ enum SecurityType { WPA_EAP, }; -// Tethering state of a |NetworkConfiguration| as a client. +// Deprecated enum. |is_metered| in NetworkConfiguration should be +// used instead. [Extensible] enum TetheringClientState { // Tethering state is detected and confirmed. @@ -189,8 +191,9 @@ struct NetworkConfiguration { // A string token that uniquely identifies this network service. string guid; - // IP configuration for the network service inside ARC. - array<IPConfiguration>? ip_configs; + // Deprecated. Individual fields added to NetworkConfiguration in version 13 + // of this file should be used instead. + array<IPConfiguration>? deprecated_ip_configs; // Deprecated field unused from ARC P and later. string? deprecated_mac_address; @@ -201,9 +204,8 @@ struct NetworkConfiguration { // Additional WiFi properties for WiFi network services. WiFi? wifi; - // Indicates if the physical network is known to have upstream Internet - // access through tethering on a metered network. - [MinVersion=8] TetheringClientState tethering_client_state; + // Deprecated field. Uses |is_metered| instead. + [MinVersion=8] TetheringClientState deprecated_tethering_client_state; // The name of the network interface on the host. [MinVersion=10] string? network_interface; @@ -266,6 +268,10 @@ struct NetworkConfiguration { // to ARC and associated with the network service. This can be different // from the name of the real physical interface managed by shill. [MinVersion=13] string? arc_network_interface; + + // True if the network has been autodetected by the platform as a metered + // network or if the user explicitly marked the network as metered in the UI. + [MinVersion=14] bool is_metered; }; // Describes a Wifi network configuration that ARC has requested the host to @@ -399,10 +405,10 @@ interface NetHost { // ID 2 is missing as it belonged to deprecated method. interface NetInstance { // DEPRECATED: Please use Init@6 instead. - InitDeprecated@0(NetHost host_ptr); + InitDeprecated@0(pending_remote<NetHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=8] Init@6(NetHost host_ptr) => (); + [MinVersion=8] Init@6(pending_remote<NetHost> host_remote) => (); // Notifies the instance of a WiFI AP scan being completed. [MinVersion=1] ScanCompleted@1(); diff --git a/chromium/components/arc/mojom/notifications.mojom b/chromium/components/arc/mojom/notifications.mojom index 96cee17676a..db460d4f7c0 100644 --- a/chromium/components/arc/mojom/notifications.mojom +++ b/chromium/components/arc/mojom/notifications.mojom @@ -243,10 +243,10 @@ interface NotificationsHost { // TODO(lhchavez): Migrate all request/response messages to Mojo. interface NotificationsInstance { // DEPRECATED: Please use Init@5 instead. - InitDeprecated@0(NotificationsHost host_ptr); + InitDeprecated@0(pending_remote<NotificationsHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=14] Init@5(NotificationsHost host_ptr) => (); + [MinVersion=14] Init@5(pending_remote<NotificationsHost> host_remote) => (); // Sends an event from Chrome notification UI to Android. // |event| is a type of occured event. diff --git a/chromium/components/arc/mojom/obb_mounter.mojom b/chromium/components/arc/mojom/obb_mounter.mojom index d3659753320..403522cba02 100644 --- a/chromium/components/arc/mojom/obb_mounter.mojom +++ b/chromium/components/arc/mojom/obb_mounter.mojom @@ -21,8 +21,8 @@ interface ObbMounterHost { // Next Method ID: 2 interface ObbMounterInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(ObbMounterHost host_ptr); + InitDeprecated@0(pending_remote<ObbMounterHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@1(ObbMounterHost host_ptr) => (); + [MinVersion=1] Init@1(pending_remote<ObbMounterHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/oemcrypto.mojom b/chromium/components/arc/mojom/oemcrypto.mojom index 2c4b74737da..c7d050def44 100644 --- a/chromium/components/arc/mojom/oemcrypto.mojom +++ b/chromium/components/arc/mojom/oemcrypto.mojom @@ -342,7 +342,7 @@ interface OemCryptoService { // that runs in Chrome OS. // Next Method ID: 1 interface OemCryptoHost { - Connect@0(OemCryptoService& oemcryptor); + Connect@0(pending_receiver<OemCryptoService> oemcryptor); }; // OemCryptoInstance is implemented in the liboemcrypto.so library that runs in @@ -350,8 +350,8 @@ interface OemCryptoHost { // Next Method ID: 2 interface OemCryptoInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(OemCryptoHost host_ptr); + InitDeprecated@0(pending_remote<OemCryptoHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@1(OemCryptoHost host_ptr) => (); + [MinVersion=1] Init@1(pending_remote<OemCryptoHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/oemcrypto_daemon.mojom b/chromium/components/arc/mojom/oemcrypto_daemon.mojom deleted file mode 100644 index 2988433412c..00000000000 --- a/chromium/components/arc/mojom/oemcrypto_daemon.mojom +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// The original version of this file lives in the Chromium repository at: -// src/components/arc/mojom/oemcrypto_daemon.mojom - -// This file defines the mojo interface used between Chrome and the Chrome OS -// daemon for establishing the connection from Android to the Chrome OS -// daemon. This is used so Chrome can proxy the OemCryptoService implementation -// over to the daemon and then also hand the daemon a Mojo connection to the -// GPU process for dealing with secure buffers. - -module arc_oemcrypto.mojom; - -import "components/arc/mojom/oemcrypto.mojom"; -import "components/arc/mojom/protected_buffer_manager.mojom"; - -// OemCryptoHostDaemon is implemented by the OemCrypto daemon running in -// Chrome OS and has Connect called from the Browser process in Chrome. -// Next Method ID: 1 -interface OemCryptoHostDaemon { - Connect@0( - arc.mojom.OemCryptoService& oemcryptor, - pending_remote<arc.mojom.ProtectedBufferManager> protected_buffer_manager); -}; diff --git a/chromium/components/arc/mojom/pip.mojom b/chromium/components/arc/mojom/pip.mojom index ce620e0f570..8d38010bc40 100644 --- a/chromium/components/arc/mojom/pip.mojom +++ b/chromium/components/arc/mojom/pip.mojom @@ -28,7 +28,7 @@ interface PipHost { // Next Method ID: 3 interface PipInstance { // Establishes full-duplex communication with the host. - Init@0(PipHost host_ptr) => (); + Init@0(pending_remote<PipHost> host_remote) => (); // Instruct Android to close the current Android PIP window, if it exists. // This is used if the user initiates a Chrome side PIP window, since we diff --git a/chromium/components/arc/mojom/policy.mojom b/chromium/components/arc/mojom/policy.mojom index 71489020452..820e8a435be 100644 --- a/chromium/components/arc/mojom/policy.mojom +++ b/chromium/components/arc/mojom/policy.mojom @@ -98,10 +98,10 @@ interface PolicyHost { // Next Method ID: 4 interface PolicyInstance { // DEPRECATED: Please use Init@2 instead. - InitDeprecated@0(PolicyHost host_ptr); + InitDeprecated@0(pending_remote<PolicyHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=2] Init@2(PolicyHost host_ptr) => (); + [MinVersion=2] Init@2(pending_remote<PolicyHost> host_remote) => (); // Indicates some policies have changed OnPolicyUpdated@1(); diff --git a/chromium/components/arc/mojom/power.mojom b/chromium/components/arc/mojom/power.mojom index b3304bf856c..ac17a824e8c 100644 --- a/chromium/components/arc/mojom/power.mojom +++ b/chromium/components/arc/mojom/power.mojom @@ -36,10 +36,10 @@ interface PowerHost { // Next method ID: 7 interface PowerInstance { // DEPRECATED: Please use Init@5 instead. - InitDeprecated@0(PowerHost host_ptr); + InitDeprecated@0(pending_remote<PowerHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=4] Init@5(PowerHost host_ptr) => (); + [MinVersion=4] Init@5(pending_remote<PowerHost> host_remote) => (); // Alerts the instance to a change in interactive state. [MinVersion=1] SetInteractive@1(bool enabled); diff --git a/chromium/components/arc/mojom/print_spooler.mojom b/chromium/components/arc/mojom/print_spooler.mojom index c84183d2970..b0322e7e299 100644 --- a/chromium/components/arc/mojom/print_spooler.mojom +++ b/chromium/components/arc/mojom/print_spooler.mojom @@ -42,16 +42,17 @@ interface PrintSpoolerHost { // The |top_margin| is the height of the space at the top of the window. // The returned |host| will be null if errors occur while saving the print // document or locating the Android surface. - [MinVersion=1] StartPrintInCustomTab@0(handle scoped_handle, - int32 task_id, - int32 surface_id, - int32 top_margin, - PrintSessionInstance instance) + [MinVersion=1] StartPrintInCustomTab@0( + handle scoped_handle, + int32 task_id, + int32 surface_id, + int32 top_margin, + pending_remote<PrintSessionInstance> instance) => (PrintSessionHost? host); }; // Next method ID: 1 interface PrintSpoolerInstance { // Establishes full-duplex communication with the host. - [MinVersion=0] Init@0(PrintSpoolerHost host_ptr) => (); + [MinVersion=0] Init@0(pending_remote<PrintSpoolerHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/screen_capture.mojom b/chromium/components/arc/mojom/screen_capture.mojom index 960012ca016..ca72e9164f1 100644 --- a/chromium/components/arc/mojom/screen_capture.mojom +++ b/chromium/components/arc/mojom/screen_capture.mojom @@ -42,9 +42,9 @@ interface ScreenCaptureHost { // size should have the width/height of the buffers used // returns null interface in the case the permission was not granted, a valid // interface pointer otherwise - OpenSession@1(ScreenCaptureSessionNotifier notifier, - string package_name, Size size) => - (ScreenCaptureSession? session); + OpenSession@1(pending_remote<ScreenCaptureSessionNotifier> notifier, + string package_name, Size size) + => (pending_remote<ScreenCaptureSession>? session); }; // Implemented by Chrome for handling a screen capture session. @@ -61,7 +61,7 @@ interface ScreenCaptureSession { // Implemented by Android. interface ScreenCaptureInstance { // Establishes full-duplex communication with the host. - Init@0(ScreenCaptureHost host_ptr) => (); + Init@0(pending_remote<ScreenCaptureHost> host_remote) => (); }; // Implemented by Android as a callback mechanism. diff --git a/chromium/components/arc/mojom/timer.mojom b/chromium/components/arc/mojom/timer.mojom index 4d8760e3096..b79b3f4e521 100644 --- a/chromium/components/arc/mojom/timer.mojom +++ b/chromium/components/arc/mojom/timer.mojom @@ -50,5 +50,5 @@ interface TimerHost { // Next method ID: 1 interface TimerInstance { // Establishes full-duplex communication with the host. - Init@0(TimerHost host_ptr) => (); + Init@0(pending_remote<TimerHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/tts.mojom b/chromium/components/arc/mojom/tts.mojom index b013a1b2c21..540ac41f8c0 100644 --- a/chromium/components/arc/mojom/tts.mojom +++ b/chromium/components/arc/mojom/tts.mojom @@ -33,10 +33,10 @@ interface TtsHost { // Next Method ID: 4 interface TtsInstance { // DEPRECATED: Please use Init@3 instead. - InitDeprecated@0(TtsHost host_ptr); + InitDeprecated@0(pending_remote<TtsHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=1] Init@3(TtsHost host_ptr) => (); + [MinVersion=1] Init@3(pending_remote<TtsHost> host_remote) => (); // Sends an utterance to Android for synthesis. Speak@1(TtsUtterance utterance); diff --git a/chromium/components/arc/mojom/usb_host.mojom b/chromium/components/arc/mojom/usb_host.mojom index ff41f57cbaa..e31181baf9b 100644 --- a/chromium/components/arc/mojom/usb_host.mojom +++ b/chromium/components/arc/mojom/usb_host.mojom @@ -49,7 +49,7 @@ interface UsbHostHost { // Next method ID: 3 interface UsbHostInstance { // Establishes full-duplex communication with the host. - Init@0(UsbHostHost host_ptr) => (); + Init@0(pending_remote<UsbHostHost> host_remote) => (); // Notifies the instance of a new USB device. // Only packages in |event_receiver_packages| will receive broadcast. diff --git a/chromium/components/arc/mojom/video.mojom b/chromium/components/arc/mojom/video.mojom index 22f2558e8c9..f887d6690b0 100644 --- a/chromium/components/arc/mojom/video.mojom +++ b/chromium/components/arc/mojom/video.mojom @@ -24,22 +24,25 @@ interface VideoHost { // Next method ID: 2 interface VideoInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(VideoHost host_ptr); + InitDeprecated@0(pending_remote<VideoHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=5] Init@1(VideoHost host_ptr) => (); + [MinVersion=5] Init@1(pending_remote<VideoHost> host_remote) => (); }; // Deprecated method IDs: 0 // Next method ID: 4 interface VideoAcceleratorFactory { [MinVersion=1] - CreateEncodeAccelerator@1(VideoEncodeAccelerator& video_encoder); + CreateEncodeAccelerator@1( + pending_receiver<VideoEncodeAccelerator> video_encoder); [MinVersion=6] - CreateDecodeAccelerator@2(VideoDecodeAccelerator& video_decoder); + CreateDecodeAccelerator@2( + pending_receiver<VideoDecodeAccelerator> video_decoder); [Minversion=7] CreateProtectedBufferAllocator@3( - VideoProtectedBufferAllocator& video_protected_buffer_allocator); + pending_receiver<VideoProtectedBufferAllocator> + video_protected_buffer_allocator); }; diff --git a/chromium/components/arc/mojom/video_decode_accelerator.mojom b/chromium/components/arc/mojom/video_decode_accelerator.mojom index 56bf60dd8c3..d859c7f1eac 100644 --- a/chromium/components/arc/mojom/video_decode_accelerator.mojom +++ b/chromium/components/arc/mojom/video_decode_accelerator.mojom @@ -95,7 +95,7 @@ interface VideoDecodeAccelerator { // The caller needs to wait for the initialization result (returned by // callback) before calling any other methods. Initialize@0(VideoDecodeAcceleratorConfig config, - VideoDecodeClient client) => (Result result); + pending_remote<VideoDecodeClient> client) => (Result result); // Decodes the content in the shared memory of the bitstream buffer. The // callee needs to map the the shared memory to read the content and is diff --git a/chromium/components/arc/mojom/video_encode_accelerator.mojom b/chromium/components/arc/mojom/video_encode_accelerator.mojom index fc493685fcc..40231b20899 100644 --- a/chromium/components/arc/mojom/video_encode_accelerator.mojom +++ b/chromium/components/arc/mojom/video_encode_accelerator.mojom @@ -84,7 +84,7 @@ interface VideoEncodeAccelerator { [MinVersion=4] Initialize@9(VideoEncodeAcceleratorConfig config, - VideoEncodeClient client) => (Result result); + pending_remote<VideoEncodeClient> client) => (Result result); // Initializes the video encoder with specific configuration. Called once per // encoder construction. @@ -97,7 +97,8 @@ interface VideoEncodeAccelerator { // invoke any other methods before the callback. [MinVersion=1] InitializeDeprecated@7(VideoEncodeAcceleratorConfig config, - VideoEncodeClient client) => (bool success); + pending_remote<VideoEncodeClient> client) => + (bool success); // Encodes the given frame. // Parameters: diff --git a/chromium/components/arc/mojom/voice_interaction_arc_home.mojom b/chromium/components/arc/mojom/voice_interaction_arc_home.mojom index f91b1be6e4c..ba0e4a57adc 100644 --- a/chromium/components/arc/mojom/voice_interaction_arc_home.mojom +++ b/chromium/components/arc/mojom/voice_interaction_arc_home.mojom @@ -63,8 +63,9 @@ interface VoiceInteractionArcHomeHost { // Next method ID: 2 interface VoiceInteractionArcHomeInstance { // DEPRECATED: Please use Init@1 instead. - InitDeprecated@0(VoiceInteractionArcHomeHost host_ptr); + InitDeprecated@0(pending_remote<VoiceInteractionArcHomeHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=3] Init@1(VoiceInteractionArcHomeHost host_ptr) => (); + [MinVersion=3] Init@1( + pending_remote<VoiceInteractionArcHomeHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/voice_interaction_framework.mojom b/chromium/components/arc/mojom/voice_interaction_framework.mojom index 2873ad90dfa..3b1b055cbb3 100644 --- a/chromium/components/arc/mojom/voice_interaction_framework.mojom +++ b/chromium/components/arc/mojom/voice_interaction_framework.mojom @@ -50,10 +50,11 @@ struct VoiceInteractionStatus { // Deprecated method ID: 4 interface VoiceInteractionFrameworkInstance { // DEPRECATED: Please use Init@11 instead. - InitDeprecated@0(VoiceInteractionFrameworkHost host_ptr); + InitDeprecated@0(pending_remote<VoiceInteractionFrameworkHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=13] Init@11(VoiceInteractionFrameworkHost host_ptr) => (); + [MinVersion=13] Init@11( + pending_remote<VoiceInteractionFrameworkHost> host_remote) => (); // Starts the voice interaction session in container. // |homescreen_is_active| is true if the session was invoked when homescreen is active. diff --git a/chromium/components/arc/mojom/volume_mounter.mojom b/chromium/components/arc/mojom/volume_mounter.mojom index c8059971fa9..d919be789af 100644 --- a/chromium/components/arc/mojom/volume_mounter.mojom +++ b/chromium/components/arc/mojom/volume_mounter.mojom @@ -55,7 +55,7 @@ interface VolumeMounterHost { // Next Method ID: 2 interface VolumeMounterInstance { // Establishes full-duplex communication with the host. - [MinVersion=1] Init@0(VolumeMounterHost host_ptr) => (); + [MinVersion=1] Init@0(pending_remote<VolumeMounterHost> host_remote) => (); // Triggers a mount event in Android. OnMountEvent@1(MountPointInfo mount_point_info); diff --git a/chromium/components/arc/mojom/wake_lock.mojom b/chromium/components/arc/mojom/wake_lock.mojom index 44217547422..b1f689189b0 100644 --- a/chromium/components/arc/mojom/wake_lock.mojom +++ b/chromium/components/arc/mojom/wake_lock.mojom @@ -25,5 +25,5 @@ interface WakeLockHost { // Next method ID: 1 interface WakeLockInstance { // Establishes full-duplex communication with the host. - Init@0(WakeLockHost host_ptr) => (); + Init@0(pending_remote<WakeLockHost> host_remote) => (); }; diff --git a/chromium/components/arc/mojom/wallpaper.mojom b/chromium/components/arc/mojom/wallpaper.mojom index 3048e4560a7..cab9703c639 100644 --- a/chromium/components/arc/mojom/wallpaper.mojom +++ b/chromium/components/arc/mojom/wallpaper.mojom @@ -24,10 +24,10 @@ interface WallpaperHost { // Next method ID: 4 interface WallpaperInstance { // DEPRECATED: Please use Init@3 instead. - InitDeprecated@0(WallpaperHost host_ptr); + InitDeprecated@0(pending_remote<WallpaperHost> host_remote); // Establishes full-duplex communication with the host. - [MinVersion=3] Init@3(WallpaperHost host_ptr) => (); + [MinVersion=3] Init@3(pending_remote<WallpaperHost> host_remote) => (); // Notifies ArcWallpaperManagerService that wallpaper is changed. [MinVersion=1] OnWallpaperChanged@1([MinVersion=2] int32 wallpaper_id); |