summaryrefslogtreecommitdiff
path: root/chromium/chromeos/components
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-09-01 11:08:40 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-01 12:16:21 +0000
commit03c549e0392f92c02536d3f86d5e1d8dfa3435ac (patch)
treefe49d170a929b34ba82cd10db1a0bd8e3760fa4b /chromium/chromeos/components
parent5d013f5804a0d91fcf6c626b2d6fb6eca5c845b0 (diff)
downloadqtwebengine-chromium-03c549e0392f92c02536d3f86d5e1d8dfa3435ac.tar.gz
BASELINE: Update Chromium to 91.0.4472.160
Change-Id: I0def1f08a2412aeed79a9ab95dd50eb5c3f65f31 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chromeos/components')
-rw-r--r--chromium/chromeos/components/BUILD.gn18
-rw-r--r--chromium/chromeos/components/camera_app_ui/BUILD.gn45
-rw-r--r--chromium/chromeos/components/camera_app_ui/resources/css/css.gni7
-rw-r--r--chromium/chromeos/components/camera_app_ui/resources/images/images.gni12
-rw-r--r--chromium/chromeos/components/camera_app_ui/resources/js/BUILD.gn1
-rw-r--r--chromium/chromeos/components/camera_app_ui/resources/js/js.gni12
-rw-r--r--chromium/chromeos/components/camera_app_ui/resources/strings/BUILD.gn2
-rw-r--r--chromium/chromeos/components/cdm_factory_daemon/mojom/content_decryption_module.mojom1
-rw-r--r--chromium/chromeos/components/diagnostics_ui/BUILD.gn1
-rw-r--r--chromium/chromeos/components/diagnostics_ui/backend/BUILD.gn3
-rw-r--r--chromium/chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom11
-rw-r--r--chromium/chromeos/components/diagnostics_ui/resources/BUILD.gn10
-rw-r--r--chromium/chromeos/components/eche_app_ui/BUILD.gn87
-rw-r--r--chromium/chromeos/components/eche_app_ui/eche_app_ui.gni8
-rw-r--r--chromium/chromeos/components/eche_app_ui/mojom/BUILD.gn (renamed from chromium/chromeos/components/scanning/mojom/BUILD.gn)6
-rw-r--r--chromium/chromeos/components/eche_app_ui/mojom/eche_app.mojom26
-rw-r--r--chromium/chromeos/components/eche_app_ui/proto/BUILD.gn9
-rw-r--r--chromium/chromeos/components/feature_usage/BUILD.gn26
-rw-r--r--chromium/chromeos/components/file_manager/mojom/BUILD.gn1
-rw-r--r--chromium/chromeos/components/file_manager/resources/BUILD.gn30
-rw-r--r--chromium/chromeos/components/local_search_service/public/mojom/local_search_service.mojom3
-rw-r--r--chromium/chromeos/components/multidevice/mojom/multidevice_types.mojom6
-rw-r--r--chromium/chromeos/components/personalization_app/BUILD.gn28
-rw-r--r--chromium/chromeos/components/personalization_app/mojom/BUILD.gn14
-rw-r--r--chromium/chromeos/components/personalization_app/mojom/personalization_app.mojom38
-rw-r--r--chromium/chromeos/components/personalization_app/resources/BUILD.gn109
-rw-r--r--chromium/chromeos/components/quick_answers/BUILD.gn7
-rw-r--r--chromium/chromeos/components/scanning/BUILD.gn53
-rw-r--r--chromium/chromeos/components/scanning/mojom/scanning.mojom143
-rw-r--r--chromium/chromeos/components/scanning/resources/BUILD.gn181
-rw-r--r--chromium/chromeos/components/sync_wifi/BUILD.gn2
-rw-r--r--chromium/chromeos/components/telemetry_extension_ui/BUILD.gn4
-rw-r--r--chromium/chromeos/components/telemetry_extension_ui/test/BUILD.gn2
33 files changed, 477 insertions, 429 deletions
diff --git a/chromium/chromeos/components/BUILD.gn b/chromium/chromeos/components/BUILD.gn
index bbf2c983a75..27772838c27 100644
--- a/chromium/chromeos/components/BUILD.gn
+++ b/chromium/chromeos/components/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
import("//testing/test.gni")
assert(is_chromeos, "Non-ChromeOS builds cannot depend on //chromeos")
@@ -15,6 +17,8 @@ test("chromeos_components_unittests") {
"run_all_unittests.cc",
]
+ # TODO(https://crbug.com/1164001): unit_tests deps should be moved to
+ # the appropriate place during the code migration project.
deps = [
"//base",
"//base/test:test_support",
@@ -22,6 +26,8 @@ test("chromeos_components_unittests") {
"//chromeos/components/cdm_factory_daemon:unit_tests",
"//chromeos/components/diagnostics_ui/backend:unit_tests",
"//chromeos/components/drivefs:unit_tests",
+ "//chromeos/components/eche_app_ui:unit_tests",
+ "//chromeos/components/feature_usage:unit_tests",
"//chromeos/components/local_search_service:unit_tests",
"//chromeos/components/local_search_service/public/mojom:unit_tests",
"//chromeos/components/mojo_bootstrap:unit_tests",
@@ -30,7 +36,6 @@ test("chromeos_components_unittests") {
"//chromeos/components/power:unit_tests",
"//chromeos/components/proximity_auth:unit_tests",
"//chromeos/components/quick_answers:unit_tests",
- "//chromeos/components/scanning:unit_tests",
"//chromeos/components/security_token_pin:unit_tests",
"//chromeos/components/sensors:unit_tests",
"//chromeos/components/smbfs:unit_tests",
@@ -40,8 +45,14 @@ test("chromeos_components_unittests") {
"//chromeos/components/trial_group:unit_tests",
"//mojo/core/embedder",
"//ui/base:base",
+ "//ui/gl:test_support",
]
+ # Tests for Camera App only work on Chrome OS device but not linux-chromeos.
+ if (is_chromeos_ash && is_chromeos_device) {
+ deps += [ "//chromeos/components/camera_app_ui:unit_tests" ]
+ }
+
if (!is_official_build) {
deps += [ "//chromeos/components/telemetry_extension_ui:unit_tests" ]
}
@@ -54,6 +65,9 @@ test("chromeos_components_unittests") {
group("closure_compile") {
testonly = true
+
+ # TODO(https://crbug.com/1164001): closure_compile deps should be moved to
+ # the appropriate place during the code migration project.
deps = [
"//chromeos/components/camera_app_ui:closure_compile",
"//chromeos/components/connectivity_diagnostics:closure_compile",
@@ -62,8 +76,8 @@ group("closure_compile") {
"//chromeos/components/help_app_ui:closure_compile",
"//chromeos/components/media_app_ui:closure_compile",
"//chromeos/components/multidevice/debug_webui/resources:closure_compile",
+ "//chromeos/components/personalization_app:closure_compile",
"//chromeos/components/print_management:closure_compile",
- "//chromeos/components/scanning:closure_compile",
"//chromeos/components/system_apps:closure_compile",
]
diff --git a/chromium/chromeos/components/camera_app_ui/BUILD.gn b/chromium/chromeos/components/camera_app_ui/BUILD.gn
index 6f2d182be00..4bb889c0350 100644
--- a/chromium/chromeos/components/camera_app_ui/BUILD.gn
+++ b/chromium/chromeos/components/camera_app_ui/BUILD.gn
@@ -20,10 +20,6 @@ static_library("camera_app_ui") {
"camera_app_ui.cc",
"camera_app_ui.h",
"camera_app_ui_delegate.h",
- "camera_app_window_manager.cc",
- "camera_app_window_manager.h",
- "camera_app_window_state_controller.cc",
- "camera_app_window_state_controller.h",
"resources.h",
"url_constants.cc",
"url_constants.h",
@@ -37,24 +33,57 @@ static_library("camera_app_ui") {
deps = [
":mojo_bindings",
":mojo_bindings_js",
+ ":window_managemet",
"//ash/public/cpp",
"//chromeos/components/web_applications",
- "//chromeos/strings",
- "//chromeos/system",
"//components/arc",
"//content/public/browser",
"//content/public/common",
"//media/capture:capture_lib",
"//mojo/public/cpp/bindings",
- "//mojo/public/cpp/platform",
"//mojo/public/js:resources_grit",
"//net",
"//services/network/public/mojom",
- "//ui/views",
"//ui/webui",
]
}
+source_set("window_managemet") {
+ sources = [
+ "camera_app_window_manager.cc",
+ "camera_app_window_manager.h",
+ "camera_app_window_state_controller.cc",
+ "camera_app_window_state_controller.h",
+ ]
+
+ deps = [
+ ":mojo_bindings",
+ "//ash/public/cpp",
+ "//base",
+ "//content/public/browser",
+ "//mojo/public/cpp/bindings",
+ "//ui/aura",
+ "//ui/views",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+
+ sources = [ "camera_app_window_manager_unittest.cc" ]
+
+ deps = [
+ ":window_managemet",
+ "//base",
+ "//base/test:test_support",
+ "//content/test:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ "//ui/views",
+ "//ui/views:test_support",
+ ]
+}
+
group("closure_compile") {
testonly = true
deps = [ "resources/js:closure_compile" ]
diff --git a/chromium/chromeos/components/camera_app_ui/resources/css/css.gni b/chromium/chromeos/components/camera_app_ui/resources/css/css.gni
index c57f5eee6b2..52bb943ffa0 100644
--- a/chromium/chromeos/components/camera_app_ui/resources/css/css.gni
+++ b/chromium/chromeos/components/camera_app_ui/resources/css/css.gni
@@ -2,4 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-css_files = [ "main.css" ]
+css_files = [
+ "main.css",
+ "ptz_panel.css",
+ "ptz_toast.css",
+ "ripple.css",
+]
diff --git a/chromium/chromeos/components/camera_app_ui/resources/images/images.gni b/chromium/chromeos/components/camera_app_ui/resources/images/images.gni
index aa5e8ee92d7..406110f57e2 100644
--- a/chromium/chromeos/components/camera_app_ui/resources/images/images.gni
+++ b/chromium/chromeos/components/camera_app_ui/resources/images/images.gni
@@ -18,6 +18,7 @@ in_app_images = [
"camera_button_mic_on.svg",
"camera_button_mirror_off.svg",
"camera_button_mirror_on.svg",
+ "camera_button_ptz_panel.svg",
"camera_button_settings.svg",
"camera_button_switch_device.svg",
"camera_button_switch_photo.svg",
@@ -35,12 +36,19 @@ in_app_images = [
"camera_mode_portrait.svg",
"camera_mode_square.svg",
"camera_mode_video.svg",
- "camera_shutter_photo_start.svg",
"camera_shutter_photo_start_active.svg",
"camera_shutter_photo_start_hover.svg",
- "camera_shutter_photo_stop.svg",
+ "camera_shutter_photo_start.svg",
"camera_shutter_photo_stop_hover.svg",
+ "camera_shutter_photo_stop.svg",
"camera_shutter_video_pause.svg",
+ "ptz_pan_left.svg",
+ "ptz_pan_right.svg",
+ "ptz_toast_icon.svg",
+ "ptz_tilt_down.svg",
+ "ptz_tilt_up.svg",
+ "ptz_zoom_in.svg",
+ "ptz_zoom_out.svg",
"settings_button_back.svg",
"settings_button_expand.svg",
"settings_expert.svg",
diff --git a/chromium/chromeos/components/camera_app_ui/resources/js/BUILD.gn b/chromium/chromeos/components/camera_app_ui/resources/js/BUILD.gn
index 3bf4d3691b1..e4774feccb7 100644
--- a/chromium/chromeos/components/camera_app_ui/resources/js/BUILD.gn
+++ b/chromium/chromeos/components/camera_app_ui/resources/js/BUILD.gn
@@ -58,7 +58,6 @@ js_library("compile_resources") {
"//components/arc/mojom:camera_intent_js_library_for_compile",
"//media/capture/mojom:image_capture_js_library_for_compile",
"//media/capture/video/chromeos/mojom:cros_camera_js_library_for_compile",
- "//third_party/blink/public/mojom:mojom_platform_js_library_for_compile",
]
externs_list = [
"$externs_path/chrome_extensions.js",
diff --git a/chromium/chromeos/components/camera_app_ui/resources/js/js.gni b/chromium/chromeos/components/camera_app_ui/resources/js/js.gni
index cde77c14636..d8834a2f6e2 100644
--- a/chromium/chromeos/components/camera_app_ui/resources/js/js.gni
+++ b/chromium/chromeos/components/camera_app_ui/resources/js/js.gni
@@ -7,7 +7,6 @@ compile_js_files = [
"app_window.js",
"async_job_queue.js",
"barcode_chip.js",
- "browser_proxy/browser_proxy.js",
"chrome_util.js",
"device/camera3_device_info.js",
"device/constraints_preferrer.js",
@@ -26,19 +25,17 @@ compile_js_files = [
"models/async_interval.js",
"models/async_writer.js",
"models/barcode.js",
- "models/barcode_worker.js",
"models/barcode_worker_interface.js",
- "models/chrome_file_system_entry.js",
+ "models/barcode_worker.js",
"models/file_namer.js",
+ "models/file_system_access_entry.js",
"models/file_system.js",
- "models/file_system_entry.js",
"models/file_util.js",
"models/idb.js",
"models/lazy_directory_entry.js",
"models/load_time_data.js",
"models/local_storage.js",
"models/mp4_video_processor.js",
- "models/native_file_system_entry.js",
"models/result_saver.js",
"models/video_processor_interface.js",
"models/video_saver.js",
@@ -62,6 +59,7 @@ compile_js_files = [
"untrusted_script_loader.js",
"untrusted_video_processor_helper.js",
"util.js",
+ "views/camera_intent.js",
"views/camera.js",
"views/camera/layout.js",
"views/camera/mode/index.js",
@@ -76,14 +74,13 @@ compile_js_files = [
"views/camera/review_result.js",
"views/camera/timertick.js",
"views/camera/video_encoder_options.js",
- "views/camera_intent.js",
"views/dialog.js",
+ "views/ptz_panel.js",
"views/settings.js",
"views/view.js",
"views/warning.js",
"waitable_event.js",
"window_controller.js",
- "window_controller/window_controller.js",
]
no_compile_js_files = [
@@ -95,7 +92,6 @@ wasm_files = [ "lib/ffmpeg.wasm" ]
externs_files = [
"externs/chrome.js",
- "externs/swa.js",
"externs/typescript.js",
"externs/universal_analytics_api.js",
"externs/w3c_api.js",
diff --git a/chromium/chromeos/components/camera_app_ui/resources/strings/BUILD.gn b/chromium/chromeos/components/camera_app_ui/resources/strings/BUILD.gn
index 9c5f1c0b5ee..35014c8d4a5 100644
--- a/chromium/chromeos/components/camera_app_ui/resources/strings/BUILD.gn
+++ b/chromium/chromeos/components/camera_app_ui/resources/strings/BUILD.gn
@@ -11,7 +11,7 @@ grit("strings") {
defines = chrome_grit_defines
outputs = [ "grit/chromeos_camera_app_strings.h" ]
- foreach(locale, locales_with_fake_bidi) {
+ foreach(locale, locales_with_pseudolocales) {
outputs += [ "chromeos_camera_app_strings_$locale.pak" ]
}
}
diff --git a/chromium/chromeos/components/cdm_factory_daemon/mojom/content_decryption_module.mojom b/chromium/chromeos/components/cdm_factory_daemon/mojom/content_decryption_module.mojom
index d8797e5dd60..6fb0d8eb4ea 100644
--- a/chromium/chromeos/components/cdm_factory_daemon/mojom/content_decryption_module.mojom
+++ b/chromium/chromeos/components/cdm_factory_daemon/mojom/content_decryption_module.mojom
@@ -31,7 +31,6 @@ enum EmeInitDataType {
enum CdmSessionType {
kTemporary,
kPersistentLicense,
- kPersistentUsageRecord,
};
// See media::CdmMessageType
diff --git a/chromium/chromeos/components/diagnostics_ui/BUILD.gn b/chromium/chromeos/components/diagnostics_ui/BUILD.gn
index 6161621cb65..ee26efad235 100644
--- a/chromium/chromeos/components/diagnostics_ui/BUILD.gn
+++ b/chromium/chromeos/components/diagnostics_ui/BUILD.gn
@@ -13,6 +13,7 @@ static_library("diagnostics_ui") {
]
deps = [
+ "//ash/constants",
"//chromeos/components/diagnostics_ui/backend",
"//chromeos/components/diagnostics_ui/mojom",
"//chromeos/login/login_state",
diff --git a/chromium/chromeos/components/diagnostics_ui/backend/BUILD.gn b/chromium/chromeos/components/diagnostics_ui/backend/BUILD.gn
index a8651902fad..b8f669f75ae 100644
--- a/chromium/chromeos/components/diagnostics_ui/backend/BUILD.gn
+++ b/chromium/chromeos/components/diagnostics_ui/backend/BUILD.gn
@@ -20,6 +20,8 @@ static_library("backend") {
"power_manager_client_conversions.h",
"routine_log.cc",
"routine_log.h",
+ "routine_properties.cc",
+ "routine_properties.h",
"session_log_handler.cc",
"session_log_handler.h",
"system_data_provider.cc",
@@ -57,6 +59,7 @@ source_set("unit_tests") {
"log_test_helpers_unittest.cc",
"power_manager_client_conversions_unittest.cc",
"routine_log_unittest.cc",
+ "routine_properties_unittest.cc",
"session_log_handler_unittest.cc",
"system_data_provider_unittest.cc",
"system_routine_controller_unittest.cc",
diff --git a/chromium/chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom b/chromium/chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom
index b722dd69db2..abf92d64916 100644
--- a/chromium/chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom
+++ b/chromium/chromeos/components/diagnostics_ui/mojom/system_routine_controller.mojom
@@ -12,6 +12,17 @@ enum RoutineType {
kCpuFloatingPoint,
kCpuPrime,
kMemory,
+ kLanConnectivity,
+ kSignalStrength,
+ kGatewayCanBePinged,
+ kHasSecureWiFiConnection,
+ kDnsResolverPresent,
+ kDnsLatency,
+ kDnsResolution,
+ kCaptivePortal,
+ kHttpFirewall,
+ kHttpsFirewall,
+ kHttpsLatency,
};
enum StandardRoutineResult {
diff --git a/chromium/chromeos/components/diagnostics_ui/resources/BUILD.gn b/chromium/chromeos/components/diagnostics_ui/resources/BUILD.gn
index 2145cddace2..26d2b733432 100644
--- a/chromium/chromeos/components/diagnostics_ui/resources/BUILD.gn
+++ b/chromium/chromeos/components/diagnostics_ui/resources/BUILD.gn
@@ -11,6 +11,7 @@ js_type_check("closure_compile_module") {
is_polymer3 = true
deps = [
":battery_status_card",
+ ":connectivity_card",
":cpu_card",
":data_point",
":diagnostics_app",
@@ -51,6 +52,13 @@ js_library("battery_status_card") {
]
}
+js_library("connectivity_card") {
+ deps = [
+ ":routine_section",
+ "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
+ ]
+}
+
js_library("cpu_card") {
deps = [
":data_point",
@@ -70,6 +78,7 @@ js_library("data_point") {
js_library("diagnostics_app") {
deps = [
":battery_status_card",
+ ":connectivity_card",
":cpu_card",
":diagnostics_browser_proxy",
":diagnostics_card",
@@ -214,6 +223,7 @@ js_library("text_badge") {
html_to_js("web_components") {
js_files = [
"battery_status_card.js",
+ "connectivity_card.js",
"cpu_card.js",
"data_point.js",
"diagnostics_app.js",
diff --git a/chromium/chromeos/components/eche_app_ui/BUILD.gn b/chromium/chromeos/components/eche_app_ui/BUILD.gn
index e7cbc2293c2..cb4f7a9ea23 100644
--- a/chromium/chromeos/components/eche_app_ui/BUILD.gn
+++ b/chromium/chromeos/components/eche_app_ui/BUILD.gn
@@ -4,18 +4,28 @@
import("//chrome/test/base/js2gtest.gni")
import("//third_party/closure_compiler/compile_js.gni")
+import("//tools/grit/preprocess_if_expr.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
assert(is_chromeos, "Eche App is Chrome OS only")
+preprocess_mojo_manifest = "preprocessed_mojo_manifest.json"
+preprocess_folder = "preprocessed"
+
static_library("eche_app_ui") {
sources = [
"eche_app_manager.cc",
"eche_app_manager.h",
"eche_app_ui.cc",
"eche_app_ui.h",
+ "eche_connector.cc",
+ "eche_connector.h",
+ "eche_feature_status_provider.cc",
+ "eche_feature_status_provider.h",
"eche_notification_click_handler.cc",
"eche_notification_click_handler.h",
+ "eche_signaler.cc",
+ "eche_signaler.h",
"feature_status.cc",
"feature_status.h",
"feature_status_provider.cc",
@@ -26,20 +36,70 @@ static_library("eche_app_ui") {
deps = [
"//ash/constants",
+ "//chromeos/components/eche_app_ui/mojom",
+ "//chromeos/components/eche_app_ui/proto",
+ "//chromeos/components/multidevice:multidevice",
+ "//chromeos/components/multidevice/logging",
"//chromeos/components/phonehub:phonehub",
"//chromeos/resources:eche_app_resources",
"//chromeos/resources:eche_bundle_resources",
+ "//chromeos/services/device_sync/public/cpp:cpp",
+ "//chromeos/services/multidevice_setup/public/cpp:cpp",
+ "//chromeos/services/secure_channel/public/cpp/client:client",
"//content/public/browser",
"//ui/webui",
]
}
+static_library("test_support") {
+ testonly = true
+
+ sources = [
+ "fake_feature_status_provider.cc",
+ "fake_feature_status_provider.h",
+ ]
+
+ public_deps = [ ":eche_app_ui" ]
+
+ deps = [ "//base" ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [
+ "eche_feature_status_provider_unittest.cc",
+ "eche_notification_click_handler_unittest.cc",
+ ]
+ deps = [
+ ":eche_app_ui",
+ ":test_support",
+ "//base",
+ "//base/test:test_support",
+ "//chromeos/components/multidevice",
+ "//chromeos/components/multidevice:test_support",
+ "//chromeos/components/phonehub",
+ "//chromeos/components/phonehub:debug",
+ "//chromeos/services/device_sync/public/cpp",
+ "//chromeos/services/device_sync/public/cpp:test_support",
+ "//chromeos/services/multidevice_setup/public/cpp",
+ "//chromeos/services/multidevice_setup/public/cpp:test_support",
+ "//chromeos/services/secure_channel/public/cpp/client:test_support",
+ "//components/prefs:test_support",
+ "//testing/gtest",
+ ]
+}
+
js_type_check("closure_compile") {
deps = [ ":app" ]
}
js_library("app") {
- sources = [ "resources/prod/js/app_bundle.js" ]
+ deps =
+ [ "//chromeos/components/eche_app_ui/mojom:mojom_js_library_for_compile" ]
+ sources = [
+ "resources/browser_proxy.js",
+ "resources/mock/js/app_bundle.js",
+ ]
}
js2gtest("browser_tests_js") {
@@ -50,12 +110,31 @@ js2gtest("browser_tests_js") {
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
}
-# TODO(b/176936453): add js files for mojo API and remove
-# the dummy icon once adding in the real resources.
generate_grd("build_grd") {
input_files_base_dir = rebase_path("resources", "//")
- input_files = [ "eche_icon_256.png" ]
+ input_files = [ "browser_proxy.js" ]
manifest_files = []
grd_prefix = "chromeos_eche_app"
out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"
+ deps = [ ":build_mojo_grdp" ]
+ grdp_files = [ "$target_gen_dir/chromeos_eche_app_mojo_resources.grdp" ]
+ resource_path_rewrites = [ "chromeos/components/eche_app_ui/mojom/eche_app.mojom-lite.js|mojo/eche_app.mojom-lite.js" ]
+}
+
+generate_grd("build_mojo_grdp") {
+ grd_prefix = "chromeos_eche_app"
+ out_grd = "$target_gen_dir/${grd_prefix}_mojo_resources.grdp"
+ deps = [ ":preprocess_mojo" ]
+ manifest_files = [ "$target_gen_dir/$preprocess_mojo_manifest" ]
+ resource_path_rewrites = [ "chromeos/components/eche_app_ui/mojom/eche_app.mojom-lite.js|mojo/eche_app.mojom-lite.js" ]
+}
+
+# Mojo files, for generating grdp
+preprocess_if_expr("preprocess_mojo") {
+ deps =
+ [ "//chromeos/components/eche_app_ui/mojom:mojom_js_library_for_compile" ]
+ in_folder = "$root_gen_dir"
+ out_folder = "$target_gen_dir/$preprocess_folder"
+ out_manifest = "$target_gen_dir/$preprocess_mojo_manifest"
+ in_files = [ "chromeos/components/eche_app_ui/mojom/eche_app.mojom-lite.js" ]
}
diff --git a/chromium/chromeos/components/eche_app_ui/eche_app_ui.gni b/chromium/chromeos/components/eche_app_ui/eche_app_ui.gni
new file mode 100644
index 00000000000..2e5b6d49a2a
--- /dev/null
+++ b/chromium/chromeos/components/eche_app_ui/eche_app_ui.gni
@@ -0,0 +1,8 @@
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/ui_mode.gni")
+
+declare_args() {
+ # Whether to enable the "real" ChromeOS Media App. When false, a mock app is
+ # bundled for testing integration points.
+ enable_cros_eche_app = is_chromeos_ash && is_chrome_branded
+}
diff --git a/chromium/chromeos/components/scanning/mojom/BUILD.gn b/chromium/chromeos/components/eche_app_ui/mojom/BUILD.gn
index 60853662f61..3b504304de5 100644
--- a/chromium/chromeos/components/scanning/mojom/BUILD.gn
+++ b/chromium/chromeos/components/eche_app_ui/mojom/BUILD.gn
@@ -1,11 +1,9 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
+# Copyright 2021 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("//mojo/public/tools/bindings/mojom.gni")
mojom("mojom") {
- sources = [ "scanning.mojom" ]
-
- public_deps = [ "//mojo/public/mojom/base" ]
+ sources = [ "eche_app.mojom" ]
}
diff --git a/chromium/chromeos/components/eche_app_ui/mojom/eche_app.mojom b/chromium/chromeos/components/eche_app_ui/mojom/eche_app.mojom
new file mode 100644
index 00000000000..44918707867
--- /dev/null
+++ b/chromium/chromeos/components/eche_app_ui/mojom/eche_app.mojom
@@ -0,0 +1,26 @@
+// Copyright 2021 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.eche_app.mojom;
+
+// Interface for sending signal messages from the SWA to the browser. The
+// signals are used to bootstrap a full WebRTC connection between a Nearby
+// endpoint and the SWA. Any further data exchange happens directly over the
+// WebRTC connection.
+interface SignalingMessageExchanger {
+ // Called when a new signaling message is ready for transmission. The
+ // `signal` is a serialized WebRtcSignal.
+ SendSignalingMessage(array<uint8> signal);
+ // Sets the listener for replies sent from the browser process to the SWA.
+ SetSignalingMessageObserver(
+ pending_remote<SignalingMessageObserver> observer);
+ // Called when we no longer need the signal channel.
+ TearDownSignaling();
+};
+
+// Interface for dispatching response signaling messages as they are received.
+interface SignalingMessageObserver {
+ // Dispatch message to recipient. The `signal` is a serialized WebRtcSignal.
+ OnReceivedSignalingMessage(array<uint8> signal);
+};
diff --git a/chromium/chromeos/components/eche_app_ui/proto/BUILD.gn b/chromium/chromeos/components/eche_app_ui/proto/BUILD.gn
new file mode 100644
index 00000000000..f60dbada44d
--- /dev/null
+++ b/chromium/chromeos/components/eche_app_ui/proto/BUILD.gn
@@ -0,0 +1,9 @@
+# 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.
+
+import("//third_party/protobuf/proto_library.gni")
+
+proto_library("proto") {
+ sources = [ "exo_messages.proto" ]
+}
diff --git a/chromium/chromeos/components/feature_usage/BUILD.gn b/chromium/chromeos/components/feature_usage/BUILD.gn
new file mode 100644
index 00000000000..2486277e491
--- /dev/null
+++ b/chromium/chromeos/components/feature_usage/BUILD.gn
@@ -0,0 +1,26 @@
+# Copyright 2021 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.
+
+static_library("feature_usage") {
+ sources = [
+ "feature_usage_metrics.cc",
+ "feature_usage_metrics.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/metrics",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [ "feature_usage_metrics_unittest.cc" ]
+ deps = [
+ ":feature_usage",
+ "//base/test:test_support",
+ "//components/prefs:test_support",
+ "//testing/gtest",
+ ]
+}
diff --git a/chromium/chromeos/components/file_manager/mojom/BUILD.gn b/chromium/chromeos/components/file_manager/mojom/BUILD.gn
index 6ef266aa043..4298249d9f3 100644
--- a/chromium/chromeos/components/file_manager/mojom/BUILD.gn
+++ b/chromium/chromeos/components/file_manager/mojom/BUILD.gn
@@ -9,4 +9,5 @@ assert(!is_official_build, "File Manager is only built for unofficial builds")
mojom("mojom") {
sources = [ "file_manager.mojom" ]
+ webui_module_path = "/"
}
diff --git a/chromium/chromeos/components/file_manager/resources/BUILD.gn b/chromium/chromeos/components/file_manager/resources/BUILD.gn
index 9608681e332..2a80d38d73b 100644
--- a/chromium/chromeos/components/file_manager/resources/BUILD.gn
+++ b/chromium/chromeos/components/file_manager/resources/BUILD.gn
@@ -6,6 +6,10 @@ import("//chrome/browser/resources/tools/optimize_webui.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/grit/preprocess_if_expr.gni")
+preprocess_folder = "$target_gen_dir/preprocessed"
+mojom_webui_folder =
+ "$root_gen_dir/mojom-webui/chromeos/components/file_manager/mojom"
+
js_library("crt0") {
}
@@ -24,9 +28,7 @@ js_library("main_js") {
"main.js",
"script_loader.js",
]
- deps = [
- "//chromeos/components/file_manager/mojom:mojom_js_library_for_compile",
- ]
+ deps = [ "//chromeos/components/file_manager/mojom:mojom_webui_js" ]
}
js_type_check("closure_compile") {
@@ -35,6 +37,11 @@ js_type_check("closure_compile") {
"//ui/webui/resources/js:cr",
"//ui/webui/resources/js:load_time_data",
]
+ closure_flags =
+ default_closure_args + mojom_js_args + [
+ "js_module_root=" + rebase_path(".", root_build_dir),
+ "js_module_root=" + rebase_path(mojom_webui_folder, root_build_dir),
+ ]
}
action("gen_main_html") {
@@ -55,8 +62,6 @@ action("gen_main_html") {
]
}
-preprocess_folder = "$target_gen_dir/preprocessed"
-
preprocess_if_expr("preprocess") {
in_folder = "./" #target_gen_dir
out_folder = preprocess_folder
@@ -76,14 +81,11 @@ preprocess_if_expr("preprocess") {
]
}
-preprocess_if_expr("preprocess_gen") {
- in_folder = target_gen_dir + "/../mojom"
+preprocess_if_expr("preprocess_mojo") {
+ in_folder = mojom_webui_folder
+ in_files = [ "file_manager.mojom-webui.js" ]
out_folder = preprocess_folder
- in_files = [ "file_manager.mojom-lite.js" ]
-
- deps = [
- "//chromeos/components/file_manager/mojom:mojom_js_library_for_compile",
- ]
+ deps = [ "//chromeos/components/file_manager/mojom:mojom_webui_js" ]
}
optimize_webui("build") {
@@ -94,11 +96,11 @@ optimize_webui("build") {
js_out_files = [ "main.rollup.js" ]
- excludes = [ "chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js" ]
+ excludes = [ "chrome://resources/mojo/mojo/public/js/bindings.js" ]
deps = [
":preprocess",
- ":preprocess_gen",
+ ":preprocess_mojo",
"//ui/file_manager:preprocess_generated",
"//ui/file_manager:preprocess_static",
"//ui/webui/resources:preprocess",
diff --git a/chromium/chromeos/components/local_search_service/public/mojom/local_search_service.mojom b/chromium/chromeos/components/local_search_service/public/mojom/local_search_service.mojom
index 7bbff72be7f..f250ab74957 100644
--- a/chromium/chromeos/components/local_search_service/public/mojom/local_search_service.mojom
+++ b/chromium/chromeos/components/local_search_service/public/mojom/local_search_service.mojom
@@ -9,7 +9,8 @@ import "chromeos/components/local_search_service/public/mojom/types.mojom";
enum IndexId {
kCrosSettings = 0,
- kHelpApp = 1
+ kHelpApp = 1,
+ kHelpAppLauncher = 2
// Add new client IDs here.
};
diff --git a/chromium/chromeos/components/multidevice/mojom/multidevice_types.mojom b/chromium/chromeos/components/multidevice/mojom/multidevice_types.mojom
index ca39e9f3c08..7d03dafb40a 100644
--- a/chromium/chromeos/components/multidevice/mojom/multidevice_types.mojom
+++ b/chromium/chromeos/components/multidevice/mojom/multidevice_types.mojom
@@ -42,7 +42,11 @@ enum SoftwareFeature {
// Wifi Sync with Android allows users to sync wifi network configurations
// between Chrome OS devices and a connected Android phone
WIFI_SYNC_HOST = 11,
- WIFI_SYNC_CLIENT = 12
+ WIFI_SYNC_CLIENT = 12,
+
+ // Eche
+ ECHE_HOST = 13,
+ ECHE_CLIENT = 14
};
// Enumeration of what value a SoftwareFeature can be.
diff --git a/chromium/chromeos/components/personalization_app/BUILD.gn b/chromium/chromeos/components/personalization_app/BUILD.gn
new file mode 100644
index 00000000000..3b4b7149dc2
--- /dev/null
+++ b/chromium/chromeos/components/personalization_app/BUILD.gn
@@ -0,0 +1,28 @@
+# Copyright 2021 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.
+
+assert(is_chromeos, "Personalization App is Chrome OS only")
+
+static_library("personalization_app") {
+ sources = [
+ "personalization_app_ui.cc",
+ "personalization_app_ui.h",
+ "personalization_app_ui_delegate.h",
+ "personalization_app_url_constants.cc",
+ "personalization_app_url_constants.h",
+ ]
+
+ deps = [
+ "//chromeos/components/personalization_app/mojom",
+ "//chromeos/resources:personalization_app_resources",
+ "//chromeos/strings",
+ "//content/public/browser",
+ "//ui/resources:webui_generated_resources_grd_grit",
+ "//ui/webui",
+ ]
+}
+
+group("closure_compile") {
+ deps = [ "resources:closure_compile" ]
+}
diff --git a/chromium/chromeos/components/personalization_app/mojom/BUILD.gn b/chromium/chromeos/components/personalization_app/mojom/BUILD.gn
new file mode 100644
index 00000000000..7dacb4e16e4
--- /dev/null
+++ b/chromium/chromeos/components/personalization_app/mojom/BUILD.gn
@@ -0,0 +1,14 @@
+# Copyright 2021 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("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("mojom") {
+ sources = [ "personalization_app.mojom" ]
+
+ public_deps = [
+ "//mojo/public/mojom/base",
+ "//url/mojom:url_mojom_gurl",
+ ]
+}
diff --git a/chromium/chromeos/components/personalization_app/mojom/personalization_app.mojom b/chromium/chromeos/components/personalization_app/mojom/personalization_app.mojom
new file mode 100644
index 00000000000..af3cb29b407
--- /dev/null
+++ b/chromium/chromeos/components/personalization_app/mojom/personalization_app.mojom
@@ -0,0 +1,38 @@
+// Copyright 2021 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.personalization_app.mojom;
+
+import "url/mojom/url.mojom";
+
+// WallpaperCollection contains a list of |WallpaperImage| objects.
+struct WallpaperCollection {
+ // This ID is used as the argument to |FetchImagesForCollection|.
+ string id;
+
+ // Name of this collection to be displayed to the user.
+ string name;
+};
+
+// Represents a single image that can be set as user wallpaper.
+struct WallpaperImage {
+ // URL of the image file to be displayed in the UI.
+ url.mojom.Url url;
+};
+
+// Provides APIs to retrieve Wallpaper information. This API is exposed only to
+// the Personalization App (chrome://personalization). It is a mojom wrapper for
+// APIs found in |backdrop_wallpaper.proto|.
+interface WallpaperProvider {
+
+ // Fetch a list of WallpaperCollection objects from the Backdrop API. Will
+ // be displayed to the user to allow them to select an individual collection
+ // to view in more detail. |collections| will be null on error.
+ FetchCollections() => (array<WallpaperCollection>? collections);
+
+ // Fetch a list of WallpaperImage objects from the Backdrop API that can be
+ // set as the user's wallpaper. |images| will be null on error.
+ FetchImagesForCollection(string collection_id) => (
+ array<WallpaperImage>? images);
+};
diff --git a/chromium/chromeos/components/personalization_app/resources/BUILD.gn b/chromium/chromeos/components/personalization_app/resources/BUILD.gn
new file mode 100644
index 00000000000..73face2c110
--- /dev/null
+++ b/chromium/chromeos/components/personalization_app/resources/BUILD.gn
@@ -0,0 +1,109 @@
+# Copyright 2021 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("//third_party/closure_compiler/compile_js.gni")
+import("//tools/grit/grit_rule.gni")
+import("//tools/grit/preprocess_if_expr.gni")
+import("//tools/polymer/html_to_js.gni")
+import("//ui/webui/resources/tools/generate_grd.gni")
+
+preprocessed_dir = "preprocessed"
+preprocessed_manifest = "manifest.json"
+preprocess_mojo_manifest = "preprocessed_mojo_manifest.json"
+
+polymer_element_files = [
+ "wallpaper_collections_element.js",
+ "wallpaper_images_element.js",
+ "personalization_router_element.js",
+]
+
+generate_grd("build_grd") {
+ deps = [
+ ":preprocess_generated",
+ ":preprocess_mojo",
+ ]
+ input_files_base_dir = rebase_path(".", "//")
+ input_files = [
+ "index.html",
+ "icon_192.png",
+ "personalization_app.js",
+ "mojo_interface_provider.js",
+ ]
+ manifest_files = [
+ "$target_gen_dir/$preprocessed_manifest",
+ "$target_gen_dir/$preprocess_mojo_manifest",
+ ]
+ grd_prefix = "chromeos_personalization_app"
+ out_grd = "$target_gen_dir/${grd_prefix}_resources.grd"
+}
+
+# Mojo files, for generating grdp
+preprocess_if_expr("preprocess_mojo") {
+ deps = [ "//chromeos/components/personalization_app/mojom:mojom_js" ]
+ in_folder = "$target_gen_dir/../mojom"
+ out_folder = "$target_gen_dir/$preprocessed_dir"
+ out_manifest = "$target_gen_dir/$preprocess_mojo_manifest"
+ in_files = [ "personalization_app.mojom-lite.js" ]
+}
+
+js_type_check("closure_compile") {
+ is_polymer3 = true
+ deps = [
+ ":mojo_interface_provider",
+ ":personalization_app",
+ ":personalization_router_element",
+ ":wallpaper_collections_element",
+ ":wallpaper_images_element",
+ ]
+}
+
+js_library("mojo_interface_provider") {
+ deps = [ "//chromeos/components/personalization_app/mojom:mojom_js_library_for_compile" ]
+}
+
+js_library("personalization_app") {
+ deps = [
+ ":personalization_router_element",
+ ":wallpaper_collections_element",
+ ":wallpaper_images_element",
+ ]
+}
+
+js_library("wallpaper_collections_element") {
+ deps = [
+ ":mojo_interface_provider",
+ "//third_party/polymer/v3_0/components-chromium/iron-list:iron-list",
+ "//third_party/polymer/v3_0/components-chromium/paper-spinner:paper-spinner-lite",
+ "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
+ ]
+}
+
+js_library("wallpaper_images_element") {
+ deps = [
+ ":mojo_interface_provider",
+ "//third_party/polymer/v3_0/components-chromium/iron-list:iron-list",
+ "//third_party/polymer/v3_0/components-chromium/paper-spinner:paper-spinner-lite",
+ "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
+ ]
+}
+
+js_library("personalization_router_element") {
+ deps = [
+ "//third_party/polymer/v3_0/components-chromium/iron-location:iron-location",
+ "//third_party/polymer/v3_0/components-chromium/iron-location:iron-query-params",
+ "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
+ ]
+}
+
+preprocess_if_expr("preprocess_generated") {
+ deps = [ ":web_components" ]
+ in_folder = target_gen_dir
+ out_folder = "$target_gen_dir/$preprocessed_dir"
+ out_manifest = "$target_gen_dir/$preprocessed_manifest"
+ in_files = polymer_element_files
+}
+
+html_to_js("web_components") {
+ js_files = polymer_element_files
+}
diff --git a/chromium/chromeos/components/quick_answers/BUILD.gn b/chromium/chromeos/components/quick_answers/BUILD.gn
index f570ffe7d4f..6b105644d12 100644
--- a/chromium/chromeos/components/quick_answers/BUILD.gn
+++ b/chromium/chromeos/components/quick_answers/BUILD.gn
@@ -38,6 +38,10 @@ source_set("quick_answers") {
"utils/quick_answers_metrics.h",
"utils/quick_answers_utils.cc",
"utils/quick_answers_utils.h",
+ "utils/unit_conversion_constants.cc",
+ "utils/unit_conversion_constants.h",
+ "utils/unit_converter.cc",
+ "utils/unit_converter.h",
]
deps = [
"//ash/constants",
@@ -77,6 +81,7 @@ source_set("unit_tests") {
"translation_result_loader_unittest.cc",
"understanding/intent_generator_unittest.cc",
"utils/language_detector_unittest.cc",
+ "utils/unit_converter_unittest.cc",
]
deps = [
@@ -88,7 +93,7 @@ source_set("unit_tests") {
"//base/test:test_support",
"//chromeos/components/quick_answers/public/cpp:prefs",
"//chromeos/services/assistant/public/shared",
- "//chromeos/services/machine_learning/public/cpp:test_support",
+ "//chromeos/services/machine_learning/public/cpp:stub",
"//chromeos/services/machine_learning/public/mojom",
"//components/prefs:prefs",
"//components/prefs:test_support",
diff --git a/chromium/chromeos/components/scanning/BUILD.gn b/chromium/chromeos/components/scanning/BUILD.gn
deleted file mode 100644
index b9fb26e6491..00000000000
--- a/chromium/chromeos/components/scanning/BUILD.gn
+++ /dev/null
@@ -1,53 +0,0 @@
-# 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.
-
-import("//testing/test.gni")
-
-assert(is_chromeos, "Scanning App is Chrome OS only")
-
-static_library("scanning") {
- sources = [
- "scanning_handler.cc",
- "scanning_handler.h",
- "scanning_metrics_handler.cc",
- "scanning_metrics_handler.h",
- "scanning_paths_provider.h",
- "scanning_ui.cc",
- "scanning_ui.h",
- "scanning_uma.cc",
- "scanning_uma.h",
- "url_constants.cc",
- "url_constants.h",
- ]
-
- deps = [
- "//chromeos/components/scanning/mojom",
- "//chromeos/resources:scanning_app_resources",
- "//chromeos/strings/",
- "//content/public/browser",
- "//ui/base",
- "//ui/gfx",
- "//ui/resources",
- "//ui/shell_dialogs",
- "//ui/webui",
- ]
-}
-
-group("closure_compile") {
- deps = [ "resources:closure_compile_module" ]
-}
-
-source_set("unit_tests") {
- testonly = true
-
- sources = [ "scanning_handler_unittest.cc" ]
-
- deps = [
- ":scanning",
- "//base",
- "//content/test:test_support",
- "//testing/gtest",
- "//ui/shell_dialogs",
- ]
-}
diff --git a/chromium/chromeos/components/scanning/mojom/scanning.mojom b/chromium/chromeos/components/scanning/mojom/scanning.mojom
deleted file mode 100644
index 4d54e8e1a47..00000000000
--- a/chromium/chromeos/components/scanning/mojom/scanning.mojom
+++ /dev/null
@@ -1,143 +0,0 @@
-// 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.
-
-module chromeos.scanning.mojom;
-
-import "mojo/public/mojom/base/file_path.mojom";
-import "mojo/public/mojom/base/string16.mojom";
-import "mojo/public/mojom/base/unguessable_token.mojom";
-
-// These values are persisted to logs. Entries should not be renumbered and
-// numeric values should never be reused. Updates should be reflected in the
-// ScanJobSettings histogram enumeration.
-
-// The color modes that can be used to perform a scan.
-enum ColorMode {
- kBlackAndWhite,
- kGrayscale,
- kColor,
-};
-
-// The file types that can be used when saving scanned images.
-enum FileType {
- kJpg,
- kPdf,
- kPng,
-};
-
-// The source types from which a scan can be obtained.
-enum SourceType {
- // An unknown source type.
- kUnknown,
- // A flatbed that scans a single page.
- kFlatbed,
- // An automatic document feeder that scans a single side of each page.
- kAdfSimplex,
- // An automatic document feeder that scans both sides of each page.
- kAdfDuplex,
- // The implicit source type used for scanners that do not report any source
- // options.
- kDefault,
-};
-
-// The page sizes that can be used to perform a scan.
-enum PageSize {
- // ISO A4 (210 x 297 mm).
- kIsoA4,
- // NA Letter (216 x 279 mm).
- kNaLetter,
- // The page size resulting from scanning the scanner's entire scannable area.
- kMax,
-};
-
-// The source from which a scan can be obtained.
-struct ScanSource {
- // The type of this source.
- SourceType type;
- // The name of this source. Source names are unique to each SANE backend and
- // are required to perform scans.
- string name;
- // The page sizes supported by this source.
- array<PageSize> page_sizes;
-};
-
-// The capabilities a scanner supports.
-struct ScannerCapabilities {
- array<ScanSource> sources;
- array<ColorMode> color_modes;
- array<uint32> resolutions;
-};
-
-// Settings used to perform a scan.
-struct ScanSettings {
- // The SANE name of the ScanSource from which to scan.
- string source_name;
- // The location to save scanned images to.
- mojo_base.mojom.FilePath scan_to_path;
- // The file type to use when saving scanned images.
- FileType file_type;
- // The color mode with which to scan.
- ColorMode color_mode;
- // The page size with which to scan.
- PageSize page_size;
- // The resolution with which to scan in DPI.
- uint32 resolution_dpi;
-};
-
-// Represents a connected scanner.
-struct Scanner {
- // The scanner's unique identifier.
- mojo_base.mojom.UnguessableToken id;
- // The scanner's display name.
- mojo_base.mojom.String16 display_name;
-};
-
-// Observer interface used to send remote updates about an in-progress scan job
-// to the Scan app (chrome://scanning) receiver. When the corresponding scan job
-// is complete, the remote and receiver are disconnected.
-interface ScanJobObserver {
- // Called when the progress percent of the page currently being scanned
- // changes. |page_number| indicates which page the update is for.
- OnPageProgress(uint32 page_number, uint32 progress_percent);
-
- // Called when scanning a page is complete. |page_data| contains the page's
- // image data encoded as a PNG.
- // TODO(jschettler): Send a lower resolution preview.
- OnPageComplete(array<uint8> page_data);
-
- // Called when the scan is complete. |success| indicates whether the scan
- // completed successfully. |last_scanned_file_path| is the file path of
- // the last page scanned in a scan job.
- OnScanComplete(bool success, mojo_base.mojom.FilePath last_scanned_file_path);
-
- // Called when canceling the current scan job is complete. |success|
- // indicates whether the scan job was cancelled successfully.
- OnCancelComplete(bool success);
-};
-
-// Interface used to obtain information about and interact with connected
-// scanners. It is implemented in the browser and exposed to the Scan app
-// (chrome://scanning).
-interface ScanService {
- // Returns the connected scanners. Obtaining a scanner's capabilities is
- // implemented in a separate method to minimize the amount of time clients
- // must wait before receiving the scanners and displaying their display names.
- GetScanners() => (array<Scanner> scanners);
-
- // Returns the capabilities of the scanner identified by |scanner_id|.
- // TODO(jschettler): Return a boolean to indicate whether the capabilities
- // were obtained via a secure protocol.
- GetScannerCapabilities(mojo_base.mojom.UnguessableToken scanner_id)
- => (ScannerCapabilities capabilities);
-
- // Starts a scan with the scanner identified by |scanner_id| using the
- // provided |settings|. Scan job events are reported to the client via the
- // |observer|. |success| indicates whether the scan started successfully.
- StartScan(mojo_base.mojom.UnguessableToken scanner_id, ScanSettings settings,
- pending_remote<ScanJobObserver> observer) => (bool success);
-
- // Attempts to cancel the currently running scan job. The success of the
- // cancel attempt is reported through the ScanJobObserver.
- CancelScan();
-};
diff --git a/chromium/chromeos/components/scanning/resources/BUILD.gn b/chromium/chromeos/components/scanning/resources/BUILD.gn
deleted file mode 100644
index f9bbfd4d938..00000000000
--- a/chromium/chromeos/components/scanning/resources/BUILD.gn
+++ /dev/null
@@ -1,181 +0,0 @@
-# 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.
-
-import("//third_party/closure_compiler/compile_js.gni")
-import("//tools/grit/grit_rule.gni")
-import("//tools/grit/repack.gni")
-import("//tools/polymer/html_to_js.gni")
-
-js_type_check("closure_compile_module") {
- is_polymer3 = true
- deps = [
- ":color_mode_select",
- ":file_type_select",
- ":loading_page",
- ":mojo_interface_provider",
- ":page_size_select",
- ":resolution_select",
- ":scan_done_section",
- ":scan_preview",
- ":scan_to_select",
- ":scanner_select",
- ":scanning_app",
- ":scanning_app_types",
- ":scanning_app_util",
- ":scanning_browser_proxy",
- ":select_behavior",
- ":source_select",
- ]
-}
-
-js_library("color_mode_select") {
- deps = [
- ":scanning_app_util",
- ":select_behavior",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("loading_page") {
- deps = [
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("file_type_select") {
- deps = [
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("page_size_select") {
- deps = [
- ":scanning_app_util",
- ":select_behavior",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("resolution_select") {
- deps = [
- ":select_behavior",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scan_done_section") {
- deps = [
- ":scanning_app_types",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scan_preview") {
- deps = [
- ":scanning_app_types",
- ":scanning_app_util",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scan_to_select") {
- deps = [
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scanner_select") {
- deps = [
- ":scanning_app_types",
- ":scanning_app_util",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scanning_app") {
- deps = [
- ":color_mode_select",
- ":file_type_select",
- ":loading_page",
- ":mojo_interface_provider",
- ":page_size_select",
- ":resolution_select",
- ":scan_preview",
- ":scan_to_select",
- ":scanner_select",
- ":scanning_app_types",
- ":scanning_app_util",
- ":scanning_browser_proxy",
- ":source_select",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/cr_elements:cr_container_shadow_behavior.m",
- "//ui/webui/resources/cr_elements/cr_toast:cr_toast.m",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scanning_app_types") {
-}
-
-js_library("scanning_app_util") {
-}
-
-js_library("select_behavior") {
-}
-
-js_library("source_select") {
- deps = [
- ":scanning_app_util",
- ":select_behavior",
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled",
- "//ui/webui/resources/js:i18n_behavior.m",
- ]
-}
-
-js_library("scanning_browser_proxy") {
- deps = [ "//ui/webui/resources/js:cr.m" ]
-}
-
-js_library("mojo_interface_provider") {
- deps = [
- "//chromeos/components/scanning/mojom:mojom_js_library_for_compile",
- "//ui/webui/resources/js:cr.m",
- ]
-}
-
-html_to_js("web_components") {
- js_files = [
- "color_mode_select.js",
- "file_type_select.js",
- "loading_page.js",
- "page_size_select.js",
- "resolution_select.js",
- "scan_preview.js",
- "scan_done_section.js",
- "scan_settings_section.js",
- "scanner_select.js",
- "scan_to_select.js",
- "scanning_app.js",
- "scanning_fonts_css.js",
- "scanning_shared_css.js",
- "source_select.js",
- ]
-}
diff --git a/chromium/chromeos/components/sync_wifi/BUILD.gn b/chromium/chromeos/components/sync_wifi/BUILD.gn
index f1e8b064d6e..f665f11838f 100644
--- a/chromium/chromeos/components/sync_wifi/BUILD.gn
+++ b/chromium/chromeos/components/sync_wifi/BUILD.gn
@@ -30,6 +30,7 @@ static_library("sync_wifi") {
]
deps = [
":network_eligibility_checker",
+ "//ash/constants",
"//ash/public/cpp",
"//base",
"//chromeos/dbus/shill",
@@ -101,6 +102,7 @@ source_set("unit_tests") {
deps = [
":sync_wifi",
":test_support",
+ "//ash/constants",
"//ash/public/cpp",
"//base/test:test_support",
"//chromeos/dbus/shill:test_support",
diff --git a/chromium/chromeos/components/telemetry_extension_ui/BUILD.gn b/chromium/chromeos/components/telemetry_extension_ui/BUILD.gn
index ce04897a00e..62824b68323 100644
--- a/chromium/chromeos/components/telemetry_extension_ui/BUILD.gn
+++ b/chromium/chromeos/components/telemetry_extension_ui/BUILD.gn
@@ -36,7 +36,7 @@ source_set("telemetry_extension_ui") {
deps = [
"//ash/constants",
"//base",
- "//chrome/browser/chromeos/wilco_dtc_supportd:mojo_utils",
+ "//chrome/browser/ash/wilco_dtc_supportd:mojo_utils",
"//chromeos/components/telemetry_extension_ui/mojom",
"//chromeos/resources:telemetry_extension_resources",
"//chromeos/services/cros_healthd/public/cpp",
@@ -60,7 +60,7 @@ source_set("unit_tests") {
":telemetry_extension_ui",
"//base",
"//base/test:test_support",
- "//chrome/browser/chromeos/wilco_dtc_supportd:mojo_utils",
+ "//chrome/browser/ash/wilco_dtc_supportd:mojo_utils",
"//chromeos/components/telemetry_extension_ui/mojom",
"//chromeos/dbus/cros_healthd",
"//chromeos/services/cros_healthd/public/cpp",
diff --git a/chromium/chromeos/components/telemetry_extension_ui/test/BUILD.gn b/chromium/chromeos/components/telemetry_extension_ui/test/BUILD.gn
index 73d08e8c92c..efcd5b9fe85 100644
--- a/chromium/chromeos/components/telemetry_extension_ui/test/BUILD.gn
+++ b/chromium/chromeos/components/telemetry_extension_ui/test/BUILD.gn
@@ -32,7 +32,7 @@ source_set("browser_test_support") {
deps = [
"../:telemetry_extension_ui",
"//ash/constants",
- "//chrome/browser/chromeos/wilco_dtc_supportd:mojo_utils",
+ "//chrome/browser/ash/wilco_dtc_supportd:mojo_utils",
"//chrome/test:test_support_ui",
"//chromeos/components/web_applications/test:test_support",
"//chromeos/dbus/cros_healthd:cros_healthd",