diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:20:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:28:57 +0000 |
commit | d17ea114e5ef69ad5d5d7413280a13e6428098aa (patch) | |
tree | 2c01a75df69f30d27b1432467cfe7c1467a498da /chromium/chromecast | |
parent | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (diff) | |
download | qtwebengine-chromium-d17ea114e5ef69ad5d5d7413280a13e6428098aa.tar.gz |
BASELINE: Update Chromium to 67.0.3396.47
Change-Id: Idcb1341782e417561a2473eeecc82642dafda5b7
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/chromecast')
26 files changed, 444 insertions, 45 deletions
diff --git a/chromium/chromecast/BUILD.gn b/chromium/chromecast/BUILD.gn index 39a00c9749c..51527f87981 100644 --- a/chromium/chromecast/BUILD.gn +++ b/chromium/chromecast/BUILD.gn @@ -62,6 +62,7 @@ cast_test_group("cast_tests") { "//chromecast/base:cast_base_unittests", "//chromecast/base/component:cast_component_unittests", "//chromecast/crypto:cast_crypto_unittests", + "//chromecast/device/bluetooth:cast_bluetooth_unittests", "//chromecast/media:cast_media_unittests", "//chromecast/net:cast_net_unittests", "//chromecast/system/reboot:cast_reboot_unittests", @@ -329,9 +330,9 @@ cast_test_group("cast_tests") { # Run net_unittests first to avoid random failures due to slow python startup # URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase # timeout to 90s from 45s to allow it to pass (b/19821476) - # ProxyScriptFetcherImplTest.HttpMimeType is flaking (b/19848784) + # PacFileFetcherImplTest.HttpMimeType is flaking (b/19848784) # Running a batch of net_unittests has high overhead. Run tests in batches of 50 to reduce number of batches (b/23156294). - gtest_excludes = [ "ProxyScriptFetcherImplTest.HttpMimeType" ] + gtest_excludes = [ "PacFileFetcherImplTest.HttpMimeType" ] args = [ "--test-launcher-timeout=90000", "--test-launcher-batch-limit=50", @@ -462,8 +463,6 @@ if (is_fuchsia) { repack("cast_shell_pak") { sources = [ - "$root_gen_dir/blink/public/resources/blink_resources.pak", - "$root_gen_dir/blink/public/resources/blink_scaled_resources_100_percent.pak", "$root_gen_dir/chromecast/app/shell_resources.pak", "$root_gen_dir/chromecast/browser/cast_browser_resources.pak", "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", @@ -471,6 +470,8 @@ repack("cast_shell_pak") { "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", "$root_gen_dir/net/net_resources.pak", + "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", + "$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak", "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", "$root_gen_dir/ui/resources/webui_resources.pak", "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", @@ -487,8 +488,8 @@ repack("cast_shell_pak") { "//content/app/strings", "//mojo/public/js:resources", "//net:net_resources", - "//third_party/WebKit/public:resources", - "//third_party/WebKit/public:scaled_resources_100_percent", + "//third_party/blink/public:resources", + "//third_party/blink/public:scaled_resources_100_percent", "//ui/resources", "//ui/strings", ] @@ -552,9 +553,7 @@ group("chromecast_locales_pak") { buildflag_header("chromecast_buildflags") { header = "chromecast_buildflags.h" - enable_application_media_capabilities = chromecast_branding != "public" flags = [ - "ENABLE_APPLICATION_MEDIA_CAPABILITIES=$enable_application_media_capabilities", "ENABLE_ASSISTANT=$enable_assistant", "ENABLE_VOLUME_TABLES_ACCESS=$enable_volume_tables_access", "IS_ANDROID_THINGS=$is_android_things", @@ -565,6 +564,7 @@ buildflag_header("chromecast_buildflags") { "ENABLE_HEADLESS_MUSIC_MODE=$enable_headless_music_mode", "ENABLE_CHROMECAST_EXTENSIONS=$enable_chromecast_extensions", "ENABLE_CAST_FRAGMENT=$enable_cast_fragment", + "IS_ANDROID_THINGS_NON_PUBLIC=$is_android_things_non_public", ] } diff --git a/chromium/chromecast/android/BUILD.gn b/chromium/chromecast/android/BUILD.gn index c8b4580ef5c..6bc8eed5dc2 100644 --- a/chromium/chromecast/android/BUILD.gn +++ b/chromium/chromecast/android/BUILD.gn @@ -36,7 +36,6 @@ cast_shared_library("libcast_shell_android") { deps += [ "//device/bluetooth", "//device/gamepad", - "//device/sensors", "//media/midi", "//ui/android", "//ui/events/devices", diff --git a/chromium/chromecast/app/BUILD.gn b/chromium/chromecast/app/BUILD.gn index ff92e919216..a1660b36bef 100644 --- a/chromium/chromecast/app/BUILD.gn +++ b/chromium/chromecast/app/BUILD.gn @@ -81,7 +81,7 @@ cast_source_set("test_support") { "//chromecast/base", "//content/test:test_support", "//ipc", - "//mojo/edk/embedder:headers", + "//mojo/edk", ] } diff --git a/chromium/chromecast/base/BUILD.gn b/chromium/chromecast/base/BUILD.gn index 9abd8d93069..11d41493039 100644 --- a/chromium/chromecast/base/BUILD.gn +++ b/chromium/chromecast/base/BUILD.gn @@ -149,6 +149,7 @@ test("cast_base_unittests") { "cast_features_unittest.cc", "device_capabilities_impl_unittest.cc", "error_codes_unittest.cc", + "metrics/cast_metrics_helper_unittest.cc", "observer_unittest.cc", "path_utils_unittest.cc", "process_utils_unittest.cc", @@ -186,6 +187,7 @@ cast_source_set("cast_sys_info") { if (is_android) { deps += [ ":cast_version", + "//chromecast:chromecast_buildflags", "//chromecast/browser:jni_headers", ] } else if (chromecast_branding == "public") { @@ -279,6 +281,9 @@ if (is_android) { android_library("base_java") { java_src_dir = "//chromecast/base/java/src" java_files = [ + "$java_src_dir/org/chromium/chromecast/base/BiConsumer.java", + "$java_src_dir/org/chromium/chromecast/base/BiFunction.java", + "$java_src_dir/org/chromium/chromecast/base/BiPredicate.java", "$java_src_dir/org/chromium/chromecast/base/Both.java", "$java_src_dir/org/chromium/chromecast/base/CircularBuffer.java", "$java_src_dir/org/chromium/chromecast/base/Controller.java", @@ -286,14 +291,17 @@ if (is_android) { "$java_src_dir/org/chromium/chromecast/base/Function.java", "$java_src_dir/org/chromium/chromecast/base/Itertools.java", "$java_src_dir/org/chromium/chromecast/base/Observable.java", - "$java_src_dir/org/chromium/chromecast/base/ReactiveUtils.java", + "$java_src_dir/org/chromium/chromecast/base/Scope.java", + "$java_src_dir/org/chromium/chromecast/base/Predicate.java", "$java_src_dir/org/chromium/chromecast/base/ScopeFactories.java", "$java_src_dir/org/chromium/chromecast/base/ScopeFactory.java", + "$java_src_dir/org/chromium/chromecast/base/Supplier.java", "$java_src_dir/org/chromium/chromecast/base/Unit.java", "$java_src_dir/org/chromium/chromecast/base/VoidScopeFactory.java", # TODO(sanfin): Move these files to another target. "$java_src_dir/org/chromium/chromecast/base/CastSettingsManager.java", + "$java_src_dir/org/chromium/chromecast/base/CastSwitches.java", "$java_src_dir/org/chromium/chromecast/base/ChromecastConfigAndroid.java", "$java_src_dir/org/chromium/chromecast/base/DumpstateWriter.java", "$java_src_dir/org/chromium/chromecast/base/SystemTimeChangeNotifierAndroid.java", @@ -304,6 +312,20 @@ if (is_android) { ] } + android_library("cast_base_test_utils_java") { + java_test_dir = "//chromecast/base/java/test" + testonly = true + java_files = [ + "$java_test_dir/org/chromium/chromecast/base/Inheritance.java", + "$java_test_dir/org/chromium/chromecast/base/ReactiveRecorder.java", + ] + deps = [ + ":base_java", + "//third_party/hamcrest:hamcrest_java", + "//third_party/junit", + ] + } + junit_binary("cast_base_junit_tests") { java_test_dir = "//chromecast/base/java/test" java_files = [ @@ -311,13 +333,13 @@ if (is_android) { "$java_test_dir/org/chromium/chromecast/base/CircularBufferTest.java", "$java_test_dir/org/chromium/chromecast/base/ItertoolsTest.java", "$java_test_dir/org/chromium/chromecast/base/ObservableAndControllerTest.java", - "$java_test_dir/org/chromium/chromecast/base/ReactiveUtilsTest.java", + "$java_test_dir/org/chromium/chromecast/base/ReactiveRecorderTest.java", "$java_test_dir/org/chromium/chromecast/base/ScopeFactoriesTest.java", - "$java_test_dir/org/chromium/chromecast/base/TestUtils.java", "$java_test_dir/org/chromium/chromecast/base/UnitTest.java", ] deps = [ ":base_java", + ":cast_base_test_utils_java", "//third_party/hamcrest:hamcrest_java", ] } diff --git a/chromium/chromecast/base/metrics/BUILD.gn b/chromium/chromecast/base/metrics/BUILD.gn index 8751383a982..f1bde850c4e 100644 --- a/chromium/chromecast/base/metrics/BUILD.gn +++ b/chromium/chromecast/base/metrics/BUILD.gn @@ -22,8 +22,6 @@ cast_source_set("test_support") { testonly = true sources = [ - "cast_metrics_test_helper.cc", - "cast_metrics_test_helper.h", "mock_cast_metrics_helper.cc", "mock_cast_metrics_helper.h", ] diff --git a/chromium/chromecast/browser/BUILD.gn b/chromium/chromecast/browser/BUILD.gn index f91c10b25db..7de386d145e 100644 --- a/chromium/chromecast/browser/BUILD.gn +++ b/chromium/chromecast/browser/BUILD.gn @@ -46,6 +46,7 @@ cast_source_set("browser") { "cast_resource_dispatcher_host_delegate.h", "cast_web_contents_manager.cc", "cast_web_contents_manager.h", + "cast_web_view.cc", "cast_web_view.h", "cast_web_view_default.cc", "cast_web_view_default.h", @@ -65,6 +66,8 @@ cast_source_set("browser") { "metrics/cast_metrics_service_client.h", "metrics/cast_stability_metrics_provider.cc", "metrics/cast_stability_metrics_provider.h", + "network_context_manager.cc", + "network_context_manager.h", "pref_service_helper.cc", "pref_service_helper.h", "renderer_prelauncher.cc", @@ -119,20 +122,24 @@ cast_source_set("browser") { "//components/network_session_configurator/common", "//components/prefs", "//components/proxy_config", + "//components/viz/service", "//content", "//content/public/browser", "//content/public/common", "//content/public/common:service_names", "//content/public/utility", + "//device/bluetooth", "//device/geolocation", "//gpu", "//ipc", "//media", "//net", + "//services/network:network_service", "//ui/base", "//ui/compositor", "//ui/display", "//ui/events", + "//ui/events/devices", "//ui/gl", ] @@ -212,6 +219,10 @@ cast_source_set("browser") { "cast_web_view_extension.h", "extension_request_protocol_handler.cc", "extension_request_protocol_handler.h", + "extensions/api/bookmarks/bookmarks_api.cc", + "extensions/api/bookmarks/bookmarks_api.h", + "extensions/api/history/history_api.cc", + "extensions/api/history/history_api.h", "extensions/api/identity/identity_api.cc", "extensions/api/identity/identity_api.h", "extensions/cast_display_info_provider.cc", @@ -234,6 +245,8 @@ cast_source_set("browser") { ] deps += [ + "//chromecast/common/extensions_api:api_registration_bundle_generator_registration", + "//chromecast/common/extensions_api:api_schema_generator", "//components/guest_view/browser", "//components/keyed_service/content", "//components/pref_registry", @@ -243,7 +256,6 @@ cast_source_set("browser") { "//extensions/browser", "//extensions/common", "//extensions/common/api", - "//extensions/shell/common/api:api_registration_bundle_generator_registration", "//google_apis:google_apis", ] } @@ -313,8 +325,6 @@ cast_source_set("test_support") { sources = [ "test/cast_browser_test.cc", "test/cast_browser_test.h", - "test/fake_web_contents_observer.cc", - "test/fake_web_contents_observer.h", ] public_deps = [ @@ -325,7 +335,6 @@ cast_source_set("test_support") { deps = [ "//base", "//chromecast/base", - "//chromecast/common:interfaces", "//content/public/browser", "//content/public/common", "//testing/gtest", @@ -361,6 +370,7 @@ cast_source_set("unittests") { "cast_media_blocker_unittest.cc", "cast_touch_device_manager_unittest.cc", "devtools/cast_devtools_manager_delegate_unittest.cc", + "network_context_manager_unittest.cc", ] deps = [ @@ -369,6 +379,8 @@ cast_source_set("unittests") { "//chromecast/base", "//content/public/browser", "//content/test:test_support", + "//net:test_support", + "//services/network:test_support", "//ui/events/devices:devices", "//ui/gl:test_support", ] @@ -384,6 +396,10 @@ if (is_android) { "android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java", ] + if (is_android_things_non_public) { + sources += [ "android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroidThings.java" ] + } + jni_package = "chromecast" } } diff --git a/chromium/chromecast/browser/android/BUILD.gn b/chromium/chromecast/browser/android/BUILD.gn index 117732d1ba5..fefb400a0c4 100644 --- a/chromium/chromecast/browser/android/BUILD.gn +++ b/chromium/chromecast/browser/android/BUILD.gn @@ -82,9 +82,13 @@ android_aidl("logs_provider_aidl") { android_library("reactive_android_java") { java_src_dir = "//chromecast/browser/android/apk/src" - java_files = [ "$java_src_dir/org/chromium/chromecast/shell/LocalBroadcastReceiverScope.java" ] + java_files = [ + "$java_src_dir/org/chromium/chromecast/shell/AsyncTaskRunner.java", + "$java_src_dir/org/chromium/chromecast/shell/LocalBroadcastReceiverScope.java", + ] deps = [ "//base:base_java", + "//chromecast/base:base_java", "//third_party/android_tools:android_support_core_utils_java", ] } @@ -103,10 +107,11 @@ android_library("cast_shell_java") { "$java_src_dir/org/chromium/chromecast/shell/CastMetricsHelper.java", "$java_src_dir/org/chromium/chromecast/shell/CastSysInfoAndroid.java", "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsActivity.java", + "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsComponent.java", "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsFragment.java", + "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsIntentUtils.java", "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsService.java", "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java", - "$java_src_dir/org/chromium/chromecast/shell/CastWebContentsComponent.java", "$java_src_dir/org/chromium/chromecast/shell/LogcatElision.java", "$java_src_dir/org/chromium/chromecast/shell/ElidedLogcatProvider.java", ] @@ -141,12 +146,20 @@ android_library("cast_shell_java") { if (is_cast_using_cma_backend) { deps += [ "//chromecast/media/cma/backend/android:audio_track_java" ] } + + if (is_android_things_non_public) { + java_files += [ "$java_src_dir/org/chromium/chromecast/shell/CastSysInfoAndroidThings.java" ] + deps += [ "//chromecast/internal/android/prebuilt/things:support_lib_java" ] + } } junit_binary("cast_shell_junit_tests") { java_files = [ + "junit/src/org/chromium/chromecast/shell/AsyncTaskRunnerTest.java", "junit/src/org/chromium/chromecast/shell/CastAudioManagerTest.java", + "junit/src/org/chromium/chromecast/shell/CastWebContentsActivityTest.java", "junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java", + "junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java", "junit/src/org/chromium/chromecast/shell/LocalBroadcastReceiverScopeTest.java", "junit/src/org/chromium/chromecast/shell/LogcatElisionUnitTest.java", "junit/src/org/chromium/chromecast/shell/ElidedLogcatProviderUnitTest.java", diff --git a/chromium/chromecast/chromecast.gni b/chromium/chromecast/chromecast.gni index e3a34661f90..1907fb611c0 100644 --- a/chromium/chromecast/chromecast.gni +++ b/chromium/chromecast/chromecast.gni @@ -4,7 +4,7 @@ import("//build/config/chromecast_build.gni") import("//build/config/locales.gni") -import("//extensions/features/features.gni") +import("//extensions/buildflags/buildflags.gni") # This args block should contain arguments used within the //chromecast # directory. Arguments which are used in other Chrome components should @@ -75,11 +75,17 @@ declare_args() { device_logs_provider_package = "" device_logs_provider_class = "" } + + # Set to true to enable a CMA media backend that allows mixed audio to be + # output with sync'd video. + enable_video_with_mixed_audio = false } declare_args() { enable_volume_tables_access = is_android_things && chromecast_branding != "public" + is_android_things_non_public = + is_android_things && chromecast_branding != "public" } declare_args() { diff --git a/chromium/chromecast/common/BUILD.gn b/chromium/chromecast/common/BUILD.gn index a842ca3e1f1..8540444047f 100644 --- a/chromium/chromecast/common/BUILD.gn +++ b/chromium/chromecast/common/BUILD.gn @@ -33,15 +33,16 @@ cast_source_set("common") { ] deps += [ + "//chromecast/common/extensions_api:api", + "//chromecast/common/extensions_api:api_registration", + "//chromecast/common/extensions_api:api_schema_generator", + "//chromecast/common/extensions_api:extensions_features", "//components/version_info", "//extensions:extensions_resources_grd_grit", "//extensions/common", "//extensions/common/api:generated_api_bundle_generator_schema", "//extensions/shell:resources", "//extensions/shell:resources_grit", - "//extensions/shell/common/api", - "//extensions/shell/common/api:api_registration", - "//extensions/shell/common/api:extensions_features", ] } } diff --git a/chromium/chromecast/common/extensions_api/BUILD.gn b/chromium/chromecast/common/extensions_api/BUILD.gn new file mode 100644 index 00000000000..56d2ca6b07a --- /dev/null +++ b/chromium/chromecast/common/extensions_api/BUILD.gn @@ -0,0 +1,80 @@ +# 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("//extensions/buildflags/buildflags.gni") +import("//tools/json_schema_compiler/json_features.gni") +import("//tools/json_schema_compiler/json_schema_api.gni") + +assert(enable_extensions, + "Cannot depend on extensions because enable_extensions=false.") + +schema_sources = [ + "bookmarks.json", + "history.json", + "identity.idl", +] +root_namespace = "extensions::cast::api::%(namespace)s" + +json_schema_api("api") { + sources = schema_sources + schemas = true + bundle = true + bundle_name = "Cast" +} + +json_schema_api("api_registration") { + sources = schema_sources + impl_dir = "//chromecast/browser/extensions/api" + bundle_registration = true + bundle_name = "Cast" + + deps = [ + ":api", + "//extensions/common", + ] +} + +json_features("cast_api_features") { + feature_type = "APIFeature" + provider_class = "CastAPIFeatureProvider" + sources = [ + "../../../extensions/common/api/_api_features.json", + "_api_features.json", + ] +} + +json_features("cast_permission_features") { + feature_type = "PermissionFeature" + provider_class = "CastPermissionFeatureProvider" + sources = [ + "../../../extensions/common/api/_permission_features.json", + "_permission_features.json", + ] +} + +json_features("cast_manifest_features") { + feature_type = "ManifestFeature" + provider_class = "CastManifestFeatureProvider" + sources = [ + "../../../extensions/common/api/_manifest_features.json", + "_manifest_features.json", + ] +} + +json_features("cast_behavior_features") { + feature_type = "BehaviorFeature" + provider_class = "CastBehaviorFeatureProvider" + sources = [ + "../../../extensions/common/api/_behavior_features.json", + ] +} + +group("extensions_features") { + public_deps = [ + ":cast_api_features", + ":cast_behavior_features", + ":cast_manifest_features", + ":cast_permission_features", + ] +} diff --git a/chromium/chromecast/device/bluetooth/BUILD.gn b/chromium/chromecast/device/bluetooth/BUILD.gn new file mode 100644 index 00000000000..7127ef38a26 --- /dev/null +++ b/chromium/chromecast/device/bluetooth/BUILD.gn @@ -0,0 +1,48 @@ +# 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("//chromecast/chromecast.gni") +import("//testing/test.gni") + +cast_source_set("util") { + sources = [ + "bluetooth_util.cc", + "bluetooth_util.h", + ] + + deps = [ + "//base", + "//chromecast/public", + ] +} + +test("cast_bluetooth_unittests") { + sources = [ + "bluetooth_util_test.cc", + ] + + deps = [ + ":util", + "//base", + "//base/test:run_all_unittests", + "//base/test:test_support", + "//chromecast/device/bluetooth/le:unittests", + "//testing/gmock:gmock", + "//testing/gtest:gtest", + ] +} + +cast_source_set("test_support") { + testonly = true + + sources = [ + "test_util.cc", + "test_util.h", + ] + + deps = [ + "//base", + "//chromecast/public", + ] +} diff --git a/chromium/chromecast/device/bluetooth/le/BUILD.gn b/chromium/chromecast/device/bluetooth/le/BUILD.gn new file mode 100644 index 00000000000..b3a17259bb2 --- /dev/null +++ b/chromium/chromecast/device/bluetooth/le/BUILD.gn @@ -0,0 +1,93 @@ +# 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("//chromecast/chromecast.gni") + +cast_source_set("le") { + sources = [ + "gatt_client_manager.h", + "gatt_client_manager_impl.cc", + "gatt_client_manager_impl.h", + "le_scan_manager.h", + "le_scan_manager_impl.cc", + "le_scan_manager_impl.h", + "le_scan_result.cc", + "le_scan_result.h", + "remote_characteristic.h", + "remote_characteristic_impl.cc", + "remote_characteristic_impl.h", + "remote_descriptor.cc", + "remote_descriptor.h", + "remote_descriptor_impl.cc", + "remote_descriptor_impl.h", + "remote_device.h", + "remote_device_impl.cc", + "remote_device_impl.h", + "remote_service.h", + "remote_service_impl.cc", + "remote_service_impl.h", + "scan_filter.cc", + "scan_filter.h", + ] + + public_deps = [ + "//chromecast/public", + ] + + deps = [ + "//base", + "//chromecast/base", + "//chromecast/device/bluetooth:util", + "//chromecast/device/bluetooth/shlib", + "//chromecast/public", + ] +} + +cast_source_set("test_support") { + testonly = true + + sources = [ + "mock_gatt_client_manager.cc", + "mock_gatt_client_manager.h", + "mock_le_scan_manager.cc", + "mock_le_scan_manager.h", + "mock_remote_characteristic.cc", + "mock_remote_characteristic.h", + "mock_remote_descriptor.cc", + "mock_remote_descriptor.h", + "mock_remote_device.cc", + "mock_remote_device.h", + "mock_remote_service.cc", + "mock_remote_service.h", + ] + deps = [ + ":le", + "//chromecast/public", + "//testing/gmock", + ] +} + +cast_source_set("unittests") { + testonly = true + + sources = [ + "gatt_client_manager_impl_test.cc", + "instantiate_mocks.cc", + "le_scan_manager_impl_test.cc", + "le_scan_result_test.cc", + "scan_filter_test.cc", + ] + deps = [ + ":le", + ":test_support", + "//base", + "//base/test:test_support", + "//chromecast/device/bluetooth:test_support", + "//chromecast/device/bluetooth:util", + "//chromecast/device/bluetooth/shlib:mock_shlib", + "//chromecast/public", + "//testing/gmock", + "//testing/gtest", + ] +} diff --git a/chromium/chromecast/device/bluetooth/shlib/BUILD.gn b/chromium/chromecast/device/bluetooth/shlib/BUILD.gn new file mode 100644 index 00000000000..84ef01f81d5 --- /dev/null +++ b/chromium/chromecast/device/bluetooth/shlib/BUILD.gn @@ -0,0 +1,30 @@ +# 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("//chromecast/chromecast.gni") + +cast_source_set("shlib") { + sources = [ + "gatt_client.h", + "le_scanner.h", + ] + + deps = [ + "//chromecast/public", + ] +} + +cast_source_set("mock_shlib") { + testonly = true + sources = [ + "mock_gatt_client.h", + "mock_le_scanner.h", + ] + + deps = [ + ":shlib", + "//chromecast/public", + "//testing/gmock:gmock", + ] +} diff --git a/chromium/chromecast/graphics/BUILD.gn b/chromium/chromecast/graphics/BUILD.gn index 42332da1a69..63a587188cd 100644 --- a/chromium/chromecast/graphics/BUILD.gn +++ b/chromium/chromecast/graphics/BUILD.gn @@ -87,7 +87,7 @@ if (use_aura && !is_cast_audio_only) { deps = [ ":graphics", "//base/test:test_support", - "//mojo/edk/system", + "//mojo/edk", "//testing/gtest", "//ui/aura", "//ui/aura:test_support", diff --git a/chromium/chromecast/media/BUILD.gn b/chromium/chromecast/media/BUILD.gn index fdd133f5ab6..ed06300ad70 100644 --- a/chromium/chromecast/media/BUILD.gn +++ b/chromium/chromecast/media/BUILD.gn @@ -48,6 +48,7 @@ test("cast_media_unittests") { "base/media_resource_tracker_unittest.cc", "base/slew_volume_unittests.cc", "base/supported_codec_profile_levels_memo_unittest.cc", + "cma/backend/audio_decoder_software_wrapper_unittest.cc", "test/run_all_unittests.cc", ] diff --git a/chromium/chromecast/media/base/BUILD.gn b/chromium/chromecast/media/base/BUILD.gn index 9237b8c04e9..bc5fe5bfd94 100644 --- a/chromium/chromecast/media/base/BUILD.gn +++ b/chromium/chromecast/media/base/BUILD.gn @@ -106,5 +106,7 @@ cast_source_set("video_plane_controller") { deps = [ "//base", "//chromecast/media:libcast_media", + "//ui/gfx", + "//ui/gfx/geometry", ] } diff --git a/chromium/chromecast/media/cma/BUILD.gn b/chromium/chromecast/media/cma/BUILD.gn index 3dd4a5b0dc1..c53e9a4aa78 100644 --- a/chromium/chromecast/media/cma/BUILD.gn +++ b/chromium/chromecast/media/cma/BUILD.gn @@ -21,19 +21,20 @@ cast_source_set("test_support") { "test/frame_generator_for_test.h", "test/frame_segmenter_for_test.cc", "test/frame_segmenter_for_test.h", + "test/mock_cma_backend.cc", + "test/mock_cma_backend.h", + "test/mock_cma_backend_factory.cc", + "test/mock_cma_backend_factory.h", "test/mock_frame_consumer.cc", "test/mock_frame_consumer.h", "test/mock_frame_provider.cc", "test/mock_frame_provider.h", - "test/mock_media_pipeline_backend.cc", - "test/mock_media_pipeline_backend.h", - "test/mock_media_pipeline_backend_factory.cc", - "test/mock_media_pipeline_backend_factory.h", ] deps = [ "//base", "//chromecast/media/cma/backend", + "//chromecast/media/cma/backend:null_video", "//chromecast/media/cma/base", "//media:test_support", "//testing/gmock", @@ -46,6 +47,12 @@ cast_source_set("unittests") { testonly = true sources = [ "backend/audio_video_pipeline_device_unittest.cc", + + # TODO(almasrymina): enable these tests. + # "backend/av_sync_unittest.cc", + # "backend/mock_audio_decoder_for_mixer.cc", + # "backend/mock_video_decoder_for_mixer.cc", + # "backend/video/av_sync_video.cc", "base/balanced_media_task_runner_unittest.cc", "base/buffering_controller_unittest.cc", "base/buffering_frame_provider_unittest.cc", diff --git a/chromium/chromecast/media/cma/backend/BUILD.gn b/chromium/chromecast/media/cma/backend/BUILD.gn index 0d68567dfa4..87e9670492c 100644 --- a/chromium/chromecast/media/cma/backend/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/BUILD.gn @@ -18,15 +18,20 @@ declare_args() { cast_source_set("backend") { sources = [ + "audio_decoder_software_wrapper.cc", + "audio_decoder_software_wrapper.h", "audio_decoder_wrapper.cc", "audio_decoder_wrapper.h", - "media_pipeline_backend_factory.h", - "media_pipeline_backend_factory_impl.cc", - "media_pipeline_backend_factory_impl.h", + "cma_backend.h", + "cma_backend_factory.h", + "cma_backend_factory_impl.cc", + "cma_backend_factory_impl.h", "media_pipeline_backend_manager.cc", "media_pipeline_backend_manager.h", "media_pipeline_backend_wrapper.cc", "media_pipeline_backend_wrapper.h", + "video_decoder_wrapper.cc", + "video_decoder_wrapper.h", ] public_deps = [ @@ -40,6 +45,7 @@ cast_source_set("backend") { "//chromecast/base/metrics:metrics", "//chromecast/media:libcast_media", "//chromecast/media/cma/base", + "//chromecast/media/cma/decoder", ] } @@ -93,7 +99,7 @@ buildflag_header("audio_buildflags") { # Implementation of video decoder that discards decoder buffers. # Used on audio platforms for media streams containing video. -cast_source_set("null") { +cast_source_set("null_video") { sources = [ "video_decoder_null.cc", "video_decoder_null.h", @@ -117,19 +123,52 @@ cast_source_set("public") { ] } +cast_source_set("audio_helpers") { + sources = [ + "audio_fader.cc", + "audio_fader.h", + ] + + deps = [ + "//base", + "//media", + ] +} + +cast_source_set("av_sync_dummy") { + sources = [ + "av_sync_dummy.cc", + ] + + deps = [ + "//base", + "//chromecast/public", + ] +} + +cast_source_set("audio_codec_support") { + sources = [ + "media_codec_support_cast_audio.cc", + ] + deps = [ + "//base", + "//chromecast/public", + "//chromecast/public/media:media", + ] +} + cast_source_set("for_mixer_audio") { sources = [ "audio_decoder_for_mixer.cc", "audio_decoder_for_mixer.h", - "audio_fader.cc", - "audio_fader.h", "buffering_mixer_source.cc", "buffering_mixer_source.h", "cast_audio_json.cc", "cast_audio_json.h", + "direct_mixer_source.cc", + "direct_mixer_source.h", "filter_group.cc", "filter_group.h", - "media_codec_support_cast_audio.cc", "media_pipeline_backend_for_mixer.cc", "media_pipeline_backend_for_mixer.h", "mixer_input.cc", @@ -150,7 +189,7 @@ cast_source_set("for_mixer_audio") { deps = [ ":audio_buildflags", - ":null", + ":audio_helpers", ":public", "//base", "//chromecast/base", @@ -175,15 +214,18 @@ cast_source_set("for_mixer_audio") { test("cast_audio_backend_unittests") { testonly = true sources = [ + "audio_fader_unittest.cc", "filter_group_unittest.cc", "mock_mixer_source.cc", "mock_mixer_source.h", - - # "stream_mixer_unittest.cc", + "stream_mixer_unittest.cc", ] deps = [ + ":audio_helpers", + ":av_sync_dummy", ":for_mixer_audio", + ":null_video", ":public", "//base", "//base/test:run_all_unittests", diff --git a/chromium/chromecast/media/cma/backend/alsa/BUILD.gn b/chromium/chromecast/media/cma/backend/alsa/BUILD.gn index e31d2d88d38..52aaaad8efc 100644 --- a/chromium/chromecast/media/cma/backend/alsa/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/alsa/BUILD.gn @@ -18,7 +18,10 @@ cast_shared_library("libcast_media_1.0_audio") { deps = [ "//base", "//chromecast/base", + "//chromecast/media/cma/backend:audio_codec_support", + "//chromecast/media/cma/backend:av_sync_dummy", "//chromecast/media/cma/backend:for_mixer_audio", + "//chromecast/media/cma/backend:null_video", "//chromecast/public", "//chromecast/public/media", "//media", diff --git a/chromium/chromecast/media/cma/backend/android/BUILD.gn b/chromium/chromecast/media/cma/backend/android/BUILD.gn index af5f5abcf08..f95d56b1403 100644 --- a/chromium/chromecast/media/cma/backend/android/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/android/BUILD.gn @@ -30,7 +30,7 @@ cast_source_set("cast_media_android") { "//base", "//chromecast:chromecast_buildflags", "//chromecast/base", - "//chromecast/media/cma/backend:null", + "//chromecast/media/cma/backend:null_video", "//chromecast/media/cma/base", "//chromecast/media/cma/decoder", "//chromecast/public/media", diff --git a/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn b/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn index 5add6be8dff..866d5d605ab 100644 --- a/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn +++ b/chromium/chromecast/media/cma/backend/fuchsia/BUILD.gn @@ -16,7 +16,10 @@ cast_source_set("media_backend") { deps = [ "//base", "//chromecast/base", + "//chromecast/media/cma/backend:audio_codec_support", + "//chromecast/media/cma/backend:av_sync_dummy", "//chromecast/media/cma/backend:for_mixer_audio", + "//chromecast/media/cma/backend:null_video", "//chromecast/public", "//chromecast/public/media", "//media", diff --git a/chromium/chromecast/media/cma/backend/video/BUILD.gn b/chromium/chromecast/media/cma/backend/video/BUILD.gn new file mode 100644 index 00000000000..6ea19207055 --- /dev/null +++ b/chromium/chromecast/media/cma/backend/video/BUILD.gn @@ -0,0 +1,25 @@ +# 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("//build/config/chromecast_build.gni") +import("//chromecast/chromecast.gni") +import("//media/media_options.gni") + +cast_shared_library("libcast_media_1.0_avsync") { + sources = [ + "av_sync_video.cc", + "cast_media_shlib.cc", + ] + + deps = [ + "//chromecast/base:base", + "//chromecast/media/cma/backend:for_mixer_audio", + "//chromecast/media/cma/backend/alsa:cma_backend_support", + "//chromecast/public", + "//chromecast/public/media", + "//media", + ] + + libs = [ "videodecoderformixer" ] +} diff --git a/chromium/chromecast/media/cma/pipeline/BUILD.gn b/chromium/chromecast/media/cma/pipeline/BUILD.gn index 75e2013c519..9e04865f588 100644 --- a/chromium/chromecast/media/cma/pipeline/BUILD.gn +++ b/chromium/chromecast/media/cma/pipeline/BUILD.gn @@ -13,8 +13,6 @@ declare_args() { cast_source_set("pipeline") { sources = [ - "audio_decoder_software_wrapper.cc", - "audio_decoder_software_wrapper.h", "audio_pipeline_impl.cc", "audio_pipeline_impl.h", "av_pipeline_client.cc", @@ -55,7 +53,6 @@ cast_source_set("pipeline") { "//chromecast/media/cdm", "//chromecast/media/cma/backend", "//chromecast/media/cma/base", - "//chromecast/media/cma/decoder", "//crypto", "//crypto:platform", "//media", diff --git a/chromium/chromecast/public/BUILD.gn b/chromium/chromecast/public/BUILD.gn index cc046914317..e839008853f 100644 --- a/chromium/chromecast/public/BUILD.gn +++ b/chromium/chromecast/public/BUILD.gn @@ -11,6 +11,7 @@ config("public_config") { cast_source_set("public") { sources = [ "avsettings.h", + "bluetooth/bluetooth_types.h", "cast_egl_platform.h", "cast_egl_platform_shlib.h", "cast_media_shlib.h", diff --git a/chromium/chromecast/public/media/BUILD.gn b/chromium/chromecast/public/media/BUILD.gn index 2a43094ef28..448f4fdf186 100644 --- a/chromium/chromecast/public/media/BUILD.gn +++ b/chromium/chromecast/public/media/BUILD.gn @@ -12,6 +12,7 @@ cast_source_set("media") { "cast_decrypt_config.h", "cast_key_system.h", "decoder_config.h", + "direct_audio_source.h", "media_pipeline_backend.h", "media_pipeline_device_params.h", "stream_id.h", diff --git a/chromium/chromecast/system/reboot/BUILD.gn b/chromium/chromecast/system/reboot/BUILD.gn index 25331b929b0..b3cb23347bc 100644 --- a/chromium/chromecast/system/reboot/BUILD.gn +++ b/chromium/chromecast/system/reboot/BUILD.gn @@ -12,7 +12,6 @@ cast_source_set("reboot_util") { ] deps = [ - ":libcast_reboot_1.0", "//base", ] @@ -21,6 +20,18 @@ cast_source_set("reboot_util") { } else { sources += [ "reboot_util_dummy.cc" ] } + + if (is_android_things && chromecast_branding != "public") { + deps += [ + "//chromecast/internal/system/reboot/android:reboot_android_things", + "//chromecast/public", + ] + } else if (is_android) { + sources += [ "reboot_dummy.cc" ] + deps += [ "//chromecast/public" ] + } else { + deps += [ ":libcast_reboot_1.0" ] + } } test("cast_reboot_unittests") { |