diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-24 11:30:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-30 12:56:19 +0000 |
commit | 6036726eb981b6c4b42047513b9d3f4ac865daac (patch) | |
tree | 673593e70678e7789766d1f732eb51f613a2703b /chromium/chromeos | |
parent | 466052c4e7c052268fd931888cd58961da94c586 (diff) | |
download | qtwebengine-chromium-6036726eb981b6c4b42047513b9d3f4ac865daac.tar.gz |
BASELINE: Update Chromium to 70.0.3538.78
Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/chromeos')
29 files changed, 485 insertions, 96 deletions
diff --git a/chromium/chromeos/BUILD.gn b/chromium/chromeos/BUILD.gn index 88288395766..30e3c1f06fa 100644 --- a/chromium/chromeos/BUILD.gn +++ b/chromium/chromeos/BUILD.gn @@ -16,7 +16,7 @@ declare_args() { } component("chromeos") { - configs += [ "//third_party/nss:system_nss_no_ssl_config" ] + configs += [ "//build/config/linux/nss:system_nss_no_ssl_config" ] public_deps = [ "//dbus", ] @@ -58,9 +58,6 @@ component("chromeos") { "//ui/gfx/geometry", # For accelerometer. "//url", ] - data_deps = [ - ":dbus_service_files", - ] sources = [ "accelerometer/accelerometer_reader.cc", "accelerometer/accelerometer_reader.h", @@ -227,6 +224,8 @@ component("chromeos") { "dbus/fake_media_analytics_client.h", "dbus/fake_modem_messaging_client.cc", "dbus/fake_modem_messaging_client.h", + "dbus/fake_oobe_configuration_client.cc", + "dbus/fake_oobe_configuration_client.h", "dbus/fake_permission_broker_client.cc", "dbus/fake_permission_broker_client.h", "dbus/fake_power_manager_client.cc", @@ -271,6 +270,8 @@ component("chromeos") { "dbus/media_analytics_client.h", "dbus/modem_messaging_client.cc", "dbus/modem_messaging_client.h", + "dbus/oobe_configuration_client.cc", + "dbus/oobe_configuration_client.h", "dbus/permission_broker_client.cc", "dbus/permission_broker_client.h", "dbus/pipe_reader.cc", @@ -279,20 +280,8 @@ component("chromeos") { "dbus/power_manager_client.h", "dbus/power_policy_controller.cc", "dbus/power_policy_controller.h", - "dbus/services/chrome_features_service_provider.cc", - "dbus/services/chrome_features_service_provider.h", "dbus/services/cros_dbus_service.cc", "dbus/services/cros_dbus_service.h", - "dbus/services/drive_file_stream_service_provider.cc", - "dbus/services/drive_file_stream_service_provider.h", - "dbus/services/liveness_service_provider.cc", - "dbus/services/liveness_service_provider.h", - "dbus/services/proxy_resolution_service_provider.cc", - "dbus/services/proxy_resolution_service_provider.h", - "dbus/services/virtual_file_request_service_provider.cc", - "dbus/services/virtual_file_request_service_provider.h", - "dbus/services/vm_applications_service_provider.cc", - "dbus/services/vm_applications_service_provider.h", "dbus/session_manager_client.cc", "dbus/session_manager_client.h", "dbus/shill_client_helper.cc", @@ -319,6 +308,8 @@ component("chromeos") { "dbus/update_engine_client.h", "dbus/upstart_client.cc", "dbus/upstart_client.h", + "dbus/util/account_identifier_operators.cc", + "dbus/util/account_identifier_operators.h", "dbus/util/tpm_util.cc", "dbus/util/tpm_util.h", "dbus/util/version_loader.cc", @@ -327,6 +318,8 @@ component("chromeos") { "dbus/virtual_file_provider_client.h", "dbus/volume_state.cc", "dbus/volume_state.h", + "disks/disk.cc", + "disks/disk.h", "disks/disk_mount_manager.cc", "disks/disk_mount_manager.h", "disks/suspend_unmount_manager.cc", @@ -500,6 +493,7 @@ component("chromeos") { "network/shill_property_util.h", "network/tether_constants.cc", "network/tether_constants.h", + "policy_certificate_provider.h", "printing/ppd_cache.cc", "printing/ppd_cache.h", "printing/ppd_line_reader.cc", @@ -563,22 +557,6 @@ component("chromeos") { } } -copy("dbus_service_files") { - sources = [ - "dbus/services/org.chromium.ChromeFeaturesService.conf", - "dbus/services/org.chromium.DisplayService.conf", - "dbus/services/org.chromium.DriveFileStreamService.conf", - "dbus/services/org.chromium.KioskAppService.conf", - "dbus/services/org.chromium.LivenessService.conf", - "dbus/services/org.chromium.NetworkProxyService.conf", - "dbus/services/org.chromium.VirtualFileRequestService.conf", - "dbus/services/org.chromium.VmApplicationsService.conf", - ] - outputs = [ - "$root_out_dir/dbus/{{source_file_part}}", - ] -} - # This must be a static library instead of a source set because some of the # files pull in things with dependencies that aren't linked in all cases. # @@ -635,6 +613,8 @@ static_library("test_support") { "network/mock_managed_network_configuration_handler.h", "network/mock_network_device_handler.cc", "network/mock_network_device_handler.h", + "network/mock_network_state_handler.cc", + "network/mock_network_state_handler.h", "network/network_state_test.cc", "network/network_state_test.h", "network/onc/onc_test_utils.cc", @@ -675,7 +655,7 @@ static_library("test_support_without_gmock") { test("chromeos_unittests") { configs += [ "//build/config/linux/dbus", - "//third_party/nss:system_nss_no_ssl_config", + "//build/config/linux/nss:system_nss_no_ssl_config", ] deps = [ ":attestation_proto", @@ -732,7 +712,6 @@ test("chromeos_unittests") { "dbus/power_manager_client_unittest.cc", "dbus/power_policy_controller_unittest.cc", "dbus/services/cros_dbus_service_unittest.cc", - "dbus/services/proxy_resolution_service_provider_unittest.cc", "dbus/shill_client_unittest_base.cc", "dbus/shill_client_unittest_base.h", "dbus/shill_device_client_unittest.cc", @@ -743,6 +722,7 @@ test("chromeos_unittests") { "dbus/shill_third_party_vpn_driver_client_unittest.cc", "dbus/util/version_loader_unittest.cc", "disks/disk_mount_manager_unittest.cc", + "disks/disk_unittest.cc", "disks/suspend_unmount_manager_unittest.cc", "geolocation/simple_geolocation_unittest.cc", "login/auth/authpolicy_login_helper_unittest.cc", @@ -818,6 +798,10 @@ test("chromeos_unittests") { if (cros_board != "") { generate_vm_runner_script("cros_vm_launcher") { generated_script = "$root_build_dir/bin/launch_cros_vm" + + # Assume every time we build cros_vm_launcher, we also build chrome and + # want to deploy it to the VM. + deploy_chrome = true } # The sanity test's actual binary is baked into the vm image. All we need to @@ -832,10 +816,32 @@ if (cros_board != "") { # need the toolchain in the data. need_toolchain = true } + + group("cros_chrome_deploy") { + # The following run-time dependencies are needed to deploy chrome to a + # ChromeOS device. See the link for the full list: + # https://codesearch.chromium.org/chromium/src/third_party/chromite/lib/chrome_util.py?l=341 + # Most of these are copy targets, for which GN doesn't add their outputs + # as runtime-deps. See the link below for more details: + # https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/reference.md#actions-and-copies + data_deps = [ + "//chrome:xdg_mime", + "//mojo/core:shared_library_arc32", + "//mojo/core:shared_library_arc64", + ] + + # TODO(bpastene): Figure out what's generating resources/chromeos/ and + # declare it as a dep instead of adding the dir directly. + data = [ + "$root_out_dir/resources/chromeos/", + ] + } + group("cros_vm_sanity_test") { testonly = true write_runtime_deps = "$root_out_dir/cros_vm_sanity_test.runtime_deps" data_deps = [ + ":cros_chrome_deploy", "//:chromiumos_preflight", # Builds the browser. ":cros_vm_sanity_test_wrapper", # Builds the test wrapper. ] diff --git a/chromium/chromeos/components/drivefs/BUILD.gn b/chromium/chromeos/components/drivefs/BUILD.gn index 2892b24fd4e..b6aaff101aa 100644 --- a/chromium/chromeos/components/drivefs/BUILD.gn +++ b/chromium/chromeos/components/drivefs/BUILD.gn @@ -6,8 +6,6 @@ assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") component("drivefs") { sources = [ - "drive_file_stream_service_provider_delegate.cc", - "drive_file_stream_service_provider_delegate.h", "drivefs_host.cc", "drivefs_host.h", "drivefs_host_observer.h", @@ -27,6 +25,7 @@ component("drivefs") { "//mojo/public/cpp/platform", "//net", "//services/identity/public/mojom", + "//services/network/public/cpp:cpp", "//services/service_manager/public/cpp", ] defines = [ "IS_DRIVEFS_IMPL" ] @@ -63,6 +62,7 @@ source_set("unit_tests") { "//mojo/public/cpp/bindings", "//net", "//services/identity/public/mojom", + "//services/network/public/cpp:cpp", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp/test:test_support", "//testing/gmock", diff --git a/chromium/chromeos/components/drivefs/mojom/drivefs.mojom b/chromium/chromeos/components/drivefs/mojom/drivefs.mojom index 1e75a03f346..5eb0461992b 100644 --- a/chromium/chromeos/components/drivefs/mojom/drivefs.mojom +++ b/chromium/chromeos/components/drivefs/mojom/drivefs.mojom @@ -29,6 +29,13 @@ interface DriveFs { // Sets the file at |path| to pinned or unpinned depending on the value of // |pinned|. SetPinned(mojo_base.mojom.FilePath path, bool pinned) => (FileError error); + + // Update DriveFS with the current network state, including whether the + // network is available and whether syncing should be paused. + UpdateNetworkState(bool pause_syncing, bool is_offline); + + // Reset DriveFS cache. + ResetCache() => (FileError error); }; // Implemented by Chrome, used from DriveFS. diff --git a/chromium/chromeos/components/nearby/BUILD.gn b/chromium/chromeos/components/nearby/BUILD.gn index 07b777a091c..1530795ac8a 100644 --- a/chromium/chromeos/components/nearby/BUILD.gn +++ b/chromium/chromeos/components/nearby/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. +# Copyright 2018 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. @@ -6,11 +6,29 @@ assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") static_library("nearby") { sources = [ + "atomic_boolean_impl.cc", + "atomic_boolean_impl.h", + "atomic_reference_impl.h", + "condition_variable_impl.cc", + "condition_variable_impl.h", "count_down_latch_impl.cc", "count_down_latch_impl.h", "hash_utils_impl.cc", "hash_utils_impl.h", + "lock_base.h", + "lock_impl.cc", + "lock_impl.h", + "multi_thread_executor_impl.cc", + "multi_thread_executor_impl.h", + "scheduled_executor_impl.cc", + "scheduled_executor_impl.h", "settable_future_impl.h", + "single_thread_executor_impl.cc", + "single_thread_executor_impl.h", + "submittable_executor_base.cc", + "submittable_executor_base.h", + "system_clock_impl.cc", + "system_clock_impl.h", "thread_utils_impl.cc", "thread_utils_impl.h", ] @@ -26,9 +44,15 @@ source_set("unit_tests") { testonly = true sources = [ - "count_down_latch_impl_unittests.cc", - "hash_utils_impl_unittests.cc", - "settable_future_impl_unittests.cc", + "atomic_boolean_impl_unittest.cc", + "atomic_reference_impl_unittest.cc", + "condition_variable_impl_unittest.cc", + "count_down_latch_impl_unittest.cc", + "hash_utils_impl_unittest.cc", + "lock_impl_unittest.cc", + "scheduled_executor_impl_unittest.cc", + "settable_future_impl_unittest.cc", + "submittable_executor_base_unittest.cc", ] deps = [ diff --git a/chromium/chromeos/components/nearby/library/BUILD.gn b/chromium/chromeos/components/nearby/library/BUILD.gn index 367c8edec79..a4835b252a1 100644 --- a/chromium/chromeos/components/nearby/library/BUILD.gn +++ b/chromium/chromeos/components/nearby/library/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. +# Copyright 2018 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. @@ -6,12 +6,27 @@ assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") static_library("library") { sources = [ + "atomic_boolean.h", + "atomic_reference.h", "byte_array.h", + "callable.h", + "cancelable.h", + "condition_variable.h", + "config.h", "count_down_latch.h", + "down_cast.h", "exception.h", + "executor.h", "future.h", "hash_utils.h", + "lock.h", + "multi_thread_executor.h", + "runnable.h", + "scheduled_executor.h", "settable_future.h", + "single_thread_executor.h", + "submittable_executor.h", + "system_clock.h", "thread_utils.h", ] diff --git a/chromium/chromeos/components/proximity_auth/BUILD.gn b/chromium/chromeos/components/proximity_auth/BUILD.gn index f37bd5d71e5..17c9c5fd93b 100644 --- a/chromium/chromeos/components/proximity_auth/BUILD.gn +++ b/chromium/chromeos/components/proximity_auth/BUILD.gn @@ -55,6 +55,11 @@ static_library("proximity_auth") { "//chromeos", "//chromeos/components/proximity_auth/logging", "//chromeos/components/proximity_auth/public/interfaces", + + # TODO(hansberry): Remove this dependency once https://crbug.com/870123 is + # fixed. + "//chromeos/services/multidevice_setup/public/cpp", + "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/secure_channel/public/cpp/client", "//chromeos/services/secure_channel/public/mojom", "//components/account_id", @@ -116,6 +121,10 @@ source_set("unit_tests") { "//chromeos", "//chromeos/components/proximity_auth/logging", "//chromeos/components/proximity_auth/logging:unit_tests", + + # TODO(hansberry): Remove this dependency once https://crbug.com/870123 is + # fixed. + "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/secure_channel/public/cpp/client:test_support", "//components/cryptauth:test_support", "//components/prefs:test_support", diff --git a/chromium/chromeos/components/proximity_auth/webui/BUILD.gn b/chromium/chromeos/components/proximity_auth/webui/BUILD.gn index 5cbf7e363df..067bc0f8c22 100644 --- a/chromium/chromeos/components/proximity_auth/webui/BUILD.gn +++ b/chromium/chromeos/components/proximity_auth/webui/BUILD.gn @@ -10,8 +10,6 @@ static_library("webui") { "proximity_auth_ui.h", "proximity_auth_webui_handler.cc", "proximity_auth_webui_handler.h", - "reachable_phone_flow.cc", - "reachable_phone_flow.h", "url_constants.cc", "url_constants.h", ] diff --git a/chromium/chromeos/components/tether/BUILD.gn b/chromium/chromeos/components/tether/BUILD.gn index e9ea1d7c182..fdffc1d877d 100644 --- a/chromium/chromeos/components/tether/BUILD.gn +++ b/chromium/chromeos/components/tether/BUILD.gn @@ -136,6 +136,8 @@ static_library("tether") { "//chromeos/components/proximity_auth/logging", "//chromeos/components/tether/proto", "//chromeos/services/device_sync/public/cpp", + "//chromeos/services/multidevice_setup/public/cpp:cpp", + "//chromeos/services/multidevice_setup/public/mojom:mojom", "//chromeos/services/secure_channel/public/cpp/client", "//chromeos/services/secure_channel/public/mojom", @@ -303,6 +305,8 @@ source_set("unit_tests") { # TODO(hansberry): Remove //chromeos/services/secure_channel dependency when # SecureChannelClient migration is complete. "//chromeos/services/device_sync/public/mojom", + "//chromeos/services/multidevice_setup/public/cpp:test_support", + "//chromeos/services/multidevice_setup/public/mojom:mojom", "//chromeos/services/secure_channel", "//chromeos/services/secure_channel:test_support", "//chromeos/services/secure_channel/public/cpp/client:test_support", diff --git a/chromium/chromeos/ime/BUILD.gn b/chromium/chromeos/ime/BUILD.gn index c471ca415fb..62cbe0cfe8d 100644 --- a/chromium/chromeos/ime/BUILD.gn +++ b/chromium/chromeos/ime/BUILD.gn @@ -11,7 +11,7 @@ action("gencode") { "$target_gen_dir/input_methods.h", ] args = [ - rebase_path("//chromeos/ime/input_methods.txt"), - rebase_path("$target_gen_dir/input_methods.h"), + rebase_path("//chromeos/ime/input_methods.txt", root_build_dir), + rebase_path("$target_gen_dir/input_methods.h", root_build_dir), ] } diff --git a/chromium/chromeos/services/BUILD.gn b/chromium/chromeos/services/BUILD.gn index 047dc25e4ea..b9cd9776ede 100644 --- a/chromium/chromeos/services/BUILD.gn +++ b/chromium/chromeos/services/BUILD.gn @@ -22,6 +22,7 @@ source_set("unit_tests") { testonly = true deps = [ "//chromeos/services/device_sync:unit_tests", + "//chromeos/services/machine_learning/public/cpp:unit_tests", "//chromeos/services/multidevice_setup:unit_tests", "//chromeos/services/secure_channel:unit_tests", ] @@ -35,29 +36,23 @@ source_set("unit_tests") { # corresponding catalog entries in the "chromeos_services_unittests_catalog" # target below. service_test("chromeos_services_unittests") { - deps = [] + deps = [ + "//chromeos/services/ime:unit_tests", + ] if (enable_cros_assistant) { deps += [ "//chromeos/services/assistant:tests" ] } - if (enable_cros_ime_service) { - deps += [ "//chromeos/services/ime:unit_tests" ] - } - catalog = ":chromeos_services_unittests_catalog" } catalog("chromeos_services_unittests_catalog") { testonly = true - catalog_deps = [] + catalog_deps = [ "//chromeos/services/ime:tests_catalog" ] if (enable_cros_assistant) { catalog_deps += [ "//chromeos/services/assistant:tests_catalog" ] } - - if (enable_cros_ime_service) { - catalog_deps += [ "//chromeos/services/ime:tests_catalog" ] - } } diff --git a/chromium/chromeos/services/assistant/BUILD.gn b/chromium/chromeos/services/assistant/BUILD.gn index 720e1275ea9..75af4beddd1 100644 --- a/chromium/chromeos/services/assistant/BUILD.gn +++ b/chromium/chromeos/services/assistant/BUILD.gn @@ -49,12 +49,16 @@ source_set("lib") { "assistant_settings_manager_impl.h", "platform/audio_input_provider_impl.cc", "platform/audio_input_provider_impl.h", + "platform/audio_media_data_source.cc", + "platform/audio_media_data_source.h", + "platform/audio_output_provider_impl.cc", + "platform/audio_output_provider_impl.h", + "platform/audio_stream_handler.cc", + "platform/audio_stream_handler.h", "platform/file_provider_impl.cc", "platform/file_provider_impl.h", "platform/network_provider_impl.cc", "platform/network_provider_impl.h", - "platform/resource_provider_impl.cc", - "platform/resource_provider_impl.h", "platform/system_provider_impl.cc", "platform/system_provider_impl.h", "platform_api_impl.cc", @@ -69,7 +73,7 @@ source_set("lib") { "//chromeos/assistant/internal/proto/google3", "//libassistant/contrib/core", "//libassistant/contrib/platform/audio", - "//libassistant/shared/internal_api/c:api_wrappers_for_caller_no_chromium", + "//libassistant/shared/internal_api/c:api_wrappers_entrypoint", "//libassistant/shared/public", "//libassistant/shared/public:export", "//ui/base", @@ -108,7 +112,10 @@ source_set("tests") { ] if (enable_cros_libassistant) { - sources += [ "platform/system_provider_impl_unittest.cc" ] + sources += [ + "platform/audio_output_provider_impl_unittest.cc", + "platform/system_provider_impl_unittest.cc", + ] } } diff --git a/chromium/chromeos/services/assistant/audio_decoder/BUILD.gn b/chromium/chromeos/services/assistant/audio_decoder/BUILD.gn new file mode 100644 index 00000000000..6c6a3bf7f23 --- /dev/null +++ b/chromium/chromeos/services/assistant/audio_decoder/BUILD.gn @@ -0,0 +1,38 @@ +# Copyright 2018 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. + +import("//chromeos/assistant/assistant.gni") + +import("//services/service_manager/public/service_manifest.gni") + +assert(enable_cros_libassistant) + +source_set("lib") { + sources = [ + "assistant_audio_decoder.cc", + "assistant_audio_decoder.h", + "assistant_audio_decoder_factory.cc", + "assistant_audio_decoder_factory.h", + "assistant_audio_decoder_service.cc", + "assistant_audio_decoder_service.h", + "ipc_data_source.cc", + "ipc_data_source.h", + ] + + deps = [ + "//base", + "//chromeos/services/assistant/public/mojom", + ] + + public_deps = [ + "//media", + "//mojo/public/cpp/bindings:bindings", + "//services/service_manager/public/cpp:cpp", + ] +} + +service_manifest("manifest") { + name = "assistant_audio_decoder" + source = "manifest.json" +} diff --git a/chromium/chromeos/services/assistant/public/mojom/BUILD.gn b/chromium/chromeos/services/assistant/public/mojom/BUILD.gn index 2da375ceac5..a01ba59c3a4 100644 --- a/chromium/chromeos/services/assistant/public/mojom/BUILD.gn +++ b/chromium/chromeos/services/assistant/public/mojom/BUILD.gn @@ -7,6 +7,7 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { sources = [ "assistant.mojom", + "assistant_audio_decoder.mojom", "constants.mojom", "settings.mojom", ] diff --git a/chromium/chromeos/services/assistant/public/mojom/assistant.mojom b/chromium/chromeos/services/assistant/public/mojom/assistant.mojom index 6f86637dafc..a9438f73ff5 100644 --- a/chromium/chromeos/services/assistant/public/mojom/assistant.mojom +++ b/chromium/chromeos/services/assistant/public/mojom/assistant.mojom @@ -12,6 +12,17 @@ import "mojo/public/mojom/base/time.mojom"; // Interface to communicate with assistant backend. interface Assistant { + // Starts a cached screen context interaction. Results related to the screen + // context will be returned through the |AssistantInteractionSubscriber| + // interface to registered subscribers. It is illegal to call this method + // without having first cached screen context (see CacheScreenContext()). + StartCachedScreenContextInteraction(); + + // Starts a metalayer interaction for the selected screen |region|. Results + // related to the selected region will be returned through the + // |AssistantInteractionSubscriber| interface to registered subscribers. + StartMetalayerInteraction(gfx.mojom.Rect region); + // Starts a new Assistant voice interaction. StartVoiceInteraction(); @@ -41,15 +52,17 @@ interface Assistant { // Dismisses a notification. DismissNotification(AssistantNotification notification); - // Asks assistant to grab screen context. |region| controls the part of the - // screen to snapshot. If |region| is empty, it takes fullscreen screenshot. - // After grabbing completion, the callback will be invoked. - RequestScreenContext(gfx.mojom.Rect region) => (); + // Caches screen context, made up of view hierarchy and screenshot data. + // Screen context is used to provide additional context alongside text and + // voice queries, and may also be used in standalone screen context + // interactions (see StartCachedScreenContextInteraction()). + CacheScreenContext() => (); }; -// Subscribes to assistant's interaction event. Responses from the assistant may -// contain untrusted third-party content. Subscriber implementations must be -// sure to handle the response data appropriately. +// Subscribes to assistant's interaction event. These events are server driven +// in response to the user's direct interaction with the assistant. Responses +// from the assistant may contain untrusted third-party content. Subscriber +// implementations must be sure to handle the response data appropriately. interface AssistantInteractionSubscriber { // Assistant interaction has started. In the event of a voice interaction, // |is_voice_interaction| will be true. This implies that the mic is open. @@ -85,9 +98,14 @@ interface AssistantInteractionSubscriber { // Assistant got an instantaneous speech level update in dB. OnSpeechLevelUpdated(float speech_level); + + // Assistant has started speaking. When TTS is started due to an error that + // occurred during the interaction, |due_to_error| is true. + OnTtsStarted(bool due_to_error); }; -// Subscribes to assistant's notification event. +// Subscribes to assistant's notification event. These events are server +// driven and pertain to push notifications. interface AssistantNotificationSubscriber { // Assistant got notification from server. OnShowNotification(AssistantNotification notification); @@ -140,6 +158,9 @@ interface AudioInputObserver { interface DeviceActions { // Enables or disables WiFi. SetWifiEnabled(bool enabled); + + // Enables or disables Bluetooth. + SetBluetoothEnabled(bool enabled); }; // Enumeration of possible completions for an Assistant interaction. @@ -150,6 +171,8 @@ enum AssistantInteractionResolution { kInterruption, // Assistant interaction completed due to error. kError, + // Assistant interaction completed due to mic timeout. + kMicTimeout, // Assistant interaction completed due to multi-device hotword loss. kMultiDeviceHotwordLoss, }; diff --git a/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom b/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom new file mode 100644 index 00000000000..009bb5b8edc --- /dev/null +++ b/chromium/chromeos/services/assistant/public/mojom/assistant_audio_decoder.mojom @@ -0,0 +1,39 @@ +// Copyright 2018 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. + +module chromeos.assistant.mojom; + +// A factory for creating an assistant audio decoder. +interface AssistantAudioDecoderFactory { + // Creates an AssistantAudioDecoder to decode audio stream data from + // |data_source|. + // |client|'s methods will be called when certain events happen. + CreateAssistantAudioDecoder(AssistantAudioDecoder& audio_decoder, + AssistantAudioDecoderClient client, + AssistantMediaDataSource data_source); +}; + +// Interface to communicate with assistant audio decoder service. +interface AssistantAudioDecoder { + // Reads the audio data format. + OpenDecoder() => (bool success, + int32 bytes_per_sample, + int32 samples_per_second, + int32 channels); + + // Reads the audio data and decodes. + Decode(); +}; + +// Interface for assistant audio decoder service to call into client. +interface AssistantAudioDecoderClient { + // Called when new audio buffers have been decoded. + // |buffers| are in interleaved format. + OnNewBuffers(array<array<uint8>> buffers); +}; + +// Interface used to read data from the calling process. +interface AssistantMediaDataSource { + Read(int32 size) => (array<uint8> data); +}; diff --git a/chromium/chromeos/services/assistant/public/mojom/constants.mojom b/chromium/chromeos/services/assistant/public/mojom/constants.mojom index 01cdfe73cb4..a2843512e11 100644 --- a/chromium/chromeos/services/assistant/public/mojom/constants.mojom +++ b/chromium/chromeos/services/assistant/public/mojom/constants.mojom @@ -5,3 +5,7 @@ module chromeos.assistant.mojom; const string kServiceName = "assistant"; + +// The service name hosting the audio parser and decoder service for Chrome OS +// native assistant. +const string kAudioDecoderServiceName = "assistant_audio_decoder"; diff --git a/chromium/chromeos/services/device_sync/BUILD.gn b/chromium/chromeos/services/device_sync/BUILD.gn index 5f4fd169299..db010aba9c7 100644 --- a/chromium/chromeos/services/device_sync/BUILD.gn +++ b/chromium/chromeos/services/device_sync/BUILD.gn @@ -90,6 +90,7 @@ source_set("unit_tests") { "//components/gcm_driver:test_support", "//components/prefs:test_support", "//services/identity/public/cpp:test_support", + "//services/network:test_support", "//services/service_manager/public/cpp:service_test_support", "//services/service_manager/public/cpp/test:test_support", "//testing/gtest", diff --git a/chromium/chromeos/services/device_sync/public/cpp/BUILD.gn b/chromium/chromeos/services/device_sync/public/cpp/BUILD.gn index e669708a0b1..9bd235916fa 100644 --- a/chromium/chromeos/services/device_sync/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/device_sync/public/cpp/BUILD.gn @@ -58,6 +58,7 @@ source_set("unit_tests") { "//components/gcm_driver:test_support", "//net", "//services/identity/public/cpp:test_support", + "//services/network:test_support", "//services/service_manager/public/cpp:service_test_support", "//services/service_manager/public/cpp/test:test_support", "//testing/gtest", diff --git a/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom b/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom index 19090b09378..06f1e3f06df 100644 --- a/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom +++ b/chromium/chromeos/services/device_sync/public/mojom/device_sync.mojom @@ -86,8 +86,10 @@ struct BeaconSeed { // Metadata describing a remote device with which the current device can // communicate. struct RemoteDevice { - // Public key used to authenticate a communication channel. - string public_key; + // Unique identifier of the device. Unlike |public_key|, this field is + // guaranteed to be human-readable (i.e., it does not contain non-ASCII + // characters). + string device_id; // Identifier for the user to whom this device is registered. string user_id; diff --git a/chromium/chromeos/services/ime/BUILD.gn b/chromium/chromeos/services/ime/BUILD.gn index c7c2e3a4055..173d82e43d3 100644 --- a/chromium/chromeos/services/ime/BUILD.gn +++ b/chromium/chromeos/services/ime/BUILD.gn @@ -7,8 +7,7 @@ import("//services/catalog/public/tools/catalog.gni") import("//services/service_manager/public/cpp/service.gni") import("//services/service_manager/public/service_manifest.gni") -assert(is_chromeos) -assert(enable_cros_ime_service) +assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos") source_set("lib") { sources = [ @@ -44,10 +43,11 @@ source_set("unit_tests") { deps = [ ":lib", "//base", + "//chromeos/services/ime/public/mojom", "//mojo/public/cpp/bindings", - "//services/identity/public/mojom", "//services/service_manager/public/cpp", "//services/service_manager/public/cpp:service_test_support", + "//testing/gmock", ] sources = [ "ime_service_unittest.cc", diff --git a/chromium/chromeos/services/ime/public/cpp/BUILD.gn b/chromium/chromeos/services/ime/public/cpp/BUILD.gn index fdac14d3f93..520a0d2cec1 100644 --- a/chromium/chromeos/services/ime/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/ime/public/cpp/BUILD.gn @@ -9,8 +9,18 @@ buildflag_header("buildflags") { header = "buildflags.h" flags = [ - "ENABLE_CROS_IME_SERVICE=$enable_cros_ime_service", "ENABLE_CROS_IME_DECODER=$enable_cros_ime_decoder", "ENABLE_CROS_IME_EXAMPLE_SO=$enable_cros_ime_example_so", ] } + +source_set("features") { + sources = [ + "features.cc", + "features.h", + ] + + deps = [ + "//base", + ] +} diff --git a/chromium/chromeos/services/ime/public/features.gni b/chromium/chromeos/services/ime/public/features.gni index d44d63d2b02..bd85e2f6e13 100644 --- a/chromium/chromeos/services/ime/public/features.gni +++ b/chromium/chromeos/services/ime/public/features.gni @@ -3,12 +3,7 @@ # found in the LICENSE file. declare_args() { - # Enable IME Mojo service. IME Mojo service related code is compiled only - # when true. The default IME Mojo service implementation is m17n. - enable_cros_ime_service = false - - # Enable a full featured IME implementation with decoders. This requires - # enable_cros_ime_service also enabled. + # Enable a full featured IME implementation with decoders. enable_cros_ime_decoder = false # Enable build an example deocder shared library from local checkout. diff --git a/chromium/chromeos/services/ime/public/mojom/constants.mojom b/chromium/chromeos/services/ime/public/mojom/constants.mojom index 9bcb91cbe85..a049e48a08f 100644 --- a/chromium/chromeos/services/ime/public/mojom/constants.mojom +++ b/chromium/chromeos/services/ime/public/mojom/constants.mojom @@ -4,4 +4,4 @@ module chromeos.ime.mojom; -const string kServiceName = "ime_service"; +const string kServiceName = "ime"; diff --git a/chromium/chromeos/services/machine_learning/public/cpp/BUILD.gn b/chromium/chromeos/services/machine_learning/public/cpp/BUILD.gn index d714aa3d076..868c98eae62 100644 --- a/chromium/chromeos/services/machine_learning/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/machine_learning/public/cpp/BUILD.gn @@ -15,3 +15,19 @@ source_set("cpp") { "//chromeos/services/machine_learning/public/mojom", ] } + +source_set("unit_tests") { + testonly = true + sources = [ + "service_connection_unittest.cc", + ] + deps = [ + ":cpp", + "//base/test:test_support", + "//chromeos", + "//chromeos/services/machine_learning/public/mojom", + "//mojo/core/embedder", + "//mojo/public/cpp/bindings", + "//testing/gtest", + ] +} diff --git a/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom b/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom index 3095454a7eb..13e7166f901 100644 --- a/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom +++ b/chromium/chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom @@ -13,12 +13,8 @@ module chromeos.machine_learning.mojom; import "chromeos/services/machine_learning/public/mojom/model.mojom"; -interface ModelProvider { - // The ModelId inside ModelSpec is used to specify the model to be loaded. - LoadModel(ModelSpec spec, Model& request); -}; - // Top-level interface between Chromium and the ML Service daemon. interface MachineLearningService { - GetModelProvider(ModelProvider& request); + // The ModelId inside ModelSpec is used to specify the model to be loaded. + LoadModel(ModelSpec spec, Model& request); }; diff --git a/chromium/chromeos/services/multidevice_setup/BUILD.gn b/chromium/chromeos/services/multidevice_setup/BUILD.gn index 34dac4c30a3..91fbd954c3f 100644 --- a/chromium/chromeos/services/multidevice_setup/BUILD.gn +++ b/chromium/chromeos/services/multidevice_setup/BUILD.gn @@ -14,9 +14,15 @@ static_library("multidevice_setup") { "account_status_change_delegate_notifier.h", "account_status_change_delegate_notifier_impl.cc", "account_status_change_delegate_notifier_impl.h", + "device_reenroller.cc", + "device_reenroller.h", "eligible_host_devices_provider.h", "eligible_host_devices_provider_impl.cc", "eligible_host_devices_provider_impl.h", + "feature_state_manager.cc", + "feature_state_manager.h", + "feature_state_manager_impl.cc", + "feature_state_manager_impl.h", "host_backend_delegate.cc", "host_backend_delegate.h", "host_backend_delegate_impl.cc", @@ -48,10 +54,14 @@ static_library("multidevice_setup") { "//chromeos/services/device_sync/public/cpp", "//chromeos/services/device_sync/public/mojom", "//chromeos/services/multidevice_setup/proto", + "//chromeos/services/multidevice_setup/public/cpp:android_sms_app_helper_delegate", + "//chromeos/services/multidevice_setup/public/cpp:auth_token_validator", + "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/multidevice_setup/public/mojom", "//chromeos/services/secure_channel/public/cpp/client", "//chromeos/services/secure_channel/public/mojom", "//components/cryptauth", + "//components/cryptauth/proto:util", "//components/pref_registry", "//components/prefs:prefs", "//services/service_manager/public/cpp", @@ -72,6 +82,10 @@ static_library("test_support") { "fake_account_status_change_delegate_notifier.h", "fake_eligible_host_devices_provider.cc", "fake_eligible_host_devices_provider.h", + "fake_feature_state_manager.cc", + "fake_feature_state_manager.h", + "fake_feature_state_observer.cc", + "fake_feature_state_observer.h", "fake_host_backend_delegate.cc", "fake_host_backend_delegate.h", "fake_host_status_observer.cc", @@ -99,7 +113,9 @@ source_set("unit_tests") { sources = [ "account_status_change_delegate_notifier_impl_unittest.cc", + "device_reenroller_unittest.cc", "eligible_host_devices_provider_impl_unittest.cc", + "feature_state_manager_impl_unittest.cc", "host_backend_delegate_impl_unittest.cc", "host_status_provider_impl_unittest.cc", "host_verifier_impl_unittest.cc", @@ -114,6 +130,7 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//chromeos/services/device_sync/public/cpp:test_support", + "//chromeos/services/multidevice_setup/public/cpp:prefs", "//chromeos/services/multidevice_setup/public/cpp:test_support", "//chromeos/services/multidevice_setup/public/cpp:unit_tests", "//chromeos/services/multidevice_setup/public/mojom", diff --git a/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn b/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn index b81052de89f..4d36b56ff45 100644 --- a/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn +++ b/chromium/chromeos/services/multidevice_setup/public/cpp/BUILD.gn @@ -20,10 +20,58 @@ source_set("cpp") { ] } +source_set("auth_token_validator") { + sources = [ + "auth_token_validator.h", + ] + + deps = [ + "//base", + ] +} + +source_set("android_sms_app_helper_delegate") { + sources = [ + "android_sms_app_helper_delegate.h", + ] + + public_deps = [ + "//base", + ] +} + +source_set("prefs") { + sources = [ + "prefs.cc", + "prefs.h", + ] + + deps = [ + "//base", + "//components/prefs:prefs", + ] +} + +source_set("url_provider") { + sources = [ + "url_provider.cc", + "url_provider.h", + ] + + deps = [ + "//base", + "//chrome/common", + ] +} + static_library("test_support") { testonly = true sources = [ + "fake_android_sms_app_helper_delegate.cc", + "fake_android_sms_app_helper_delegate.h", + "fake_auth_token_validator.cc", + "fake_auth_token_validator.h", "fake_multidevice_setup.cc", "fake_multidevice_setup.h", "fake_multidevice_setup_client.cc", @@ -31,6 +79,8 @@ static_library("test_support") { ] public_deps = [ + ":android_sms_app_helper_delegate", + ":auth_token_validator", ":cpp", "//chromeos/services/multidevice_setup", "//chromeos/services/multidevice_setup/public/mojom", diff --git a/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom b/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom index 27546363684..01b762b547b 100644 --- a/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom +++ b/chromium/chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom @@ -42,6 +42,45 @@ enum HostStatus { kHostVerified }; +// Individual multi-device features types. +enum Feature { + kBetterTogetherSuite, + kInstantTethering, + kMessages, + kSmartLock +}; + +enum FeatureState { + // Feature was prohibited by a device policy (e.g., EDU or Enterprise). + kProhibitedByPolicy, + + // Feature was disabled by the user (i.e., via settings). + kDisabledByUser, + + // Feature was enabled by the user (i.e., via settings). + kEnabledByUser, + + // Feature is not supported by this Chromebook. + kNotSupportedByChromebook, + + // Feature is not supported by the current host phone device. + kNotSupportedByPhone, + + // The feature is unavailable because there is no verified multi-device host. + // To set a host, use SetHostDevice(); to verify a host, use + // RetrySetHostNow(). + kUnavailableNoVerifiedHost, + + // The feature is unavailable because there are insufficient security + // mechanisms in place (e.g., Smart Lock returns this value when the host + // phone device does not have a lock screen set). + kUnavailableInsufficientSecurity, + + // The feature has been enabled by the user, but it is still unavailable + // because the entire Better Together suite has been disabled by the user. + kUnavailableSuiteDisabled +}; + interface AccountStatusChangeDelegate { // Callback which indicates that one or more MultiDevice host phones are // available for setup with the MultiDevice setup flow. This function is only @@ -51,8 +90,9 @@ interface AccountStatusChangeDelegate { // Callback which indicates that the currently-connected MultiDevice host has // changed. This likely means that the user has changed MultiDevice settings // on another device. This function is only called if the current user has - // already set up MultiDevice features. - OnConnectedHostSwitchedForExistingUser(); + // already set up MultiDevice features. Note: |new_host_device_name| is + // expected to be a UTF-8 string. + OnConnectedHostSwitchedForExistingUser(string new_host_device_name); // Callback which indicates that a new Chromebook was added to the account of // the current user. This function is only called if the current user has @@ -68,6 +108,11 @@ interface HostStatusObserver { chromeos.device_sync.mojom.RemoteDevice? host_device); }; +interface FeatureStateObserver { + // Invoked when one or more features have changed state. + OnFeatureStatesChanged(map<Feature, FeatureState> feature_states_map); +}; + // Provides an API to the MultiDevice Setup flow. Designed to be exposed // primarily to the MultiDevice setup flow at chrome://multidevice-setup (normal // usage) as well as the ProximityAuth debug WebUI page at @@ -82,20 +127,25 @@ interface MultiDeviceSetup { // HostStatusObserverPtr passed here. AddHostStatusObserver(HostStatusObserver observer); + // Adds an observer of feature state changes. To stop observing, disconnect + // the FeatureStateObserverPtr passed here. + AddFeatureStateObserver(FeatureStateObserver observer); + // Provides a list of all eligible host devices (i.e., those which can be // passed to SetHostDevice()). GetEligibleHostDevices() => (array<chromeos.device_sync.mojom.RemoteDevice> eligible_host_devices); // Sets the host associated with the provided public key as the host device - // for this account. When called when there is no current host or when the - // current host is a different device from the one passed, this function - // initiates a connection to the back-end and attempts to set the host. When - // called with the same device that is already the host, this function is a - // no-op. Returns a success boolean; the only way that this function can - // fail is if the provided public key does not correspond to an eligible host - // device on the account. - SetHostDevice(string public_key) => (bool success); + // for this account. The provided auth token must be valid in order to prove + // that the user is authenticated. If called when there is no current host or + // when the current host is a different device from the one passed, this + // function initiates a connection to the back-end and attempts to set the + // host. When called with the same device that is already the host, this + // function is a no-op. Returns a success boolean; this function will fail if + // the provided public key does not correspond to an eligible host device on + // the account, or the provided auth token is invalid. + SetHostDevice(string public_key, string auth_token) => (bool success); // Removes the currently-set host as the multi-device host for this account. // If there was no host set to begin with, this function is a no-op. @@ -107,6 +157,21 @@ interface MultiDeviceSetup { GetHostStatus() => (HostStatus host_status, chromeos.device_sync.mojom.RemoteDevice? host_device); + // Attempts to enable or disable |feature|. This function succeeds only if + // |feature|'s current state is FeatureState::kEnabledByUser or + // FeatureState::kDisabledByUser. + // + // A valid |auth_token| only needs to be provided if Smart Lock is being + // enabled. To be exact, this means a valid |auth_token| must be passed if + // |feature| == EASY_UNLOCK_CLIENT and |enabled| == true, or + // |feature| == BETTER_TOGETHER_CLIENT, |enabled| == true, and the pref for + // Smart Lock is already enabled. + SetFeatureEnabledState(Feature feature, bool enabled, string? auth_token) => + (bool success); + + // Provides the states of all Features. + GetFeatureStates() => (map<Feature, FeatureState> feature_states_map); + // Retries the most recent SetHostDevice() call. // // If the current status is diff --git a/chromium/chromeos/strings/BUILD.gn b/chromium/chromeos/strings/BUILD.gn new file mode 100644 index 00000000000..94cc2f21020 --- /dev/null +++ b/chromium/chromeos/strings/BUILD.gn @@ -0,0 +1,66 @@ +# Copyright 2018 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. + +import("//tools/grit/grit_rule.gni") + +grit("strings") { + source = "../chromeos_strings.grd" + outputs = [ + "grit/chromeos_strings.h", + "chromeos_strings_am.pak", + "chromeos_strings_ar.pak", + "chromeos_strings_bg.pak", + "chromeos_strings_bn.pak", + "chromeos_strings_ca.pak", + "chromeos_strings_cs.pak", + "chromeos_strings_da.pak", + "chromeos_strings_de.pak", + "chromeos_strings_el.pak", + "chromeos_strings_en-GB.pak", + "chromeos_strings_en-US.pak", + "chromeos_strings_es-419.pak", + "chromeos_strings_es.pak", + "chromeos_strings_et.pak", + "chromeos_strings_fake-bidi.pak", + "chromeos_strings_fa.pak", + "chromeos_strings_fil.pak", + "chromeos_strings_fi.pak", + "chromeos_strings_fr.pak", + "chromeos_strings_gu.pak", + "chromeos_strings_he.pak", + "chromeos_strings_hi.pak", + "chromeos_strings_hr.pak", + "chromeos_strings_hu.pak", + "chromeos_strings_id.pak", + "chromeos_strings_it.pak", + "chromeos_strings_ja.pak", + "chromeos_strings_kn.pak", + "chromeos_strings_ko.pak", + "chromeos_strings_lt.pak", + "chromeos_strings_lv.pak", + "chromeos_strings_ml.pak", + "chromeos_strings_mr.pak", + "chromeos_strings_ms.pak", + "chromeos_strings_nb.pak", + "chromeos_strings_nl.pak", + "chromeos_strings_pl.pak", + "chromeos_strings_pt-BR.pak", + "chromeos_strings_pt-PT.pak", + "chromeos_strings_ro.pak", + "chromeos_strings_ru.pak", + "chromeos_strings_sk.pak", + "chromeos_strings_sl.pak", + "chromeos_strings_sr.pak", + "chromeos_strings_sv.pak", + "chromeos_strings_sw.pak", + "chromeos_strings_ta.pak", + "chromeos_strings_te.pak", + "chromeos_strings_th.pak", + "chromeos_strings_tr.pak", + "chromeos_strings_uk.pak", + "chromeos_strings_vi.pak", + "chromeos_strings_zh-CN.pak", + "chromeos_strings_zh-TW.pak", + ] +} |