From 99e2749d5470c60db0ab35e65e4dc88397f996ad Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Mon, 22 Jan 2024 14:27:02 -0600 Subject: [PATCH] M120 stage 6 --- TODO.md | 2 +- args.gn | 1 + arm/android/android_arm32_args.gn | 1 + arm/android/android_arm64_args.gn | 1 + arm/android/android_x64_args.gn | 1 + arm/android/android_x86_args.gn | 1 + arm/android/chromium_android_args.gn | 1 + arm/raspi/raspi_args.gn | 1 + arm/third_party/libaom/BUILD.gn | 2 +- arm/third_party/libaom/cmake_update.sh | 15 +- arm/win_ARM_args.gn | 1 + other/AVX2/linux_AVX2_args.gn | 1 + other/AVX2/win_AVX2_args.gn | 1 + other/CrOS/cros_args.gn | 1 + other/Mac/mac_ARM_args.gn | 1 + other/Mac/mac_args.gn | 1 + other/SSE2/args_SSE2.gn | 1 + other/SSE2/win_SSE2_args.gn | 1 + other/SSE3/args_SSE3.gn | 1 + other/SSE3/win_SSE3_args.gn | 1 + src/build/config/android/BUILD.gn | 2 +- src/chrome/android/BUILD.gn | 173 ++++++--- src/chrome/android/chrome_public_apk_tmpl.gni | 6 +- ...new_tab_page_feed_v2_expandable_header.xml | 2 +- .../layout/new_tab_page_multi_feed_header.xml | 2 +- .../obsolete_system/obsolete_system_linux.cc | 2 +- src/chrome/browser/themes/theme_helper_win.cc | 2 +- .../strings/android_chrome_strings.grd | 328 ++++++++---------- .../browser/ui/startup/bad_flags_prompt.cc | 2 +- src/chrome/browser/ui/tabs/tab_strip_model.cc | 128 ++++--- .../ui/views/frame/browser_root_view.cc | 2 +- .../ui/views/frame/browser_root_view.h | 2 +- src/chrome/browser/ui/views/tabs/tab.cc | 5 +- src/chrome/browser/ui/views/tabs/tab_strip.cc | 55 ++- .../browser/ui/views/tabs/tab_style_views.cc | 2 +- .../browser/ui/views/tabs/tab_style_views.h | 2 +- .../feed/core/shared_prefs/pref_names.cc | 2 +- .../history/core/browser/history_backend.cc | 2 +- .../variations/service/variations_service.cc | 6 +- .../version_ui/resources/about_version.html | 1 + src/media/base/supported_types.cc | 13 +- src/media/ffmpeg/ffmpeg_common.cc | 8 +- src/media/media_options.gni | 17 +- src/ui/gtk/native_theme_gtk.cc | 4 +- win_args.gn | 1 + 45 files changed, 463 insertions(+), 342 deletions(-) diff --git a/TODO.md b/TODO.md index 9c07d25d..70408ae5 100644 --- a/TODO.md +++ b/TODO.md @@ -39,4 +39,4 @@ ThoriumOS Flex > ThoriumOS made possible by Thorium > Chromium Experiments > Thorium Experiments -Make download warning blocker actually work +Make download warning blocker actually work! diff --git a/args.gn b/args.gn index db8d18de..a450c149 100644 --- a/args.gn +++ b/args.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/android/android_arm32_args.gn b/arm/android/android_arm32_args.gn index 3a928fbe..9f104268 100644 --- a/arm/android/android_arm32_args.gn +++ b/arm/android/android_arm32_args.gn @@ -91,6 +91,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/android/android_arm64_args.gn b/arm/android/android_arm64_args.gn index 9977b624..28aec9ca 100644 --- a/arm/android/android_arm64_args.gn +++ b/arm/android/android_arm64_args.gn @@ -91,6 +91,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/android/android_x64_args.gn b/arm/android/android_x64_args.gn index b03337a1..239239e9 100644 --- a/arm/android/android_x64_args.gn +++ b/arm/android/android_x64_args.gn @@ -83,6 +83,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/android/android_x86_args.gn b/arm/android/android_x86_args.gn index 5bef917b..58980c21 100644 --- a/arm/android/android_x86_args.gn +++ b/arm/android/android_x86_args.gn @@ -83,6 +83,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/android/chromium_android_args.gn b/arm/android/chromium_android_args.gn index 5652378a..da97697a 100644 --- a/arm/android/chromium_android_args.gn +++ b/arm/android/chromium_android_args.gn @@ -84,6 +84,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/raspi/raspi_args.gn b/arm/raspi/raspi_args.gn index 7b972149..2762ba88 100644 --- a/arm/raspi/raspi_args.gn +++ b/arm/raspi/raspi_args.gn @@ -86,6 +86,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/arm/third_party/libaom/BUILD.gn b/arm/third_party/libaom/BUILD.gn index bde2dbe0..12b683f7 100644 --- a/arm/third_party/libaom/BUILD.gn +++ b/arm/third_party/libaom/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/arm/third_party/libaom/cmake_update.sh b/arm/third_party/libaom/cmake_update.sh index 75aef205..2e54f2b5 100755 --- a/arm/third_party/libaom/cmake_update.sh +++ b/arm/third_party/libaom/cmake_update.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2023 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -80,21 +80,15 @@ function gen_config_files() { } function update_readme() { - local IFS=$'\n' - # Split git log output '\n' on the newline to produce 2 - # array entries. - local vals=($(git -C "${SRC}" --no-pager log -1 --format="%cd%n%H" \ - --date=format:"%A %B %d %Y")) + local revision=$(git -C "${SRC}" --no-pager log -1 --format="%H") sed -E -i.bak \ - -e "s/^(Date:)[[:space:]]+.*$/\1 ${vals[0]}/" \ - -e "s/^(Revision:)[[:space:]]+[a-f0-9]{40}/\1 ${vals[1]}/" \ + -e "s/^(Revision:)[[:space:]]+[a-f0-9]{40}/\1 ${revision}/" \ ${BASE}/README.chromium rm ${BASE}/README.chromium.bak cat < /dev/null \ # || echo "WARNING: 'git cl format' failed. Please run 'git cl format' manually." +echo "NOTE: 'You may want to run \`git cl format\` manually." cleanup diff --git a/arm/win_ARM_args.gn b/arm/win_ARM_args.gn index 4fc47cb8..65a46949 100644 --- a/arm/win_ARM_args.gn +++ b/arm/win_ARM_args.gn @@ -79,6 +79,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/AVX2/linux_AVX2_args.gn b/other/AVX2/linux_AVX2_args.gn index db8d18de..a450c149 100644 --- a/other/AVX2/linux_AVX2_args.gn +++ b/other/AVX2/linux_AVX2_args.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/AVX2/win_AVX2_args.gn b/other/AVX2/win_AVX2_args.gn index e631facb..bda605b4 100644 --- a/other/AVX2/win_AVX2_args.gn +++ b/other/AVX2/win_AVX2_args.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/CrOS/cros_args.gn b/other/CrOS/cros_args.gn index 5148f8f7..e5654ecf 100644 --- a/other/CrOS/cros_args.gn +++ b/other/CrOS/cros_args.gn @@ -65,6 +65,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_mpeg_h_audio = true enable_platform_dts_audio = true diff --git a/other/Mac/mac_ARM_args.gn b/other/Mac/mac_ARM_args.gn index b995e2f4..28f0a754 100644 --- a/other/Mac/mac_ARM_args.gn +++ b/other/Mac/mac_ARM_args.gn @@ -74,6 +74,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/Mac/mac_args.gn b/other/Mac/mac_args.gn index 5070caa0..205b4665 100644 --- a/other/Mac/mac_args.gn +++ b/other/Mac/mac_args.gn @@ -72,6 +72,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/SSE2/args_SSE2.gn b/other/SSE2/args_SSE2.gn index 0c371bef..9e9c844e 100644 --- a/other/SSE2/args_SSE2.gn +++ b/other/SSE2/args_SSE2.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/SSE2/win_SSE2_args.gn b/other/SSE2/win_SSE2_args.gn index e4b3233e..a87e22db 100644 --- a/other/SSE2/win_SSE2_args.gn +++ b/other/SSE2/win_SSE2_args.gn @@ -78,6 +78,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/SSE3/args_SSE3.gn b/other/SSE3/args_SSE3.gn index 4531c068..f23b590e 100644 --- a/other/SSE3/args_SSE3.gn +++ b/other/SSE3/args_SSE3.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/other/SSE3/win_SSE3_args.gn b/other/SSE3/win_SSE3_args.gn index 13495965..ab5eb5d5 100644 --- a/other/SSE3/win_SSE3_args.gn +++ b/other/SSE3/win_SSE3_args.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true diff --git a/src/build/config/android/BUILD.gn b/src/build/config/android/BUILD.gn index ef0a3660..04dd589c 100644 --- a/src/build/config/android/BUILD.gn +++ b/src/build/config/android/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031. +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/src/chrome/android/BUILD.gn b/src/chrome/android/BUILD.gn index f3632014..abcc7d88 100644 --- a/src/chrome/android/BUILD.gn +++ b/src/chrome/android/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -110,6 +110,7 @@ if (current_toolchain == default_toolchain) { "is_monochrome", "is_trichrome", "lint_baseline_file", + "lint_gen_dir", "lint_min_sdk_version", "lint_suppressions_file", "static_library_provider", @@ -150,10 +151,15 @@ if (current_toolchain == default_toolchain) { "java/res_base/xml/network_security_config.xml", "java/res_chromium_base/drawable/themed_app_icon.xml", "java/res_chromium_base/mipmap-hdpi/app_icon.png", + "java/res_chromium_base/mipmap-hdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-mdpi/app_icon.png", + "java/res_chromium_base/mipmap-mdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xhdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xxhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xxxhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png", "java/res_chromium_base/values/channel_constants.xml", ] } @@ -254,6 +260,7 @@ if (current_toolchain == default_toolchain) { "//components/externalauth/android:google_delegate_public_impl_java", "//components/language/android:ulp_delegate_public_java", "//components/signin/public/android:account_email_domain_displayability_java", + "//components/webauthn/android:delegate_public_java", "//content/public/android:identity_credentials_public_impl_java", ] } @@ -280,7 +287,6 @@ if (current_toolchain == default_toolchain) { "$google_play_services_package:google_play_services_tasks_java", "$google_play_services_package:google_play_services_vision_common_java", "$google_play_services_package:google_play_services_vision_java", - "//base:jni_java", "//cc:cc_java", "//cc/mojom:mojom_java", "//chrome/android/features/keyboard_accessory:public_java", @@ -302,6 +308,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/android/browserservices/metrics:java", "//chrome/browser/android/browserservices/verification:java", "//chrome/browser/android/common:java", + "//chrome/browser/android/content:java", "//chrome/browser/android/crypto:java", "//chrome/browser/android/customtabs/branding:java", "//chrome/browser/android/intents:java", @@ -532,10 +539,10 @@ if (current_toolchain == default_toolchain) { "//components/paint_preview/browser/android:java", "//components/paint_preview/player/android:java", "//components/password_manager/core/browser:password_manager_java_enums", - "//components/password_manager/core/common:password_manager_common_java_enums", "//components/payments/content/android:java", "//components/payments/content/android:service_java", "//components/payments/mojom:mojom_java", + "//components/permissions/android:core_java", "//components/permissions/android:java", "//components/policy/android:policy_java", "//components/power_bookmarks/core:proto_java", @@ -607,7 +614,6 @@ if (current_toolchain == default_toolchain) { "//skia/public/mojom:mojom_java", "//third_party/android_deps:chromium_play_services_availability_java", "//third_party/android_deps:com_google_code_findbugs_jsr305_java", - "//third_party/android_deps:com_google_guava_listenablefuture_java", "//third_party/android_deps:dagger_java", "//third_party/android_deps:guava_android_java", "//third_party/android_deps:javax_inject_javax_inject_java", @@ -637,6 +643,7 @@ if (current_toolchain == default_toolchain) { "//third_party/blink/public/mojom:android_mojo_bindings_java", "//third_party/blink/public/mojom:mojom_platform_java", "//third_party/gif_player:gif_player_java", + "//third_party/jni_zero:jni_zero_java", "//third_party/kotlin_stdlib:kotlin_stdlib_java", "//third_party/metrics_proto:metrics_proto_java", "//ui/accessibility:ax_base_java", @@ -741,8 +748,10 @@ if (current_toolchain == default_toolchain) { } if (enable_supervised_users) { - deps += - [ "//chrome/browser/supervised_user:website_parent_approval_java" ] + deps += [ + "//chrome/browser/supervised_user:website_parent_approval_java", + "//components/supervised_user/android:supervised_user_preferences_java", + ] } if (page_info_use_internal_android_resources) { @@ -777,6 +786,7 @@ if (current_toolchain == default_toolchain) { deps = [ ":chrome_java", "//chrome/android/features/keyboard_accessory:internal_java", + "//chrome/browser/android/content:java", "//chrome/browser/android/httpclient:java", "//chrome/browser/commerce/merchant_viewer/android:java", "//chrome/browser/content_creation/notes/internal/android:java", @@ -786,6 +796,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/password_check:internal_java", "//chrome/browser/password_edit_dialog/android:java", "//chrome/browser/password_entry_edit/android/internal:java", + "//chrome/browser/password_manager/android/add_username_dialog:java", "//chrome/browser/recent_tabs/internal:java", "//chrome/browser/tabmodel/internal:java", "//chrome/browser/touch_to_fill/android/internal:java", @@ -923,6 +934,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/android/browserservices/verification:java", "//chrome/browser/android/browserservices/verification:junit_test_support", "//chrome/browser/android/common:java", + "//chrome/browser/android/content:java", "//chrome/browser/android/crypto:java", "//chrome/browser/android/customtabs/branding:junit", "//chrome/browser/android/httpclient:junit_tests", @@ -1078,6 +1090,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/uid/android:junit", "//chrome/browser/usb/android:junit", "//chrome/browser/user_education:java", + "//chrome/browser/user_education:junit", "//chrome/browser/util:java", "//chrome/browser/util:junit_tests", "//chrome/browser/version:java", @@ -1165,7 +1178,9 @@ if (current_toolchain == default_toolchain) { "//components/signin/core/browser:signin_enums_java", "//components/signin/public/android:java", "//components/signin/public/android:signin_java_test_support", + "//components/supervised_user/android:supervised_user_preferences_java", "//components/sync/android:sync_java", + "//components/sync/protocol:protocol_java", "//components/sync_device_info:sync_device_info_java", "//components/translate/content/android:junit", "//components/ukm/android:java", @@ -1191,7 +1206,6 @@ if (current_toolchain == default_toolchain) { "//services/media_session/public/mojom:mojom_java", "//services/service_manager/public/java:service_manager_java", "//third_party/android_deps:chromium_play_services_availability_shadows_java", - "//third_party/android_deps:com_google_guava_listenablefuture_java", "//third_party/android_deps:com_googlecode_java_diff_utils_diffutils_java", "//third_party/android_deps:dagger_java", "//third_party/android_deps:espresso_java", @@ -1295,7 +1309,6 @@ if (current_toolchain == default_toolchain) { ":chrome_app_java_resources", "//base:base_java", "//base:base_java_test_support", - "//base:jni_java", "//build/android:build_java", "//cc:cc_java", "//chrome/android:chrome_java", @@ -1309,6 +1322,7 @@ if (current_toolchain == default_toolchain) { "//chrome/test/android:chrome_java_integration_test_support", "//components/payments/content/android:java", "//components/payments/content/android:java_resources", + "//components/payments/content/android:payments_java_test_support", "//components/payments/content/android:service_java", "//components/payments/mojom:mojom_java", "//content/public/android:content_java", @@ -1322,6 +1336,7 @@ if (current_toolchain == default_toolchain) { "//third_party/androidx:androidx_test_monitor_java", "//third_party/blink/public/mojom:android_mojo_bindings_java", "//third_party/hamcrest:hamcrest_java", + "//third_party/jni_zero:jni_zero_java", "//third_party/junit:junit", "//ui/android:ui_no_recycler_view_java", "//url:gurl_java", @@ -1358,7 +1373,7 @@ if (current_toolchain == default_toolchain) { "javatests/src/org/chromium/chrome/browser/crypto/CipherFactoryTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarViewUnitTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/CustomTabLaunchCauseMetricsTest.java", - "javatests/src/org/chromium/chrome/browser/customtabs/features/minimizedcustomtab/MinimizedCardCoordinatorTest.java", + "javatests/src/org/chromium/chrome/browser/customtabs/features/minimizedcustomtab/MinimizedCardDialogFragmentTest.java", "javatests/src/org/chromium/chrome/browser/customtabs/features/minimizedcustomtab/MinimizedCardViewBinderTest.java", "javatests/src/org/chromium/chrome/browser/download/DownloadForegroundServiceManagerTest.java", "javatests/src/org/chromium/chrome/browser/download/DownloadForegroundServiceTest.java", @@ -1392,7 +1407,6 @@ if (current_toolchain == default_toolchain) { ":chrome_unit_test_util_java", "//base:base_java", "//base:base_java_test_support", - "//base:jni_java", "//chrome/android:base_module_java", "//chrome/android:chrome_java", "//chrome/browser/android/browserservices/intents:java", @@ -1401,6 +1415,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/android/intents:java", "//chrome/browser/browser_controls/android:java", "//chrome/browser/commerce/android:java", + "//chrome/browser/commerce/price_tracking/android:java", "//chrome/browser/commerce/subscriptions/android:subscriptions_java", "//chrome/browser/contextmenu:java", "//chrome/browser/download/android:download_java_tests", @@ -1423,6 +1438,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/theme:java", "//chrome/browser/ui/android/toolbar:java", "//chrome/browser/ui/messages/android:java", + "//chrome/browser/user_education:java", "//chrome/test/android:chrome_java_integration_test_support", "//chrome/test/android:chrome_java_unit_test_support", "//components/autofill/android:main_autofill_java", @@ -1474,6 +1490,7 @@ if (current_toolchain == default_toolchain) { "//third_party/androidx:androidx_browser_browser_java", "//third_party/androidx:androidx_coordinatorlayout_coordinatorlayout_java", "//third_party/androidx:androidx_core_core_java", + "//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_runner_java", @@ -1481,6 +1498,7 @@ if (current_toolchain == default_toolchain) { "//third_party/blink/public:blink_headers_java", "//third_party/hamcrest:hamcrest_core_java", "//third_party/hamcrest:hamcrest_library_java", + "//third_party/jni_zero:jni_zero_java", "//third_party/junit", "//third_party/mockito:mockito_java", "//ui/android:ui_full_java", @@ -1523,7 +1541,7 @@ if (current_toolchain == default_toolchain) { "//base:base_java", "//base:base_java_test_support", "//base:base_java_test_support_uncommon", - "//base:jni_java", + "//base/test:public_transit_java", "//base/test:test_support_java", "//build/android:build_java", "//cc:cc_java", @@ -1542,6 +1560,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/android/browserservices/verification:java", "//chrome/browser/android/browserservices/verification:javatests", "//chrome/browser/android/common:java", + "//chrome/browser/android/content:java", "//chrome/browser/android/crypto:java", "//chrome/browser/android/customtabs/branding:java", "//chrome/browser/android/httpclient:javatests", @@ -1638,6 +1657,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/tab_group:java", "//chrome/browser/tabmodel:java", "//chrome/browser/tabmodel/internal:java", + "//chrome/browser/tabpersistence:flatbuffer_java", "//chrome/browser/tabpersistence:java", "//chrome/browser/thumbnail:java", "//chrome/browser/thumbnail:javatests", @@ -1677,6 +1697,7 @@ if (current_toolchain == default_toolchain) { "//chrome/test:test_support_java", "//chrome/test/android:chrome_java_integration_test_support", "//chrome/test/android:chrome_java_test_pagecontroller", + "//chrome/test/android:chrome_java_transit", "//chrome/test/android/test_trusted_web_activity:test_trusted_web_activity_java", "//components/autofill/android:autofill_features_java", "//components/autofill/android:autofill_java", @@ -1768,6 +1789,7 @@ if (current_toolchain == default_toolchain) { "//components/password_manager/core/browser:password_manager_java_enums", "//components/password_manager/core/browser:unified_password_manager_proto_java", "//components/payments/content/android:java", + "//components/payments/content/android:payments_java_test_support", "//components/payments/content/android:service_java", "//components/payments/mojom:mojom_java", "//components/permissions/android:core_java", @@ -1776,6 +1798,7 @@ if (current_toolchain == default_toolchain) { "//components/policy/android:policy_java_test_support", "//components/power_bookmarks/core:proto_java", "//components/prefs/android:java", + "//components/privacy_sandbox/android:javatests", "//components/profile_metrics:browser_profile_type_enum_java", "//components/query_tiles:java", "//components/query_tiles:test_support_java", @@ -1824,7 +1847,6 @@ if (current_toolchain == default_toolchain) { "//services/network/public/mojom:url_loader_base_java", "//services/service_manager/public/java:service_manager_java", "//third_party/android_deps:com_google_code_findbugs_jsr305_java", - "//third_party/android_deps:com_google_guava_listenablefuture_java", "//third_party/android_deps:espresso_java", "//third_party/android_deps:guava_android_java", "//third_party/android_deps:material_design_java", @@ -1852,6 +1874,7 @@ if (current_toolchain == default_toolchain) { "//third_party/blink/public/mojom:mojom_platform_java", "//third_party/flatbuffers:flatbuffers_java", "//third_party/hamcrest:hamcrest_java", + "//third_party/jni_zero:jni_zero_java", "//third_party/junit", "//third_party/metrics_proto:metrics_proto_java", "//third_party/mockito:mockito_java", @@ -2123,10 +2146,15 @@ if (current_toolchain == default_toolchain) { sources = [ "java/res_chromium_base/drawable/themed_app_icon.xml", "java/res_chromium_base/mipmap-hdpi/app_icon.png", + "java/res_chromium_base/mipmap-hdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-mdpi/app_icon.png", + "java/res_chromium_base/mipmap-mdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xhdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xxhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xxhdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-xxxhdpi/app_icon.png", + "java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon.png", "java/res_chromium_base/values/channel_constants.xml", ] @@ -2425,7 +2453,6 @@ if (current_toolchain == default_toolchain) { "$google_play_services_package:google_play_services_gcm_java", "//base:base_java", "//base:base_java_test_support", - "//base:jni_java", "//build/android:build_java", "//chrome/browser/download/android:java", "//chrome/browser/prefetch/android:java", @@ -2438,6 +2465,7 @@ if (current_toolchain == default_toolchain) { "//content/public/test/android:content_java_test_support", "//third_party/android_deps:protobuf_lite_runtime_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/jni_zero:jni_zero_java", "//third_party/junit", "//url:android_test_helper_java", "//url:gurl_java", @@ -2464,8 +2492,8 @@ if (current_toolchain == default_toolchain) { "//components/sync:test_support", "//content/test:test_support", "//net:test_support", + "//url", "//url:android_test_helper", - "//url:gurl_android", ] } @@ -2569,7 +2597,6 @@ if (current_toolchain == default_toolchain) { "$google_play_services_package:google_firebase_firebase_messaging_java", "$google_play_services_package:google_play_services_gcm_java", "//base:base_java", - "//base:jni_java", "//chrome/browser/download/android:file_provider_java", "//chrome/browser/flags:java", "//chrome/browser/language/android:base_module_java", @@ -2584,6 +2611,7 @@ if (current_toolchain == default_toolchain) { "//third_party/android_deps:playcore_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_collection_collection_java", + "//third_party/jni_zero:jni_zero_java", "//ui/android:ui_no_recycler_view_java", # Deps needed for child processes. @@ -2627,6 +2655,18 @@ 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_monochrome_public_apk_target = "monochrome_32_64_public_apk" + _main_trichrome_chrome_bundle_target = "trichrome_chrome_32_64_bundle" + _main_trichrome_library_apk_target = "trichrome_library_32_64_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" ] @@ -2635,7 +2675,15 @@ if (current_toolchain == default_toolchain) { deps = [ ":monochrome_64_public_apk" ] } } else { - chrome_public_apk_or_module_tmpl("monochrome_public_apk") { + if (android_64bit_target_cpu) { + alias_with_wrapper_script("trichrome_library_apk") { + alias_target = ":trichrome_library_32_64_apk" + } + alias_with_wrapper_script("monochrome_public_apk") { + alias_target = ":monochrome_32_64_public_apk" + } + } + chrome_public_apk_or_module_tmpl(_main_monochrome_public_apk_target) { is_monochrome = true apk_name = "MonochromePublic" target_type = "android_apk" @@ -2645,7 +2693,7 @@ if (current_toolchain == default_toolchain) { } } - trichrome_library_apk_tmpl("trichrome_library_apk") { + trichrome_library_apk_tmpl(_main_trichrome_library_apk_target) { apk_name = "TrichromeLibrary" if (android_64bit_target_cpu) { @@ -2658,8 +2706,7 @@ if (current_toolchain == default_toolchain) { "expectations/trichrome_library_apk.AndroidManifest.expected" } if (enable_libs_and_assets_verification) { - expected_libs_and_assets = - "expectations/$target_name.$target_cpu.libs_and_assets.expected" + expected_libs_and_assets = "expectations/trichrome_library_apk.$target_cpu.libs_and_assets.expected" } } @@ -2731,6 +2778,8 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/back_press/android:unit_device_javatests", "//chrome/browser/content_creation/notes/internal/android:unit_device_javatests", "//chrome/browser/download/internal/android:unit_device_javatests", + "//chrome/browser/hub:unit_device_javatests", + "//chrome/browser/hub/internal:unit_device_javatests", "//chrome/browser/image_descriptions:unit_device_javatests", "//chrome/browser/loading_modal/android:unit_device_javatests", "//chrome/browser/optimization_guide/android:unit_device_javatests", @@ -2768,6 +2817,7 @@ if (current_toolchain == default_toolchain) { "//components/translate/content/android:unit_device_javatests", "//components/url_formatter/android:unit_device_javatests", "//components/variations/android:unit_device_javatests", + "//components/webapps/browser/android:unit_device_javatests", "//ui/android:ui_unit_device_javatests", ] @@ -2929,7 +2979,7 @@ if (current_toolchain == default_toolchain) { "$root_build_dir/apks/MonochromePublic64.apk.mapping" } } else { - apk_under_test = ":monochrome_public_apk" + apk_under_test = ":$_main_monochrome_public_apk_target" if (!is_java_debug) { proguard_mapping_path = "$root_build_dir/apks/MonochromePublic.apk.mapping" @@ -2991,7 +3041,8 @@ if (current_toolchain == default_toolchain) { "$root_build_dir/apks/MonochromePublic64.aab.mapping" } } else { - apk_under_test = "//chrome/android:monochrome_public_bundle_apks" + apk_under_test = + "//chrome/android:${_main_monochrome_public_bundle_target}_apks" if (!is_java_debug) { proguard_mapping_path = "$root_build_dir/apks/MonochromePublic.aab.mapping" @@ -3048,7 +3099,8 @@ if (current_toolchain == default_toolchain) { } } else { apk_under_test = "//chrome/android:trichrome_chrome_bundle_apks" - additional_apks = [ "//chrome/android:trichrome_library_apk" ] + additional_apks = + [ "//chrome/android:$_main_trichrome_library_apk_target" ] if (!is_java_debug) { proguard_mapping_path = "$root_build_dir/apks/TrichromeChrome.aab.mapping" @@ -3102,7 +3154,7 @@ if (current_toolchain == default_toolchain) { assert(disable_android_lint) } if (!disable_android_lint) { - deps = [ ":monochrome_public_bundle__lint" ] + deps = [ ":${_main_monochrome_public_bundle_target}__lint" ] if (defined(additional_chrome_lint_targets)) { deps += additional_chrome_lint_targets } @@ -3117,9 +3169,18 @@ if (current_toolchain == default_toolchain) { deps = [ ":trichrome_chrome_64_bundle" ] } } else { + if (android_64bit_target_cpu) { + alias_with_wrapper_script("monochrome_public_bundle") { + alias_target = ":monochrome_32_64_public_bundle" + } + alias_with_wrapper_script("trichrome_chrome_bundle") { + alias_target = ":trichrome_chrome_32_64_bundle" + } + } + # Public webview targets don't work with non-public sdks. # https://crbug.com/1000763 - chrome_public_bundle("monochrome_public_bundle") { + chrome_public_bundle(_main_monochrome_public_bundle_target) { is_monochrome = true bundle_name = "MonochromePublic" @@ -3129,6 +3190,11 @@ if (current_toolchain == default_toolchain) { 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) { @@ -3141,15 +3207,14 @@ if (current_toolchain == default_toolchain) { "expectations/monochrome_public_bundle.proguard_flags.expected" } if (enable_libs_and_assets_verification) { - expected_libs_and_assets = - "expectations/$target_name.$target_cpu.libs_and_assets.expected" + expected_libs_and_assets = "expectations/monochrome_public_bundle.$target_cpu.libs_and_assets.expected" } } if (is_official_build) { # Used for binary size monitoring. create_app_bundle_minimal_apks("monochrome_public_minimal_apks") { - deps = [ ":monochrome_public_bundle" ] + deps = [ ":$_main_monochrome_public_bundle_target" ] bundle_path = "$root_build_dir/apks/MonochromePublic.aab" } @@ -3177,10 +3242,10 @@ if (current_toolchain == default_toolchain) { } } - chrome_public_bundle("trichrome_chrome_bundle") { + chrome_public_bundle(_main_trichrome_chrome_bundle_target) { is_trichrome = true bundle_name = "TrichromeChrome" - static_library_provider = ":trichrome_library_apk" + static_library_provider = ":$_main_trichrome_library_apk_target" add_view_trace_events = true art_profile_path = "//chrome/android/baseline_profiles/profile.txt" if (android_64bit_target_cpu) { @@ -3193,14 +3258,13 @@ if (current_toolchain == default_toolchain) { expected_android_manifest = "expectations/trichrome_chrome_bundle__base.AndroidManifest.expected" } if (enable_libs_and_assets_verification) { - expected_libs_and_assets = - "expectations/$target_name.$target_cpu.libs_and_assets.expected" + expected_libs_and_assets = "expectations/trichrome_chrome_bundle.$target_cpu.libs_and_assets.expected" } } # Creates .zip of .apk splits suitable for the Android system image. system_image_apks("trichrome_chrome_system_zip") { - apk_or_bundle_target = ":trichrome_chrome_bundle" + apk_or_bundle_target = ":$_main_trichrome_chrome_bundle_target" input_apk_or_bundle = "$root_out_dir/apks/TrichromeChrome.aab" output = "$root_out_dir/apks/TrichromeChromeSystem.zip" stub_output = "$root_out_dir/apks/TrichromeChrome-Stub.apk" @@ -3208,7 +3272,7 @@ if (current_toolchain == default_toolchain) { # Combines all splits into a single .apk for the Android system image. system_image_apks("trichrome_chrome_system_apk") { - apk_or_bundle_target = ":trichrome_chrome_bundle" + apk_or_bundle_target = ":$_main_trichrome_chrome_bundle_target" input_apk_or_bundle = "$root_out_dir/apks/TrichromeChrome.aab" output = "$root_out_dir/apks/TrichromeChromeSystem.apk" fuse_apk = true @@ -3269,13 +3333,13 @@ if (current_toolchain == default_toolchain) { } else { # Used for binary size monitoring. create_app_bundle_minimal_apks("trichrome_chrome_minimal_apks") { - deps = [ ":trichrome_chrome_bundle" ] + deps = [ ":$_main_trichrome_chrome_bundle_target" ] bundle_path = "$root_build_dir/apks/TrichromeChrome.aab" } group("trichrome_32_minimal_apks") { deps = [ + ":$_main_trichrome_library_apk_target", ":trichrome_chrome_minimal_apks", - ":trichrome_library_apk", "//android_webview:trichrome_webview_minimal_apks", ] } @@ -3419,7 +3483,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/ServiceTabLauncher.java", "java/src/org/chromium/chrome/browser/ShortcutHelper.java", "java/src/org/chromium/chrome/browser/WarmupManager.java", - "java/src/org/chromium/chrome/browser/WebContentsFactory.java", "java/src/org/chromium/chrome/browser/about_settings/AboutSettingsBridge.java", "java/src/org/chromium/chrome/browser/announcement/AnnouncementNotificationManager.java", "java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java", @@ -3429,13 +3492,13 @@ 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/AutofillPopupBridge.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", "java/src/org/chromium/chrome/browser/autofill/SaveUpdateAddressProfilePrompt.java", "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/settings/AutofillPaymentMethodsDelegate.java", "java/src/org/chromium/chrome/browser/autofill/settings/SettingsLauncherHelper.java", "java/src/org/chromium/chrome/browser/autofill/settings/VirtualCardEnrollmentFields.java", @@ -3465,7 +3528,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java", "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java", "java/src/org/chromium/chrome/browser/compositor/scene_layer/ToolbarSwipeSceneLayer.java", - "java/src/org/chromium/chrome/browser/content/ContentUtils.java", "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java", "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchContext.java", "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java", @@ -3632,7 +3694,6 @@ source_set("chrome_test_util") { "//chrome/browser", "//chrome/browser/profiles:profile", "//components/variations", - "//url:gurl_android", "//url:url", ] } @@ -3676,7 +3737,6 @@ group("jni_headers") { "//chrome/browser/ui/android/hats/internal:jni_headers", "//chrome/browser/ui/android/logo:jni_headers", "//chrome/browser/ui/android/omnibox:jni_headers", - "//chrome/browser/ui/android/page_insights:jni_headers", "//chrome/browser/ui/android/plus_addresses:jni_headers", "//chrome/browser/ui/android/toolbar:jni_headers", "//chrome/browser/ui/android/webid:jni_headers", @@ -3888,10 +3948,9 @@ if (current_toolchain == default_toolchain && deps = [] if (enable_libs_and_assets_verification) { deps += [ - ":monochrome_public_bundle_validate_libs_and_assets", - ":trichrome_chrome_bundle_validate_libs_and_assets", - ":trichrome_library_apk_validate_libs_and_assets", - "//android_webview:trichrome_webview_bundle_validate_libs_and_assets", + ":${_main_monochrome_public_bundle_target}_validate_libs_and_assets", + ":${_main_trichrome_chrome_bundle_target}_validate_libs_and_assets", + ":${_main_trichrome_library_apk_target}_validate_libs_and_assets", ] if (android_64bit_target_cpu) { deps += [ @@ -3901,21 +3960,35 @@ if (current_toolchain == default_toolchain && ":trichrome_library_32_apk_validate_libs_and_assets", ":trichrome_library_64_32_apk_validate_libs_and_assets", ":trichrome_library_64_apk_validate_libs_and_assets", + "//android_webview:trichrome_webview_32_64_bundle_validate_libs_and_assets", "//android_webview:trichrome_webview_32_bundle_validate_libs_and_assets", "//android_webview:trichrome_webview_64_32_bundle_validate_libs_and_assets", "//android_webview:trichrome_webview_64_bundle_validate_libs_and_assets", ] + } else { + deps += [ + "//android_webview:trichrome_webview_bundle_validate_libs_and_assets", + ] } } if (enable_manifest_verification) { deps += [ - ":monochrome_public_bundle_validate_manifests", - ":monochrome_public_bundle_validate_proguard_config", - ":trichrome_chrome_bundle__base_bundle_module_validate_android_manifest", - ":trichrome_library_apk_validate_android_manifest", - "//android_webview:system_webview_base_bundle_module_validate_android_manifest", - "//android_webview:trichrome_webview_base_bundle_module_validate_android_manifest", + ":${_main_monochrome_public_bundle_target}_validate_manifests", + ":${_main_monochrome_public_bundle_target}_validate_proguard_config", + ":${_main_trichrome_chrome_bundle_target}__base_bundle_module_validate_android_manifest", + ":${_main_trichrome_library_apk_target}_validate_android_manifest", ] + if (android_64bit_target_cpu) { + deps += [ + "//android_webview:system_webview_32_64_base_bundle_module_validate_android_manifest", + "//android_webview:trichrome_webview_32_64_base_bundle_module_validate_android_manifest", + ] + } else { + deps += [ + "//android_webview:system_webview_base_bundle_module_validate_android_manifest", + "//android_webview:trichrome_webview_base_bundle_module_validate_android_manifest", + ] + } } } } diff --git a/src/chrome/android/chrome_public_apk_tmpl.gni b/src/chrome/android/chrome_public_apk_tmpl.gni index 3926325f..4f55c45e 100644 --- a/src/chrome/android/chrome_public_apk_tmpl.gni +++ b/src/chrome/android/chrome_public_apk_tmpl.gni @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -174,6 +174,10 @@ template("chrome_common_apk_or_module_tmpl") { _version_code = chrome_version_code } + if (defined(invoker.version_code)) { + _version_code = invoker.version_code + } + # Need to apply override explicitly to have it apply to library version. if (android_override_version_code != "") { _version_code = android_override_version_code diff --git a/src/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml b/src/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml index c89b2363..86e8b4db 100644 --- a/src/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml +++ b/src/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml @@ -1,6 +1,6 @@ diff --git a/src/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml b/src/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml index 15ca071b..a921c61a 100644 --- a/src/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml +++ b/src/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml @@ -1,6 +1,6 @@ diff --git a/src/chrome/browser/obsolete_system/obsolete_system_linux.cc b/src/chrome/browser/obsolete_system/obsolete_system_linux.cc index 64505311..2a7f0d9e 100644 --- a/src/chrome/browser/obsolete_system/obsolete_system_linux.cc +++ b/src/chrome/browser/obsolete_system/obsolete_system_linux.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/themes/theme_helper_win.cc b/src/chrome/browser/themes/theme_helper_win.cc index 16d0f092..dd25a49f 100644 --- a/src/chrome/browser/themes/theme_helper_win.cc +++ b/src/chrome/browser/themes/theme_helper_win.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/ui/android/strings/android_chrome_strings.grd b/src/chrome/browser/ui/android/strings/android_chrome_strings.grd index ae42510f..3e248f59 100644 --- a/src/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/src/chrome/browser/ui/android/strings/android_chrome_strings.grd @@ -208,6 +208,9 @@ CHAR_LIMIT guidelines: Site not working? Third-party cookies are blocked + + Site not working? Try temporarily allowing third-party cookies + @@ -525,9 +528,24 @@ CHAR_LIMIT guidelines: Card nickname + + MM / YY + + + Security code + Nickname can’t include numbers + + Invalid date + + + Card expired + + + Optional + Cardholder name @@ -537,12 +555,6 @@ CHAR_LIMIT guidelines: Expiration date - - Expiration month - - - Expiration year - Billing address @@ -937,9 +949,6 @@ For example, some websites may respond to this request by showing you ads that a - - Privacy Sandbox - Trial features are on @@ -952,67 +961,6 @@ For example, some websites may respond to this request by showing you ads that a Manage info used by sites to measure ad performance - - - Trials - - - With Privacy Sandbox trials, sites can deliver the same browsing experience using less of your data. That means more privacy for you and less cross-site tracking. We’ll add new trials as they’re ready to test. - - - About Browser-based ad personalization - - - Ad personalization - - - Your browsing history affects the ads you see - - - Your browsing history affects the ads you see and the interests as estimated below. To protect your privacy, Thorium auto-deletes your interests on a rolling basis each month. Interests can refresh unless you remove them. - - - If Thorium has randomly placed you in an active trial, your browsing history affects the ads you see and the interests as estimated below. To protect your privacy, Thorium deletes your interests on a rolling basis each month. Interests refresh unless you remove them. - - - When trials are on and if Thorium has randomly placed you in an active trial, your browsing history affects the ads you see and the interests as estimated below. To protect your privacy, Thorium deletes your interests on a rolling basis each month. - - - Ad measurement - - - Ad measurement allows sites you visit to request information from Thorium that helps the site measure the performance of their ads. Ad measurement restricts cross-site tracking by transferring as little information as possible between sites. - -When you delete your browsing history — all or for a specific site — you also delete associated measurement info. See <link>your browsing history</link>. - - - When trials are on, Ad measurement allows sites you visit to request information from Thorium that helps the site measure the performance of their ads. Ad measurement restricts cross-site tracking by transferring as little information as possible between sites. - -When you delete your browsing history — all or for a specific site — you also delete associated measurement info. See <link>your browsing history</link>. - - - Advertisers can understand how ads perform - - - Spam & fraud reduction - - - Help sites fight fraud and distinguish bots from people - - - Spam & fraud reduction relies on private state tokens to help sites fight fraud and distinguish bots from people. - -Based on your interaction with a site, like regularly signing in to an account, that site can issue a private state token to your browser. Later, if other sites you visit check for and find a valid private state token, they’re more likely to treat you like a person and not a bot. - -Private state tokens improve privacy on the web and can’t be used to find out who you are. - - - When trials are on, Spam & fraud reduction relies on private state tokens to help sites fight fraud and distinguish bots from people. - -Based on your interaction with a site, like regularly signing in to an account, that site can issue a private state token to your browser. Later, if other sites you visit check for and find a valid private state token, they’re more likely to treat you like a person and not a bot. - -Private state tokens improve privacy on the web and can’t be used to find out who you are. - <b>What data is used:</b> Your browsing history, a record of sites you’ve visited using Thorium on this device. @@ -1031,66 +979,12 @@ Private state tokens improve privacy on the web and can’t be used to find out <b>How you can manage your data:</b> To protect your privacy, we auto-delete sites from the list that are older than 4 weeks. A site you visit again might appear on the list again. Or you can remove a site if you don’t want that site to ever define interests for you. - - About ad personalization - Add %1$sActing and Theater - - Add %1$sexample.com - - - Thorium can consider this interest - - - Site can define interests - Remove %1$sActing and Theater - - Remove %1$sexample.com - - - Interest removed - - - Interests you removed - - - Site removed - - - Sites you removed - - - Allow an interest or site if you think ads related to the item would be useful to you - - - Browser-based ad personalization - - - Your interests as estimated by Thorium - - - Sites you visit that define your interests - - - A list of interests will appear here as you browse the web - - - Interests you removed will appear here - - - Sites you removed will appear here - - - Sites you visit that define your interests - - - A list of sites will appear here as you browse the web - @@ -1150,9 +1044,6 @@ Private state tokens improve privacy on the web and can’t be used to find out Help us build a better web - - Thorium is finding new ways to reduce tracking and keep you even safer as you browse. Thorium also <link>estimates your interests</link> and enables you to manage them. Then, sites you visit can ask Thorium for your interests to show you ads. - @@ -1655,19 +1546,21 @@ Your Google account may have other forms of browsing history like searches and a When you tap or type in the address bar or search box, you'll see suggestions from your default search engine. This is off in Incognito. - What you type in the address bar or search box is sent to your default search engine + As you type, Thorium sends the content of the address bar or search box to your default search engine - Depending on your settings, Thorium may also send cookies and your current URL + Depending on your settings, Thorium may also send cookies, your current URL, and your location + + + When off, you’ll still see suggestions that Thorium provides locally - - + Tracking protection - - Protection from trackers (third-party cookies, IP tracking, invasive scripts, and more) + + Manage third-party cookies and tracking protections @@ -2685,12 +2578,6 @@ To change this setting, <resetlink>reset sync

Search image with Google Lens <new>New</new> - - Search image with Google <new>New</new> - - - Search inside image with Google <new>New</new> - Translate image with Google Lens <new>New</new> @@ -3568,6 +3455,19 @@ To change this setting, <resetlink>reset sync

Discover by Google - off + + Content for young minds + + + Content by Google for young minds + + + Content for young minds - off + + + Content by Google for young minds - off + + Following @@ -3692,6 +3592,12 @@ To change this setting, <resetlink>reset sync

Collapse to side view + + Minimize tab + + + Minimize tab to return to it later + New tab @@ -4059,27 +3965,51 @@ To change this setting, <resetlink>reset sync

Sort by manual order + + Sorting by manual order + Sort by newest + + Sorting by newest + Sort by oldest + + Sorting by oldest + Sort by last opened + + Sorting by last opened + Sort by A to Z - + + Sorting from A to Z + + Sort by Z to A + + Sorting from Z to A + Visual view + + Showing visual view + Compact view + + Showing compact view + Create new folder @@ -5041,9 +4971,6 @@ To change this setting, <resetlink>reset sync

<link>Your devices</link> · %1$sfoo@gmail.com - - You can send tabs between devices that are signed in with the same Google Account - To send this tab to another device, sign in to Thorium there @@ -5764,24 +5691,66 @@ To change this setting, <resetlink>reset sync

Sign in bottom sheet is closed. - + You can use your %1$sidp.com account on this site. To continue, sign in to %1$sidp.com. - + Continue - + Got it - - More details - - + Can't continue with %1$sidp.example - + Something went wrong + + %1$srp.example can't continue using %2$sidp.example + + + This option is unavailable right now. + + + %1$srp.example can't continue using %2$sidp.example + + + This option is unavailable right now. + + + Check that you chose the right account + + + Check if the selected account is supported. + + + Check your internet connection + + + If you're online but this issue keeps happening, you can try other ways to continue on %1$srp.example. + + + Try again later + + + %1$sidp.example isn't available right now. + + + <link_more_details>Get more information</link_more_details> from %1$sidp.example. + + + You can try other ways to continue on %1$srp.example. + + + If this issue keeps happening, <link_more_details>get more information</link_more_details> from %1$sidp.example. + + + <link_more_details>More details</link_more_details> + + + If this issue keeps happening, you can try other ways to continue on %1$srp.example. + Signing you in… @@ -5817,10 +5786,10 @@ To change this setting, <resetlink>reset sync

- Upgrade navigations to HTTPS and warn you before loading sites that don’t support it + Use HTTPS whenever possible and get warned before loading sites that don’t support it - Upgrade navigations to HTTPS and warn you before loading sites that don’t support it. You can’t change this setting because you have Advanced Protection enabled. + Use HTTPS whenever possible and get warned before loading sites that don’t support it. You can’t change this setting because you have Advanced Protection enabled. @@ -5993,6 +5962,9 @@ To change this setting, <resetlink>reset sync

Use password + + Use password %1$s + Create my own @@ -6000,45 +5972,18 @@ To change this setting, <resetlink>reset sync

- - - Tap to close “Listen to this page”. + + + Add your username - - “Listen to this page” player. + + Add username - - “Listen to this page” player opened at full height. + + Cancel - - “Listen to this page” player minimized. - - - Thorium now playing - - - Back %1$s10 seconds - - - Forward %1$s30 seconds - - - Play - - - Pause - - - Playback speed: %1$s1.0. Click to change. - - - More options - - - Playback is unavailable for this page. - - - Loading… + + To help Google Password Manager save your sign-in info, add your username for this site @@ -6063,6 +6008,11 @@ To change this setting, <resetlink>reset sync

Use another device + + + + Lorem Ipsum + diff --git a/src/chrome/browser/ui/startup/bad_flags_prompt.cc b/src/chrome/browser/ui/startup/bad_flags_prompt.cc index 30f07c02..592741f0 100644 --- a/src/chrome/browser/ui/startup/bad_flags_prompt.cc +++ b/src/chrome/browser/ui/startup/bad_flags_prompt.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/ui/tabs/tab_strip_model.cc b/src/chrome/browser/ui/tabs/tab_strip_model.cc index ed42b3dd..5e1735a6 100644 --- a/src/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/src/chrome/browser/ui/tabs/tab_strip_model.cc @@ -38,12 +38,15 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_service.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_service_factory.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_session.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service.h" #include "chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_service_factory.h" -#include "chrome/browser/ui/tabs/tab.h" #include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_group.h" #include "chrome/browser/ui/tabs/tab_group_model.h" +#include "chrome/browser/ui/tabs/tab_model.h" #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" #include "chrome/browser/ui/tabs/tab_utils.h" @@ -217,34 +220,6 @@ DetachedWebContents::DetachedWebContents( DetachedWebContents::~DetachedWebContents() = default; DetachedWebContents::DetachedWebContents(DetachedWebContents&&) = default; -/////////////////////////////////////////////////////////////////////////////// -// Tab - -// An object to own a WebContents that is in a tabstrip, as well as other -// various properties it has. -class TabStripModel::Tab : public TabBase { - public: - explicit Tab(std::unique_ptr content) - : TabBase(std::move(content)) {} - - // Changes the WebContents that this Tab tracks. - std::unique_ptr ReplaceWebContents( - std::unique_ptr contents); - WebContents* web_contents() { return contents(); } - - void WriteIntoTrace(perfetto::TracedValue context) const { - auto dict = std::move(context).WriteDictionary(); - dict.Add("web_contents", contents()); - dict.Add("pinned", pinned()); - dict.Add("blocked", blocked()); - } -}; - -std::unique_ptr TabStripModel::Tab::ReplaceWebContents( - std::unique_ptr contents) { - return ReplaceContents(std::move(contents)); -} - // Holds all state necessary to send notifications for detached tabs. struct TabStripModel::DetachNotifications { DetachNotifications(WebContents* initially_active_web_contents, @@ -323,6 +298,30 @@ void TabStripModel::RemoveObserver(TabStripModelObserver* observer) { observers_.RemoveObserver(observer); } +int TabStripModel::GetIndexOfTab(TabHandle tab_handle) const { + const TabModel* tab_model = tab_handle.Get(); + if (tab_model == nullptr) { + return kNoTab; + } + + const auto is_same_tab = [tab_model](const std::unique_ptr& other) { + return other.get() == tab_model; + }; + + const auto iter = + std::find_if(contents_data_.cbegin(), contents_data_.cend(), is_same_tab); + if (iter == contents_data_.cend()) { + return kNoTab; + } + return iter - contents_data_.begin(); +} + +TabHandle TabStripModel::GetTabHandleAt(int index) const { + CHECK(ContainsIndex(index)); + + return contents_data_[index]->GetHandle(); +} + bool TabStripModel::ContainsIndex(int index) const { return index >= 0 && index < count(); } @@ -357,7 +356,7 @@ std::unique_ptr TabStripModel::ReplaceWebContentsAt( TabStripSelectionChange selection(GetActiveWebContents(), selection_model_); WebContents* raw_new_contents = new_contents.get(); std::unique_ptr old_contents = - contents_data_[index]->ReplaceWebContents(std::move(new_contents)); + contents_data_[index]->ReplaceContents(std::move(new_contents)); // When the active WebContents is replaced send out a selection notification // too. We do this as nearly all observers need to treat a replacement of the @@ -431,7 +430,7 @@ std::unique_ptr TabStripModel::DetachWebContentsImpl( for (auto& observer : observers_) { observer.OnTabWillBeRemoved( - contents_data_[index_at_time_of_removal]->web_contents(), + contents_data_[index_at_time_of_removal]->contents(), index_at_time_of_removal); } @@ -450,7 +449,7 @@ std::unique_ptr TabStripModel::DetachWebContentsImpl( UngroupTab(index_at_time_of_removal); - std::unique_ptr old_data = + std::unique_ptr old_data = std::move(contents_data_[index_at_time_of_removal]); contents_data_.erase(contents_data_.begin() + index_at_time_of_removal); @@ -477,7 +476,7 @@ std::unique_ptr TabStripModel::DetachWebContentsImpl( } } - auto owned_contents = old_data->ReplaceWebContents(nullptr); + auto owned_contents = old_data->ReplaceContents(nullptr); auto* contents = owned_contents.get(); return std::make_unique( index_before_any_removals, index_at_time_of_removal, @@ -500,8 +499,8 @@ void TabStripModel::SendDetachWebContentsNotifications( TabStripModelChange::Remove remove; for (auto& dwc : notifications->detached_web_contents) { - remove.contents.push_back({dwc->contents, dwc->index_before_any_removals, - dwc->remove_reason, dwc->id}); + remove.contents.emplace_back(dwc->contents, dwc->index_before_any_removals, + dwc->remove_reason, dwc->id); } TabStripModelChange change(std::move(remove)); @@ -646,8 +645,9 @@ WebContents* TabStripModel::GetWebContentsAt(int index) const { int TabStripModel::GetIndexOfWebContents(const WebContents* contents) const { for (size_t i = 0; i < contents_data_.size(); ++i) { - if (contents_data_[i]->web_contents() == contents) + if (contents_data_[i]->contents() == contents) { return i; + } } return kNoTab; } @@ -709,8 +709,9 @@ void TabStripModel::CloseWebContentsAt(int index, uint32_t close_types) { bool TabStripModel::TabsAreLoading() const { for (const auto& data : contents_data_) { - if (data->web_contents()->IsLoading()) + if (data->contents()->IsLoading()) { return true; + } } return false; @@ -749,7 +750,7 @@ int TabStripModel::GetIndexOfLastWebContentsOpenedBy(const WebContents* opener, continue; break; } - opener_and_descendants.insert(contents_data_[i]->web_contents()); + opener_and_descendants.insert(contents_data_[i]->contents()); last_index = i; } return last_index; @@ -780,8 +781,7 @@ void TabStripModel::SetTabBlocked(int index, bool blocked) { return; contents_data_[index]->set_blocked(blocked); for (auto& observer : observers_) - observer.TabBlockedStateChanged(contents_data_[index]->web_contents(), - index); + observer.TabBlockedStateChanged(contents_data_[index]->contents(), index); } int TabStripModel::SetTabPinned(int index, bool pinned) { @@ -1344,6 +1344,9 @@ bool TabStripModel::IsContextMenuCommandEnabled( delegate()->CanMoveTabsToWindow(indices); } + case CommandOrganizeTabs: + return true; + case CommandFollowSite: case CommandUnfollowSite: { std::vector indices = GetIndicesForCommand(context_index); @@ -1508,7 +1511,7 @@ void TabStripModel::ExecuteContextMenuCommand(int context_index, std::vector indices = GetIndicesForCommand(context_index); DCHECK(indices.size() == 1); Browser* browser = - chrome::FindBrowserWithWebContents(GetWebContentsAt(indices.front())); + chrome::FindBrowserWithTab(GetWebContentsAt(indices.front())); UserNotesController::InitiateNoteCreationForTab(browser, indices.front()); break; } @@ -1560,6 +1563,16 @@ void TabStripModel::ExecuteContextMenuCommand(int context_index, break; } + case CommandOrganizeTabs: { + base::RecordAction(UserMetricsAction("TabContextMenu_OrganizeTabs")); + const Browser* const browser = + chrome::FindBrowserWithTab(GetWebContentsAt(context_index)); + TabOrganizationService* const service = + TabOrganizationServiceFactory::GetForProfile(profile_); + service->StartRequest(browser); + break; + } + case CommandFollowSite: { base::RecordAction(UserMetricsAction("DesktopFeed.FollowSite")); FollowSites(GetIndicesForCommand(context_index)); @@ -1675,6 +1688,9 @@ bool TabStripModel::ContextMenuCommandToBrowserCommand(int cmd_id, case CommandCloseTab: *browser_cmd = IDC_CLOSE_TAB; break; + case CommandOrganizeTabs: + *browser_cmd = IDC_ORGANIZE_TABS; + break; default: *browser_cmd = 0; return false; @@ -1829,7 +1845,8 @@ int TabStripModel::InsertWebContentsAtImpl( // since the old contents and the new contents will be the same... WebContents* active_contents = GetActiveWebContents(); WebContents* raw_contents = contents.get(); - std::unique_ptr data = std::make_unique(std::move(contents)); + std::unique_ptr data = + std::make_unique(std::move(contents)); data->set_pinned(pin); if ((add_types & ADD_INHERIT_OPENER) && active_contents) { if (active) { @@ -2018,7 +2035,7 @@ bool TabStripModel::CloseWebContentses( WebContents* TabStripModel::GetWebContentsAtImpl(int index) const { CHECK(ContainsIndex(index)) << "Failed to find: " << index << " in: " << count() << " entries."; - return contents_data_[index]->web_contents(); + return contents_data_[index]->contents(); } TabStripSelectionChange TabStripModel::SetSelection( @@ -2064,8 +2081,7 @@ TabStripSelectionChange TabStripModel::SetSelection( // if the user backgrounds an audible tab. if (selection.old_contents && selection.old_contents->IsCurrentlyAudible()) { - Browser* browser = - chrome::FindBrowserWithWebContents(selection.old_contents); + Browser* browser = chrome::FindBrowserWithTab(selection.old_contents); DCHECK(browser); browser->window()->MaybeShowFeaturePromo( feature_engagement::kIPHTabAudioMutingFeature); @@ -2160,8 +2176,8 @@ void TabStripModel::MoveWebContentsAtImpl(int index, CHECK_LT(index, static_cast(contents_data_.size())); CHECK_LT(to_position, static_cast(contents_data_.size())); - std::unique_ptr moved_data = std::move(contents_data_[index]); - WebContents* web_contents = moved_data->web_contents(); + std::unique_ptr moved_data = std::move(contents_data_[index]); + WebContents* web_contents = moved_data->contents(); contents_data_.erase(contents_data_.begin() + index); contents_data_.insert(contents_data_.begin() + to_position, std::move(moved_data)); @@ -2224,7 +2240,7 @@ void TabStripModel::AddToNewGroupImpl(const std::vector& indices, if (!group_model_) return; - DCHECK(!base::Contains(contents_data_, new_group, &Tab::group)); + DCHECK(!base::Contains(contents_data_, new_group, &TabModel::group)); group_model_->AddTabGroup(new_group, absl::nullopt); // Find a destination for the first tab that's not pinned or inside another @@ -2393,8 +2409,8 @@ absl::optional TabStripModel::UngroupTab(int index) { // Update the tab. contents_data_[index]->set_group(absl::nullopt); for (auto& observer : observers_) { - observer.TabGroupedStateChanged( - absl::nullopt, contents_data_[index]->web_contents(), index); + observer.TabGroupedStateChanged(absl::nullopt, + contents_data_[index]->contents(), index); } // Update the group model. @@ -2421,8 +2437,8 @@ void TabStripModel::GroupTab(int index, const tab_groups::TabGroupId& group) { } contents_data_[index]->set_group(group); for (auto& observer : observers_) { - observer.TabGroupedStateChanged( - group, contents_data_[index]->web_contents(), index); + observer.TabGroupedStateChanged(group, contents_data_[index]->contents(), + index); } group_model_->GetTabGroup(group)->AddTab(); @@ -2480,7 +2496,7 @@ int TabStripModel::SetTabPinnedImpl(int index, bool pinned) { } for (auto& observer : observers_) { - observer.TabPinnedStateChanged(this, contents_data_[index]->web_contents(), + observer.TabPinnedStateChanged(this, contents_data_[index]->contents(), index); } @@ -2570,15 +2586,15 @@ void TabStripModel::FixOpeners(int index) { continue; // Ensure a tab isn't its own opener. - data->set_opener(new_opener == data->web_contents() ? nullptr : new_opener); + data->set_opener(new_opener == data->contents() ? nullptr : new_opener); } // Sanity check that none of the tabs' openers refer |old_contents| or // themselves. DCHECK(!base::ranges::any_of( - contents_data_, [old_contents](const std::unique_ptr& data) { + contents_data_, [old_contents](const std::unique_ptr& data) { return data->opener() == old_contents || - data->opener() == data->web_contents(); + data->opener() == data->contents(); })); } diff --git a/src/chrome/browser/ui/views/frame/browser_root_view.cc b/src/chrome/browser/ui/views/frame/browser_root_view.cc index e3fb310a..b4fb4647 100644 --- a/src/chrome/browser/ui/views/frame/browser_root_view.cc +++ b/src/chrome/browser/ui/views/frame/browser_root_view.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/ui/views/frame/browser_root_view.h b/src/chrome/browser/ui/views/frame/browser_root_view.h index 93876f69..9c9a2210 100644 --- a/src/chrome/browser/ui/views/frame/browser_root_view.h +++ b/src/chrome/browser/ui/views/frame/browser_root_view.h @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/ui/views/tabs/tab.cc b/src/chrome/browser/ui/views/tabs/tab.cc index f1244338..385108c2 100644 --- a/src/chrome/browser/ui/views/tabs/tab.cc +++ b/src/chrome/browser/ui/views/tabs/tab.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors, Alex313031, and gz83 +// Copyright 2024 The Chromium Authors, Alex313031, and gz83 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -543,7 +543,8 @@ bool Tab::OnMousePressed(const ui::MouseEvent& event) { } bool Tab::OnMouseDragged(const ui::MouseEvent& event) { - controller_->ContinueDrag(this, event); + // TODO: ensure ignoring return value is ok. + std::ignore = controller_->ContinueDrag(this, event); return true; } diff --git a/src/chrome/browser/ui/views/tabs/tab_strip.cc b/src/chrome/browser/ui/views/tabs/tab_strip.cc index 6bfa6e39..931aaaac 100644 --- a/src/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/src/chrome/browser/ui/views/tabs/tab_strip.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -1454,7 +1454,6 @@ void TabStrip::AddSelectionFromAnchorTo(Tab* tab) { void TabStrip::CloseTab(Tab* tab, CloseTabSource source) { const absl::optional index_to_close = tab_container_->GetModelIndexOfFirstNonClosingTab(tab); - if (index_to_close.has_value()) CloseTabInternal(index_to_close.value(), source); } @@ -1613,11 +1612,32 @@ void TabStrip::MaybeStartDrag( TabSlotView::ViewType::kTabGroupHeader); drag_context_->MaybeStartDrag(source, event, original_selection); + has_reported_tab_drag_metrics_ = false; } TabSlotController::Liveness TabStrip::ContinueDrag( views::View* view, const ui::LocatedEvent& event) { + // We enter here when dragging really happens. + // Note that `MaybeStartDrag()` is invoked as soon as mouse pressed. + if (!has_reported_tab_drag_metrics_) { + base::TimeTicks drag_time = base::TimeTicks::Now(); + if (mouse_entered_tabstrip_time_.has_value()) { + UmaHistogramMediumTimes("TabStrip.Dragging.TimeFromMouseEntered", + drag_time - mouse_entered_tabstrip_time_.value()); + } + + tab_drag_count_30min_++; + tab_drag_count_5min_++; + + if (last_tab_drag_time_.has_value()) { + UmaHistogramLongTimes("TabStrip.Dragging.TimeFromLastDrag", + drag_time - last_tab_drag_time_.value()); + } + last_tab_drag_time_ = drag_time; + + has_reported_tab_drag_metrics_ = true; + } return drag_context_->ContinueDrag(view, event); } @@ -1651,11 +1671,12 @@ void TabStrip::OnMouseEventInTab(views::View* source, // Record time from cursor entering the tabstrip to first tap on a tab to // switch. if (mouse_entered_tabstrip_time_.has_value() && + !has_reported_time_mouse_entered_to_switch_ && event.type() == ui::ET_MOUSE_PRESSED && views::IsViewClass(source)) { UMA_HISTOGRAM_MEDIUM_TIMES( "TabStrip.TimeToSwitch", base::TimeTicks::Now() - mouse_entered_tabstrip_time_.value()); - mouse_entered_tabstrip_time_.reset(); + has_reported_time_mouse_entered_to_switch_ = true; } } @@ -1860,6 +1881,25 @@ void TabStrip::Init() { // So we only get enter/exit messages when the mouse enters/exits the whole // tabstrip, even if it is entering/exiting a specific Tab, too. SetNotifyEnterExitOnChild(true); + + tab_drag_count_timer_5min_ = std::make_unique( + FROM_HERE, base::Minutes(5), + base::BindRepeating( + [](TabStrip* tab_strip) { + base::UmaHistogramCounts100("TabStrip.Dragging.Count5Min", + tab_strip->tab_drag_count_5min_); + tab_strip->tab_drag_count_5min_ = 0; + }, + base::Unretained(this))); + tab_drag_count_timer_30min_ = std::make_unique( + FROM_HERE, base::Minutes(30), + base::BindRepeating( + [](TabStrip* tab_strip) { + base::UmaHistogramCounts100("TabStrip.Dragging.Count30Min", + tab_strip->tab_drag_count_30min_); + tab_strip->tab_drag_count_5min_ = 0; + }, + base::Unretained(this))); } void TabStrip::NewTabButtonPressed(const ui::Event& event) { @@ -1889,10 +1929,16 @@ void TabStrip::NewTabButtonPressed(const ui::Event& event) { return; } } - + const int tab_count = GetTabCount(); controller_->CreateNewTab(); if (event.type() == ui::ET_GESTURE_TAP) TouchUMA::RecordGestureAction(TouchUMA::kGestureNewTabTap); + + if (GetTabCount() != tab_count + 1) { + UMA_HISTOGRAM_ENUMERATION("TabStrip.Failures.Action", + TabFailureContext::kNewTabOpen, + TabFailureContext::kMaxValue); + } } bool TabStrip::ShouldHighlightCloseButtonAfterRemove() { @@ -2139,6 +2185,7 @@ void TabStrip::TabContextMenuController::ShowContextMenuForViewImpl( void TabStrip::OnMouseEntered(const ui::MouseEvent& event) { mouse_entered_tabstrip_time_ = base::TimeTicks::Now(); + has_reported_time_mouse_entered_to_switch_ = false; } void TabStrip::OnMouseExited(const ui::MouseEvent& event) { diff --git a/src/chrome/browser/ui/views/tabs/tab_style_views.cc b/src/chrome/browser/ui/views/tabs/tab_style_views.cc index b24ae70c..266feda6 100644 --- a/src/chrome/browser/ui/views/tabs/tab_style_views.cc +++ b/src/chrome/browser/ui/views/tabs/tab_style_views.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/chrome/browser/ui/views/tabs/tab_style_views.h b/src/chrome/browser/ui/views/tabs/tab_style_views.h index 1374babe..99f72a53 100644 --- a/src/chrome/browser/ui/views/tabs/tab_style_views.h +++ b/src/chrome/browser/ui/views/tabs/tab_style_views.h @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/components/feed/core/shared_prefs/pref_names.cc b/src/components/feed/core/shared_prefs/pref_names.cc index fadb75f2..6ba69842 100644 --- a/src/components/feed/core/shared_prefs/pref_names.cc +++ b/src/components/feed/core/shared_prefs/pref_names.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors, Alex313031 and gz83 +// Copyright 2024 The Chromium Authors, Alex313031, and gz83 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/components/history/core/browser/history_backend.cc b/src/components/history/core/browser/history_backend.cc index 83f84fbf..6156abe5 100644 --- a/src/components/history/core/browser/history_backend.cc +++ b/src/components/history/core/browser/history_backend.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/src/components/variations/service/variations_service.cc b/src/components/variations/service/variations_service.cc index ba259307..7f7fcb07 100644 --- a/src/components/variations/service/variations_service.cc +++ b/src/components/variations/service/variations_service.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors and Alex313031 +// Copyright 2024 The Chromium Authors and Alex313031 // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -37,6 +37,7 @@ #include "components/variations/pref_names.h" #include "components/variations/proto/variations_seed.pb.h" #include "components/variations/seed_response.h" +#include "components/variations/variations_safe_seed_store_local_state.h" #include "components/variations/variations_seed_simulator.h" #include "components/variations/variations_switches.h" #include "components/variations/variations_url_constants.h" @@ -336,7 +337,8 @@ VariationsService::VariationsService( std::make_unique( local_state, MaybeImportFirstRunSeed(client_.get(), local_state), - /*signature_verification_enabled=*/true), + /*signature_verification_enabled=*/true, + std::make_unique(local_state)), ui_string_overrider) { DCHECK(client_); DCHECK(resource_request_allowed_notifier_); diff --git a/src/components/version_ui/resources/about_version.html b/src/components/version_ui/resources/about_version.html index 85271d47..7bb22df5 100644 --- a/src/components/version_ui/resources/about_version.html +++ b/src/components/version_ui/resources/about_version.html @@ -3,6 +3,7 @@ + diff --git a/src/media/base/supported_types.cc b/src/media/base/supported_types.cc index 392a7077..dcd47a22 100644 --- a/src/media/base/supported_types.cc +++ b/src/media/base/supported_types.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors, Alex313031, and Midzer +// Copyright 2024 The Chromium Authors, Alex313031, and Midzer // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -197,6 +197,7 @@ bool IsAudioCodecProprietary(AudioCodec codec) { case AudioCodec::kDTS: case AudioCodec::kDTSXP2: case AudioCodec::kDTSE: + case AudioCodec::kAC4: return true; case AudioCodec::kFLAC: @@ -266,8 +267,8 @@ bool IsAV1Supported(const VideoType& type) { } bool IsMPEG4Supported() { -#if BUILDFLAG(IS_CHROMEOS_ASH) - return true; +#if BUILDFLAG(IS_CHROMEOS) && BUILDFLAG(USE_PROPRIETARY_CODECS) + return base::FeatureList::IsEnabled(kCrOSLegacyMediaFormats); #else return false; #endif @@ -324,9 +325,10 @@ bool IsDefaultSupportedVideoType(const VideoType& type) { #endif switch (type.codec) { + case VideoCodec::kTheora: + return IsBuiltInVideoCodec(type.codec); case VideoCodec::kH264: case VideoCodec::kVP8: - case VideoCodec::kTheora: case VideoCodec::kMPEG2: return true; case VideoCodec::kAV1: @@ -372,6 +374,7 @@ bool IsDefaultSupportedAudioType(const AudioType& type) { case AudioCodec::kGSM_MS: case AudioCodec::kALAC: case AudioCodec::kMpegHAudio: + case AudioCodec::kAC4: case AudioCodec::kUnknown: return false; case AudioCodec::kDTS: @@ -395,7 +398,7 @@ bool IsDefaultSupportedAudioType(const AudioType& type) { bool IsBuiltInVideoCodec(VideoCodec codec) { #if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) if (codec == VideoCodec::kTheora) - return true; + return base::FeatureList::IsEnabled(kTheoraVideoCodec); if (codec == VideoCodec::kVP8) return true; #if BUILDFLAG(USE_PROPRIETARY_CODECS) diff --git a/src/media/ffmpeg/ffmpeg_common.cc b/src/media/ffmpeg/ffmpeg_common.cc index b1b98d28..6e5951d2 100644 --- a/src/media/ffmpeg/ffmpeg_common.cc +++ b/src/media/ffmpeg/ffmpeg_common.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors, Alex313031, and Midzer +// Copyright 2024 The Chromium Authors, Alex313031, and Midzer // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -425,10 +425,10 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, } #endif - // Verify that AudioConfig.bits_per_channel was calculated correctly for + // Verify that AudioConfig.bytes_per_channel was calculated correctly for // codecs that have |sample_fmt| set by FFmpeg. - DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt) * 8, - config->bits_per_channel()); + DCHECK_EQ(av_get_bytes_per_sample(codec_context->sample_fmt), + config->bytes_per_channel()); return true; } diff --git a/src/media/media_options.gni b/src/media/media_options.gni index 8bdad7b2..3a37713c 100644 --- a/src/media/media_options.gni +++ b/src/media/media_options.gni @@ -1,4 +1,4 @@ -# Copyright 2023 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -71,6 +71,10 @@ declare_args() { # on-device decoding and bitstream passthrough as supported by device. enable_platform_ac3_eac3_audio = proprietary_codecs + # Enables AC4 audio handling in chromium. This includes demuxing, + # on-device decoding and bitstream passthrough as supported by device. + enable_platform_ac4_audio = proprietary_codecs + enable_platform_mpeg_h_audio = proprietary_codecs # Enables DTS/DTSX audio handling in chromium. This includes demuxing, @@ -143,6 +147,8 @@ assert(!enable_hls_demuxer || proprietary_codecs, "proprietary_codecs required for enable_hls_demuxer") assert(!enable_platform_ac3_eac3_audio || proprietary_codecs, "proprietary_codecs required for enable_platform_ac3_eac3_audio") +assert(!enable_platform_ac4_audio || proprietary_codecs, + "proprietary_codecs required for enable_platform_ac4_audio") assert(!enable_platform_mpeg_h_audio || proprietary_codecs, "proprietary_codecs required for enable_platform_mpeg_h_audio") assert(!enable_mse_mpeg2ts_stream_parser || proprietary_codecs, @@ -220,7 +226,7 @@ declare_args() { declare_args() { # Enables host verification for CDMs. # Windows and Mac. - enable_cdm_host_verification = is_chrome_branded + enable_cdm_host_verification = is_chrome_branded && !is_chrome_for_testing_branded # Enable Storage ID which is used by CDMs. This is only available with chrome # branding, but may be overridden by other embedders. @@ -234,9 +240,13 @@ declare_args() { alternate_cdm_storage_id_key = "" } -assert(!enable_cdm_host_verification || is_mac || target_os == "win", +assert(!enable_cdm_host_verification || is_mac || is_win || target_os == "win", "CDM host verification is only supported on Mac and Windows.") +# https://crbug.com/1475137#c37 +assert(!is_chrome_for_testing_branded || !enable_cdm_host_verification, + "Chrome for Testing is incompatible with CDM Host Verification.") + # Default |mojo_media_services| and |mojo_media_host| on various platforms. See # comments below for valid values. Can be overridden by gn build arguments from # the --args command line flag. @@ -250,6 +260,7 @@ if (is_cast_media_device) { _default_mojo_media_services = [ "cdm", "audio_decoder", + "audio_encoder", "video_decoder", ] _default_mojo_media_host = "gpu" diff --git a/src/ui/gtk/native_theme_gtk.cc b/src/ui/gtk/native_theme_gtk.cc index d4f7a35e..6cd84bdd 100644 --- a/src/ui/gtk/native_theme_gtk.cc +++ b/src/ui/gtk/native_theme_gtk.cc @@ -1,4 +1,4 @@ -// Copyright 2023 The Chromium Authors, Alex313031, qcasey and icepie +// Copyright 2024 The Chromium Authors, Alex313031, qcasey and icepie // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -188,7 +188,7 @@ void NativeThemeGtk::OnThemeChanged(GtkSettings* settings, ui::NativeTheme::GetInstanceForNativeUi()->set_preferred_color_scheme(CalculatePreferredColorScheme()); ui::NativeTheme::GetInstanceForNativeUi()->NotifyOnNativeThemeUpdated(); - // Brute force Web to update + // Brute force Web Contents to update ui::NativeTheme::GetInstanceForWeb()->set_use_dark_colors(color_utils::IsDark(window_bg_color)); ui::NativeTheme::GetInstanceForWeb()->set_preferred_color_scheme(CalculatePreferredColorScheme()); ui::NativeTheme::GetInstanceForWeb()->NotifyOnNativeThemeUpdated(); diff --git a/win_args.gn b/win_args.gn index c56f8342..57d48017 100644 --- a/win_args.gn +++ b/win_args.gn @@ -77,6 +77,7 @@ enable_vr = true enable_platform_hevc = true enable_hevc_parser_and_hw_decoder = true enable_platform_ac3_eac3_audio = true +enable_platform_ac4_audio = true enable_platform_dolby_vision = true enable_platform_encrypted_dolby_vision = true enable_platform_mpeg_h_audio = true