diff --git a/arm/media/base/supported_types.cc b/arm/media/base/supported_types.cc index 95de0790..f2c352b8 100644 --- a/arm/media/base/supported_types.cc +++ b/arm/media/base/supported_types.cc @@ -401,21 +401,16 @@ bool IsDefaultSupportedAudioType(const AudioType& type) { } bool IsBuiltInVideoCodec(VideoCodec codec) { -#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) - if (codec == VideoCodec::kTheora) - return base::FeatureList::IsEnabled(kTheoraVideoCodec); - if (codec == VideoCodec::kVP8 && - base::FeatureList::IsEnabled(kFFmpegDecodeOpaqueVP8)) { +#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) && BUILDFLAG(USE_PROPRIETARY_CODECS) + if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) { return true; } -#if BUILDFLAG(USE_PROPRIETARY_CODECS) - if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) - return true; -#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) -#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) +#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) && + // BUILDFLAG(USE_PROPRIETARY_CODECS) #if BUILDFLAG(ENABLE_LIBVPX) - if (codec == VideoCodec::kVP8 || codec == VideoCodec::kVP9) + if (codec == VideoCodec::kVP8 || codec == VideoCodec::kVP9) { return true; + } #endif // BUILDFLAG(ENABLE_LIBVPX) #if BUILDFLAG(ENABLE_AV1_DECODER) if (codec == VideoCodec::kAV1) diff --git a/arm/media/ffmpeg/ffmpeg_common.cc b/arm/media/ffmpeg/ffmpeg_common.cc index bc72d34a..3331581a 100644 --- a/arm/media/ffmpeg/ffmpeg_common.cc +++ b/arm/media/ffmpeg/ffmpeg_common.cc @@ -887,14 +887,17 @@ ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout, int channels) { return CHANNEL_LAYOUT_7_1; case AV_CH_LAYOUT_7POINT1_WIDE: return CHANNEL_LAYOUT_7_1_WIDE; -#ifdef AV_CH_LAYOUT_7POINT1_WIDE_BACK case AV_CH_LAYOUT_7POINT1_WIDE_BACK: return CHANNEL_LAYOUT_7_1_WIDE_BACK; -#endif case AV_CH_LAYOUT_OCTAGONAL: return CHANNEL_LAYOUT_OCTAGONAL; case AV_CH_LAYOUT_STEREO_DOWNMIX: return CHANNEL_LAYOUT_STEREO_DOWNMIX; + case AV_CH_FRONT_CENTER | AV_CH_LOW_FREQUENCY: + return CHANNEL_LAYOUT_1_1; + case AV_CH_FRONT_LEFT | AV_CH_FRONT_RIGHT | AV_CH_LOW_FREQUENCY | + AV_CH_BACK_CENTER: + return CHANNEL_LAYOUT_3_1_BACK; default: // FFmpeg channel_layout is 0 for .wav and .mp3. Attempt to guess layout // based on the channel count. @@ -946,12 +949,9 @@ VideoPixelFormat AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format) { case AV_PIX_FMT_YUV444P12LE: return PIXEL_FORMAT_YUV444P12; - // When compiled without decoders, FFmpeg won't know the pixel format. - case AV_PIX_FMT_NONE: - return PIXEL_FORMAT_UNKNOWN; - default: - NOTREACHED() << "Unsupported pixel format: " << pixel_format; + // FFmpeg knows more pixel formats than Chromium cares about. + LOG(ERROR) << "Unsupported pixel format: " << pixel_format; return PIXEL_FORMAT_UNKNOWN; } } diff --git a/infra/THORIUM_DEV_BOOKMARKS.html b/infra/THORIUM_DEV_BOOKMARKS.html index 1de214e5..fd058860 100644 --- a/infra/THORIUM_DEV_BOOKMARKS.html +++ b/infra/THORIUM_DEV_BOOKMARKS.html @@ -32,6 +32,7 @@
google_api_keys_infobar_delegate.cc - Chromium Code Search
infobar_utils.cc - Chromium Code Search
default_browser_infobar_delegate.cc - Chromium Code Search +
bad_flags_prompt.cc - Chromium Code Search
installer/linux - Chromium Code Search
chrome.release - Chromium Code Search
mini_installer_exe_main.cc - Chromium Code Search @@ -188,7 +189,6 @@
native_theme_gtk.cc - Chromium Code Search
about_version.html - Chromium Code Search
supported_types.cc - Chromium Code Search -
bad_flags_prompt.cc - Chromium Code Search
variations_service.cc - Chromium Code Search
ffmpeg_common.cc - Chromium Code Search
BUILD.gn - Chromium Code Search diff --git a/src/chrome/android/BUILD.gn b/src/chrome/android/BUILD.gn index 326df0c8..f1217b13 100644 --- a/src/chrome/android/BUILD.gn +++ b/src/chrome/android/BUILD.gn @@ -55,6 +55,23 @@ if (android_64bit_target_cpu && !skip_secondary_abi_for_cq) { _monochrome_browser_toolchain = default_toolchain } +if (android_64bit_target_cpu) { + _main_monochrome_public_bundle_target = "monochrome_32_64_public_bundle" + _main_trichrome_chrome_bundle_target = "trichrome_chrome_32_64_bundle" + _main_trichrome_library_apk_target = "trichrome_library_32_64_apk" + _android_lint_target_name = "monochrome_64_public_bundle" + + # monochrome_apk is only 64-bit primary, we have no 32-bit primary version, + # as we don't ship it to users. + _main_monochrome_public_apk_target = "monochrome_64_32_public_apk" +} else { + _main_monochrome_public_bundle_target = "monochrome_public_bundle" + _main_monochrome_public_apk_target = "monochrome_public_apk" + _main_trichrome_chrome_bundle_target = "trichrome_chrome_bundle" + _main_trichrome_library_apk_target = "trichrome_library_apk" + _android_lint_target_name = "monochrome_public_bundle" +} + if (current_toolchain == default_toolchain) { app_hooks_impl = "java/src/org/chromium/chrome/browser/AppHooksImpl.java" @@ -70,6 +87,7 @@ if (current_toolchain == default_toolchain) { chrome_public_apk_or_module_tmpl(_base_module_target_name) { forward_variables_from(invoker, [ + "assert_no_deps", "add_view_trace_events", "expected_android_manifest", "is_64_bit_browser", @@ -103,16 +121,11 @@ if (current_toolchain == default_toolchain) { "add_view_trace_events", "art_profile_path", "bundle_name", - "enable_lint", "include_32_bit_webview", "include_64_bit_webview", "is_64_bit_browser", "is_monochrome", "is_trichrome", - "lint_baseline_file", - "lint_gen_dir", - "lint_min_sdk_version", - "lint_suppressions_file", "static_library_provider", "expected_android_manifest_template", "expected_libs_and_assets", @@ -122,6 +135,20 @@ if (current_toolchain == default_toolchain) { manifest_package = chrome_public_manifest_package module_descs = _module_descs chrome_deps = [ ":delegate_public_impl_java" ] + + if (target_name == _android_lint_target_name) { + enable_lint = true + + # Monochrome bundle is used as our unified lint target, so it needs to set the + # lowest shipping minSdkVersion to catch all potential NewApi errors. + lint_min_sdk_version = default_min_sdk_version + lint_baseline_file = "expectations/lint-baseline.xml" + lint_suppressions_file = "expectations/lint-suppressions.xml" + + # Since this target's name changes if we are 32 or 64 bit, we want to keep + # the gen_dir the same for the lint baseline files. + lint_gen_dir = "$target_gen_dir/monochrome_public_bundle__lint" + } } } @@ -172,6 +199,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/download/android:java_resources", "//chrome/browser/feed/android:feed_java_resources", "//chrome/browser/feedback/android:java_resources", + "//chrome/browser/hub/internal:java_resources", "//chrome/browser/image_descriptions:java_resources", "//chrome/browser/lens:java_resources", "//chrome/browser/magic_stack/android:java_resources", @@ -212,6 +240,7 @@ if (current_toolchain == default_toolchain) { "//components/javascript_dialogs/android:java_resources", "//components/media_router/browser/android:java_resources", "//components/messages/android:java_resources", + "//components/messages/android/internal:java_resources", "//components/omnibox/browser:java_resources", "//components/page_info/android:java_resources", "//components/payments/content/android:java_resources", @@ -246,10 +275,12 @@ if (current_toolchain == default_toolchain) { ":app_hooks_java", "//chrome/android/modules/readaloud/public:provider_public_java", "//chrome/browser/accessibility/hierarchysnapshotter/android:delegate_public_impl_java", + "//chrome/browser/android/metrics:delegate_public_impl_java", "//chrome/browser/auxiliary_search:delegate_public_impl_java", "//chrome/browser/feedback/android:delegate_public_impl_java", "//chrome/browser/lens:delegate_public_impl_java", "//chrome/browser/locale:delegate_public_impl_java", + "//chrome/browser/model_execution/android:delegate_public_impl_java", "//chrome/browser/partnerbookmarks:delegate_public_impl_java", "//chrome/browser/partnercustomizations:delegate_public_impl_java", "//chrome/browser/password_manager/android:public_impl_java", @@ -259,13 +290,13 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/touch_to_fill/password_manager/android/internal:resource_provider_public_impl_java", "//chrome/browser/ui/android/cars:delegate_public_impl_java", "//chrome/browser/ui/android/hats/internal:provider_public_impl_java", + "//chrome/browser/webauthn/android:recommender_public_java", "//chrome/browser/xsurface_provider:hooks_public_impl_java", "//components/externalauth/android:google_delegate_public_impl_java", "//components/language/android:ulp_delegate_public_java", "//components/search_engines/android:delegate_public_impl_java", "//components/signin/public/android:account_email_domain_displayability_java", "//components/sync/android:explicit_passphrase_platform_client_stub_java", - "//components/webauthn/android:delegate_public_java", "//content/public/android:identity_credentials_public_impl_java", ] } @@ -340,6 +371,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/contextmenu:java", "//chrome/browser/creator/android:java", "//chrome/browser/data_sharing:factory_java", + "//chrome/browser/data_sharing:java", "//chrome/browser/dependency_injection:java", "//chrome/browser/device:java", "//chrome/browser/device_reauth/android:java", @@ -349,7 +381,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/download/android:java_resources", "//chrome/browser/enterprise/util:java", "//chrome/browser/feature_engagement:java", - "//chrome/browser/feature_guide/notifications:java", "//chrome/browser/feed/android:java", "//chrome/browser/feedback/android:java", "//chrome/browser/first_run/android:java", @@ -368,6 +399,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/lens:java", "//chrome/browser/locale:java", "//chrome/browser/magic_stack/android:java", + "//chrome/browser/model_execution/android:java", "//chrome/browser/notifications/chime/android:java", "//chrome/browser/omaha/android:java", "//chrome/browser/optimization_guide/android:java", @@ -399,6 +431,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:java", "//chrome/browser/safe_browsing/android:java", "//chrome/browser/safety_check/android:java", + "//chrome/browser/safety_hub/android:java", "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_resumption:java", @@ -426,6 +459,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/edge_to_edge:java", "//chrome/browser/ui/android/fast_checkout:java", "//chrome/browser/ui/android/favicon:java", + "//chrome/browser/ui/android/google_bottom_bar:java", "//chrome/browser/ui/android/hats:factory_java", "//chrome/browser/ui/android/hats:java", "//chrome/browser/ui/android/hats:message_ui_delegate_java", @@ -440,6 +474,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/page_info:java", "//chrome/browser/ui/android/page_insights:java", "//chrome/browser/ui/android/page_insights:proto_java", + "//chrome/browser/ui/android/pdf:java", "//chrome/browser/ui/android/plus_addresses:java", "//chrome/browser/ui/android/quickactionsearchwidget:java", "//chrome/browser/ui/android/searchactivityutils:java", @@ -459,6 +494,8 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/xsurface:java", "//chrome/browser/xsurface_provider:dependency_provider_impl_java", "//chrome/browser/xsurface_provider:java", + "//components/android_autofill/browser:java", + "//components/autofill/android:autofill_features_java", "//components/autofill/android:autofill_java", "//components/background_task_scheduler:background_task_scheduler_java", "//components/background_task_scheduler:background_task_scheduler_task_ids_java", @@ -516,6 +553,7 @@ if (current_toolchain == default_toolchain) { "//components/embedder_support/android:web_contents_delegate_java", "//components/external_intents/android:java", "//components/externalauth/android:java", + "//components/facilitated_payments/android/java", "//components/favicon/android:java", "//components/feature_engagement:feature_engagement_java", "//components/feed/core/proto:proto_java_v2", @@ -713,6 +751,9 @@ if (current_toolchain == default_toolchain) { # the bundled version of Guava is not shadowed by the one in android_deps. # https://crbug.com/325425527 "//third_party/android_deps:dagger_processor", + ] + annotation_processor_deps += [ + # Adding non-dagger annotation_processor_deps here prevents auto-sorting "//components/module_installer/android:module_interface_processor", ] @@ -820,6 +861,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/fast_checkout/internal:java", "//chrome/browser/ui/android/hats/internal:java", "//chrome/browser/ui/android/webid/internal:java", + "//components/android_autofill/browser:java", "//components/autofill/android:payments_autofill_java", "//components/browser_ui/bottomsheet/android/internal:java", "//components/data_sharing/internal:internal_java", @@ -966,6 +1008,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/contextmenu:java", "//chrome/browser/creator/android:java", "//chrome/browser/creator/android:junit", + "//chrome/browser/data_sharing:java", "//chrome/browser/dependency_injection:java", "//chrome/browser/device:java", "//chrome/browser/device:junit", @@ -1032,6 +1075,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs/internal:junit", "//chrome/browser/safety_check/android:java", "//chrome/browser/safety_check/android:junit", + "//chrome/browser/safety_hub/android:java", "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_engines/android:junit", @@ -1060,12 +1104,14 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/touch_to_fill/password_manager/password_generation/android/internal:junit", "//chrome/browser/translate/android:junit", "//chrome/browser/ui/android/appmenu:java", + "//chrome/browser/ui/android/appmenu:java", "//chrome/browser/ui/android/appmenu/internal:junit", "//chrome/browser/ui/android/autofill/internal:junit", "//chrome/browser/ui/android/cars:junit", "//chrome/browser/ui/android/default_browser_promo:java", "//chrome/browser/ui/android/default_browser_promo:junit", "//chrome/browser/ui/android/device_lock:junit", + "//chrome/browser/ui/android/edge_to_edge:java", "//chrome/browser/ui/android/edge_to_edge/internal:junit", "//chrome/browser/ui/android/fast_checkout/internal:junit", "//chrome/browser/ui/android/favicon:java", @@ -1089,6 +1135,8 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/omnibox:java", "//chrome/browser/ui/android/omnibox:junit", "//chrome/browser/ui/android/page_insights:junit", + "//chrome/browser/ui/android/pdf:java", + "//chrome/browser/ui/android/pdf:junit", "//chrome/browser/ui/android/plus_addresses:junit", "//chrome/browser/ui/android/quickactionsearchwidget:java", "//chrome/browser/ui/android/searchactivityutils:java", @@ -1115,6 +1163,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/xsurface_provider:junit", "//chrome/test:sync_integration_test_support_java", "//chrome/test/android:chrome_java_unit_test_support", + "//components/android_autofill/browser:java", "//components/autofill/android:autofill_features_java", "//components/autofill/android:main_autofill_java", "//components/autofill/android:payments_autofill_java", @@ -1244,6 +1293,7 @@ if (current_toolchain == default_toolchain) { "//third_party/gif_player:gif_player_java", "//third_party/google-truth:google_truth_java", "//third_party/hamcrest:hamcrest_java", + "//third_party/metrics_proto:metrics_proto_java", "//ui/accessibility:ax_base_java", "//ui/accessibility:ui_accessibility_features_java", "//ui/android:ui_java", @@ -1398,7 +1448,6 @@ if (current_toolchain == default_toolchain) { "javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java", "javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java", "javatests/src/org/chromium/chrome/browser/externalnav/IntentWithRequestMetadataHandlerTest.java", - "javatests/src/org/chromium/chrome/browser/firstrun/FirstRunUtilsTest.java", "javatests/src/org/chromium/chrome/browser/init/ChainedTasksTest.java", "javatests/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridgeUnitTest.java", "javatests/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionViewRenderTest.java", @@ -1501,7 +1550,6 @@ if (current_toolchain == default_toolchain) { "//third_party/android_deps:guava_android_java", "//third_party/android_deps:material_design_java", "//third_party/android_deps:protobuf_lite_runtime_java", - "//third_party/android_sdk:android_test_base_java", "//third_party/android_sdk:android_test_mock_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_appcompat_appcompat_java", @@ -1511,6 +1559,7 @@ if (current_toolchain == default_toolchain) { "//third_party/androidx:androidx_fragment_fragment_java", "//third_party/androidx:androidx_test_core_java", "//third_party/androidx:androidx_test_monitor_java", + "//third_party/androidx:androidx_test_rules_java", "//third_party/androidx:androidx_test_runner_java", "//third_party/androidx:androidx_viewpager_viewpager_java", "//third_party/blink/public:blink_headers_java", @@ -1661,6 +1710,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/safe_browsing/android:javatests", "//chrome/browser/safety_check/android:java", "//chrome/browser/safety_check/android:javatests", + "//chrome/browser/safety_hub/android:java", "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/segmentation_platform:javatests", @@ -1841,6 +1891,7 @@ if (current_toolchain == default_toolchain) { "//components/sync/android:sync_java", "//components/sync/protocol:protocol_java", "//components/sync_device_info:sync_device_info_java", + "//components/tab_groups:tab_groups_java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", "//components/webapk:proto_java", @@ -1874,9 +1925,7 @@ if (current_toolchain == default_toolchain) { "//third_party/android_deps:material_design_java", "//third_party/android_deps:protobuf_lite_runtime_java", "//third_party/android_deps/local_modifications/preconditions/javatests", - "//third_party/android_sdk:android_test_base_java", "//third_party/android_sdk:android_test_mock_java", - "//third_party/android_sdk:android_test_runner_java", "//third_party/androidx:androidx_activity_activity_java", "//third_party/androidx:androidx_browser_browser_java", "//third_party/androidx:androidx_collection_collection_java", @@ -2481,6 +2530,12 @@ if (current_toolchain == default_toolchain) { target_type = "android_apk" apk_name = "Thorium_Public" art_profile_path = "//chrome/android/baseline_profiles/profile.txt" + if (android_64bit_target_cpu) { + # Ensure 64-bit chrome does not depend on 32-bit things. + assert_no_deps = + [ "//build/config:toolchain_marker_" + + get_label_info(android_secondary_abi_toolchain, "name") ] + } } chrome_public_bundle("chrome_public_bundle") { @@ -2634,21 +2689,6 @@ if (current_toolchain == default_toolchain) { resources_package = "org.chromium.chrome.base" } - if (android_64bit_target_cpu) { - _main_monochrome_public_bundle_target = "monochrome_32_64_public_bundle" - _main_trichrome_chrome_bundle_target = "trichrome_chrome_32_64_bundle" - _main_trichrome_library_apk_target = "trichrome_library_32_64_apk" - - # monochrome_apk is only 64-bit primary, we have no 32-bit primary version, - # as we don't ship it to users. - _main_monochrome_public_apk_target = "monochrome_64_32_public_apk" - } else { - _main_monochrome_public_bundle_target = "monochrome_public_bundle" - _main_monochrome_public_apk_target = "monochrome_public_apk" - _main_trichrome_chrome_bundle_target = "trichrome_chrome_bundle" - _main_trichrome_library_apk_target = "trichrome_library_apk" - } - if (android_64bit_target_cpu && skip_secondary_abi_for_cq) { group("trichrome_library_apk") { deps = [ ":trichrome_library_64_apk" ] @@ -2817,6 +2857,11 @@ if (current_toolchain == default_toolchain) { "//ui/base:goldctl", ] + if (enable_chrome_android_internal) { + data_deps += + [ "//clank/build/bot/filters:chrome_public_unit_test_apk_filters" ] + } + # Required by //build/config/android/test/resource_overlay:javatests enforce_resource_overlays_in_tests = true @@ -3169,6 +3214,10 @@ if (current_toolchain == default_toolchain) { "--browser-apk", "@WrappedPath(apks/ChromePublic.apk)", ] + data = [ + "//third_party/blink/web_tests/platform/android/", + "//third_party/blink/web_tests/MobileTestExpectations", + ] data_deps = [ ":chrome_public_apk", "//chrome/test/chromedriver:chromedriver_server($host_toolchain)", @@ -3177,11 +3226,8 @@ if (current_toolchain == default_toolchain) { } group("android_lint") { - if (android_64bit_target_cpu && skip_secondary_abi_for_cq) { - assert(disable_android_lint) - } if (!disable_android_lint) { - deps = [ ":${_main_monochrome_public_bundle_target}__lint" ] + deps = [ ":${_android_lint_target_name}__lint" ] if (defined(additional_chrome_lint_targets)) { deps += additional_chrome_lint_targets } @@ -3210,18 +3256,6 @@ if (current_toolchain == default_toolchain) { chrome_public_bundle(_main_monochrome_public_bundle_target) { is_monochrome = true bundle_name = "MonochromePublic" - - # Monochrome bundle is used as our unified lint target, so it needs to set the - # lowest shipping minSdkVersion to catch all potential NewApi errors. - lint_min_sdk_version = default_min_sdk_version - enable_lint = true - lint_baseline_file = "expectations/lint-baseline.xml" - lint_suppressions_file = "expectations/lint-suppressions.xml" - - # Since this target's name changes if we are 32 or 64 bit, we want to keep - # the gen_dir the same for the lint baseline files. - lint_gen_dir = "$target_gen_dir/monochrome_public_bundle__lint" - add_view_trace_events = true if (android_64bit_target_cpu) { @@ -3331,9 +3365,7 @@ if (current_toolchain == default_toolchain) { trichrome_chrome_basename = _trichrome_chrome_32_basename trichrome_webview_basename = _trichrome_webview_32_basename } - } - if (android_64bit_target_cpu && !skip_secondary_abi_for_cq) { # Used for binary size monitoring. create_app_bundle_minimal_apks("trichrome_chrome_32_minimal_apks") { deps = [ ":trichrome_chrome_32_bundle" ] @@ -3351,10 +3383,6 @@ if (current_toolchain == default_toolchain) { _trichrome_webview_basename_for_size = _trichrome_webview_32_basename _symbol_dir_for_size = "android_clang_arm/lib.unstripped" _ssargs_filename_for_size = _ssargs_32_filename - _mapping_files_for_size = [ - "apks/TrichromeChrome32.aab.mapping", - "apks/TrichromeWebView32.aab.mapping", - ] } else { # Used for binary size monitoring. create_app_bundle_minimal_apks("trichrome_chrome_minimal_apks") { @@ -3373,10 +3401,6 @@ if (current_toolchain == default_toolchain) { _trichrome_webview_basename_for_size = _trichrome_webview_basename _symbol_dir_for_size = "lib.unstripped" _ssargs_filename_for_size = _ssargs_filename - _mapping_files_for_size = [ - "apks/TrichromeChrome.aab.mapping", - "apks/TrichromeWebView.aab.mapping", - ] } android_resource_sizes_test("resource_sizes_trichrome") { @@ -3390,28 +3414,37 @@ if (current_toolchain == default_toolchain) { data_deps = [ ":trichrome_32_minimal_apks" ] } - android_size_bot_config("resource_size_config_trichrome") { - name = "Trichrome" - mapping_files = _mapping_files_for_size + if (android_64bit_target_cpu && !skip_secondary_abi_for_cq) { + android_size_bot_config("resource_size_config_trichrome") { + name = "Trichrome" + mapping_files = [ + "apks/TrichromeChrome32.aab.mapping", + "apks/TrichromeWebView32.aab.mapping", + ] - # Save mapping files since they are needed by: - # 1) Checking for ForTesting methods. - # 2) SuperSize adding disassembly to symbols. - # Save apk and unstripped library because they are needed for collecting - # disassembly of large symbols. - archive_files = mapping_files + [ - "apks/$_trichrome_library_basename_for_size", - "apks/$_trichrome_chrome_basename_for_size", - "apks/$_trichrome_webview_basename_for_size", - "${_symbol_dir_for_size}/libmonochrome__combined.so", - ] - to_resource_sizes_py = { - apk_name = "apks/resource_size_config_trichrome" - trichrome_library = "apks/$_trichrome_library_basename_for_size" - trichrome_chrome = "apks/$_trichrome_chrome_basename_for_size" - trichrome_webview = "apks/$_trichrome_webview_basename_for_size" + # Save mapping files since they are needed by: + # 1) Checking for ForTesting methods. + # 2) SuperSize adding disassembly to symbols. + # Save apk and unstripped library because they are needed for collecting + # disassembly of large symbols. + archive_files = + mapping_files + [ + "apks/$_trichrome_library_basename_for_size", + "apks/$_trichrome_chrome_basename_for_size", + "apks/$_trichrome_webview_basename_for_size", + "${_symbol_dir_for_size}/libmonochrome__combined.so", + ] + to_resource_sizes_py = { + apk_name = "apks/resource_size_config_trichrome" + trichrome_library = "apks/$_trichrome_library_basename_for_size" + trichrome_chrome = "apks/$_trichrome_chrome_basename_for_size" + trichrome_webview = "apks/$_trichrome_webview_basename_for_size" + } + to_resource_sizes_py_64 = { + apk_name = "apks/TrichromeLibrary64.apk" + } + supersize_input_file = "apks/$_ssargs_filename_for_size" } - supersize_input_file = "apks/$_ssargs_filename_for_size" } } } @@ -3545,7 +3578,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/autofill/AutofillExpirationDateFixFlowBridge.java", "java/src/org/chromium/chrome/browser/autofill/AutofillLogger.java", "java/src/org/chromium/chrome/browser/autofill/AutofillNameFixFlowBridge.java", - "java/src/org/chromium/chrome/browser/autofill/AutofillSaveCardBottomSheetBridge.java", "java/src/org/chromium/chrome/browser/autofill/AutofillSnackbarController.java", "java/src/org/chromium/chrome/browser/autofill/CardUnmaskBridge.java", "java/src/org/chromium/chrome/browser/autofill/CreditCardScannerBridge.java", @@ -3553,6 +3585,7 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/autofill/SaveUpdateAddressProfilePromptController.java", "java/src/org/chromium/chrome/browser/autofill/fp/FacilitatedPaymentBottomSheetBridge.java", "java/src/org/chromium/chrome/browser/autofill/iban/AutofillSaveIbanBottomSheetBridge.java", + "java/src/org/chromium/chrome/browser/autofill/save_card/AutofillSaveCardBottomSheetBridge.java", "java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsDelegate.java", "java/src/org/chromium/chrome/browser/autofill/settings/SettingsLauncherHelper.java", "java/src/org/chromium/chrome/browser/autofill/settings/VirtualCardEnrollmentFields.java", @@ -3606,8 +3639,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/download/OpenDownloadDialogBridge.java", "java/src/org/chromium/chrome/browser/download/service/DownloadBackgroundTask.java", "java/src/org/chromium/chrome/browser/download/service/DownloadTaskScheduler.java", - "java/src/org/chromium/chrome/browser/feature_guide/notifications/FeatureNotificationGuideBridge.java", - "java/src/org/chromium/chrome/browser/feature_guide/notifications/FeatureNotificationGuideServiceFactory.java", "java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java", "java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java", "java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java", @@ -3618,7 +3649,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/history/HistoryDeletionInfo.java", "java/src/org/chromium/chrome/browser/historyreport/HistoryReportJniBridge.java", "java/src/org/chromium/chrome/browser/infobar/AutofillCreditCardFillingInfoBar.java", - "java/src/org/chromium/chrome/browser/infobar/AutofillOfferNotificationInfoBar.java", "java/src/org/chromium/chrome/browser/infobar/AutofillSaveCardInfoBar.java", "java/src/org/chromium/chrome/browser/infobar/AutofillVirtualCardEnrollmentInfoBar.java", "java/src/org/chromium/chrome/browser/infobar/DuplicateDownloadInfoBar.java", @@ -3712,6 +3742,7 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/tabmodel/TabModelJniBridge.java", "java/src/org/chromium/chrome/browser/tabmodel/TabModelObserverJniBridge.java", "java/src/org/chromium/chrome/browser/usage_stats/UsageStatsBridge.java", + "java/src/org/chromium/chrome/browser/webapps/PwaRestorePromoUtils.java", "java/src/org/chromium/chrome/browser/webapps/WebApkDataProvider.java", "java/src/org/chromium/chrome/browser/webapps/WebApkHandlerDelegate.java", "java/src/org/chromium/chrome/browser/webapps/WebApkInstallService.java", @@ -3834,6 +3865,11 @@ libchrome_impl("libchrome") { } module_descs = chrome_module_descs + + # Java and native targets form two independent compile graphs. Deps from java targets + # onto native ones (or vice versa) are unnecessary and reduce parallelism. + # This prevents deps from native -> java. + assert_no_deps = [ "//build/android:build_java" ] } chrome_common_shared_library("libchromefortest") { diff --git a/src/chrome/android/chrome_public_apk_tmpl.gni b/src/chrome/android/chrome_public_apk_tmpl.gni index 69adf711..260d7e9b 100644 --- a/src/chrome/android/chrome_public_apk_tmpl.gni +++ b/src/chrome/android/chrome_public_apk_tmpl.gni @@ -8,6 +8,7 @@ import("//base/android/resource_exclusions.gni") import("//build/config/android/rules.gni") import("//build/config/compiler/compiler.gni") import("//build/config/locales.gni") +import("//build/toolchain/gcc_toolchain.gni") import("//chrome/android/features/dev_ui/dev_ui_module.gni") import("//chrome/android/modules/chrome_bundle_tmpl.gni") import("//chrome/android/trichrome.gni") @@ -381,10 +382,24 @@ template("chrome_common_apk_or_module_tmpl") { } } - deps = [ - "//chrome/android:chrome_base_module_resources", - "//chrome/android:chrome_public_non_pak_assets", - ] + # shared_resources_allowlist_target causes a native dep to appear via resources. + if (!_is_monochrome) { + # Java and native targets form two independent compile graphs. Deps from java targets + # onto native ones (or vice versa) are unnecessary and reduce parallelism. + # This prevents most deps from java->native. + # One common violation is generate_jni() targets, which generate + # .srcjars, but also .h files, and so export their native deps. + # Tip: If the dep is due to loadable_modules or android_assets, use "asset_deps" rather than + # "deps". + assert_no_native_deps = [ + "//base", + "//build/config/compiler:compiler_buildflags", + "//build/rust:cxx_cppdeps", + "//third_party/abseil-cpp:absl", + ] + } + + deps = [ "//chrome/android:chrome_base_module_resources" ] # TODO(agrieve): Make unconditional when moving to trampoline. if (_is_monochrome || _is_trichrome) { @@ -447,17 +462,23 @@ template("chrome_common_apk_or_module_tmpl") { } } + asset_deps = [ "//chrome/android:chrome_public_non_pak_assets" ] + if (defined(invoker.asset_deps)) { + asset_deps += invoker.asset_deps + } + if (_is_bundle && _is_monochrome) { - deps += [ "//chrome/android:monochrome_bundle_module_pak_assets" ] + asset_deps += [ "//chrome/android:monochrome_bundle_module_pak_assets" ] } else if (_is_bundle && _is_trichrome) { - deps += [ "//chrome/android:trichrome_chrome_bundle_module_pak_assets" ] + asset_deps += + [ "//chrome/android:trichrome_chrome_bundle_module_pak_assets" ] } else if (_is_bundle) { - deps += [ "//chrome/android:chrome_bundle_module_pak_assets" ] + asset_deps += [ "//chrome/android:chrome_bundle_module_pak_assets" ] } else if (_is_monochrome) { - deps += [ "//chrome/android:monochrome_apk_pak_assets" ] + asset_deps += [ "//chrome/android:monochrome_apk_pak_assets" ] } else { assert(!_is_trichrome) - deps += [ "//chrome/android:chrome_apk_pak_assets" ] + asset_deps += [ "//chrome/android:chrome_apk_pak_assets" ] } if (defined(invoker.add_upstream_only_deps) && @@ -467,9 +488,9 @@ template("chrome_common_apk_or_module_tmpl") { } else if (!_is_trichrome) { deps += [ "//chrome/android:chrome_public_apk_base_module_resources", - "//chrome/android:chrome_public_non_pak_assets", "//components/browser_ui/styles/android:chrome_public_apk_resources", ] + asset_deps += [ "//chrome/android:chrome_public_non_pak_assets" ] } if (_is_bundle) { deps += [ @@ -499,7 +520,6 @@ template("chrome_common_apk_or_module_tmpl") { # See //third_party/android_sdk/window_extensions/README.md assert_no_deps = [ "//third_party/android_deps:org_jetbrains_kotlin_kotlin_parcelize_runtime", - "//third_party/android_deps:org_jetbrains_kotlinx_atomicfu_jvm_java", "//third_party/androidx:androidx_window_extensions_core_core_java", "//third_party/androidx:androidx_window_sidecar_sidecar_java", "//third_party/androidx:androidx_window_window_java_java", @@ -517,11 +537,12 @@ template("chrome_common_apk_or_module_tmpl") { (target_cpu == "arm" || (target_cpu == "arm64" && !_is_64_bit_browser))) { if (_is_test) { - deps += [ "//chrome/android:libchromefortest_unwind_table_assets" ] + asset_deps += + [ "//chrome/android:libchromefortest_unwind_table_assets" ] } else if (_is_monochrome || _is_trichrome) { - deps += [ "//chrome/android:libmonochrome_unwind_table_assets" ] + asset_deps += [ "//chrome/android:libmonochrome_unwind_table_assets" ] } else { - deps += [ "//chrome/android:libchrome_unwind_table_assets" ] + asset_deps += [ "//chrome/android:libchrome_unwind_table_assets" ] } } diff --git a/src/chrome/browser/ui/startup/bad_flags_prompt.cc b/src/chrome/browser/ui/startup/bad_flags_prompt.cc index 592741f0..52c586b7 100644 --- a/src/chrome/browser/ui/startup/bad_flags_prompt.cc +++ b/src/chrome/browser/ui/startup/bad_flags_prompt.cc @@ -41,6 +41,7 @@ #include "sandbox/policy/switches.h" #include "services/device/public/cpp/hid/hid_switches.h" #include "services/network/public/cpp/network_switches.h" +#include "third_party/blink/public/common/features_generated.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/scoped_startup_resource_bundle.h" @@ -195,6 +196,10 @@ static const base::Feature* kBadFeatureFlagsInAboutFlags[] = { #if BUILDFLAG(IS_CHROMEOS_LACROS) &chromeos::features::kBlinkExtensionDiagnostics, #endif // BUILDFLAG(IS_CHROMEOS_LACROS) + + // This flag disables security for the Page Embedded Permission Control, for + // testing purposes. Can only be enabled via the command line. + &blink::features::kDisablePepcSecurityForTesting, }; void ShowBadFlagsInfoBarHelper(content::WebContents* web_contents, diff --git a/src/media/base/supported_types.cc b/src/media/base/supported_types.cc index 862da9fe..55c3836c 100644 --- a/src/media/base/supported_types.cc +++ b/src/media/base/supported_types.cc @@ -402,21 +402,16 @@ bool IsDefaultSupportedAudioType(const AudioType& type) { } bool IsBuiltInVideoCodec(VideoCodec codec) { -#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) - if (codec == VideoCodec::kTheora) - return base::FeatureList::IsEnabled(kTheoraVideoCodec); - if (codec == VideoCodec::kVP8 && - base::FeatureList::IsEnabled(kFFmpegDecodeOpaqueVP8)) { +#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) && BUILDFLAG(USE_PROPRIETARY_CODECS) + if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) { return true; } -#if BUILDFLAG(USE_PROPRIETARY_CODECS) - if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) - return true; -#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) -#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) +#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) && + // BUILDFLAG(USE_PROPRIETARY_CODECS) #if BUILDFLAG(ENABLE_LIBVPX) - if (codec == VideoCodec::kVP8 || codec == VideoCodec::kVP9) + if (codec == VideoCodec::kVP8 || codec == VideoCodec::kVP9) { return true; + } #endif // BUILDFLAG(ENABLE_LIBVPX) #if BUILDFLAG(ENABLE_AV1_DECODER) if (codec == VideoCodec::kAV1) diff --git a/src/media/ffmpeg/ffmpeg_common.cc b/src/media/ffmpeg/ffmpeg_common.cc index 8d8ad915..a8b1467b 100644 --- a/src/media/ffmpeg/ffmpeg_common.cc +++ b/src/media/ffmpeg/ffmpeg_common.cc @@ -891,14 +891,17 @@ ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout, int channels) { return CHANNEL_LAYOUT_7_1; case AV_CH_LAYOUT_7POINT1_WIDE: return CHANNEL_LAYOUT_7_1_WIDE; -#ifdef AV_CH_LAYOUT_7POINT1_WIDE_BACK case AV_CH_LAYOUT_7POINT1_WIDE_BACK: return CHANNEL_LAYOUT_7_1_WIDE_BACK; -#endif case AV_CH_LAYOUT_OCTAGONAL: return CHANNEL_LAYOUT_OCTAGONAL; case AV_CH_LAYOUT_STEREO_DOWNMIX: return CHANNEL_LAYOUT_STEREO_DOWNMIX; + case AV_CH_FRONT_CENTER | AV_CH_LOW_FREQUENCY: + return CHANNEL_LAYOUT_1_1; + case AV_CH_FRONT_LEFT | AV_CH_FRONT_RIGHT | AV_CH_LOW_FREQUENCY | + AV_CH_BACK_CENTER: + return CHANNEL_LAYOUT_3_1_BACK; default: // FFmpeg channel_layout is 0 for .wav and .mp3. Attempt to guess layout // based on the channel count. @@ -950,12 +953,9 @@ VideoPixelFormat AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format) { case AV_PIX_FMT_YUV444P12LE: return PIXEL_FORMAT_YUV444P12; - // When compiled without decoders, FFmpeg won't know the pixel format. - case AV_PIX_FMT_NONE: - return PIXEL_FORMAT_UNKNOWN; - default: - NOTREACHED() << "Unsupported pixel format: " << pixel_format; + // FFmpeg knows more pixel formats than Chromium cares about. + LOG(ERROR) << "Unsupported pixel format: " << pixel_format; return PIXEL_FORMAT_UNKNOWN; } } diff --git a/src/ui/gtk/native_theme_gtk.cc b/src/ui/gtk/native_theme_gtk.cc index 6cd84bdd..b3ea4235 100644 --- a/src/ui/gtk/native_theme_gtk.cc +++ b/src/ui/gtk/native_theme_gtk.cc @@ -4,10 +4,10 @@ #include "ui/gtk/native_theme_gtk.h" +#include "base/command_line.h" #include "base/no_destructor.h" #include "base/ranges/algorithm.h" #include "base/strings/strcat.h" -#include "base/command_line.h" #include "cc/paint/paint_canvas.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/color/color_id.h"