diff --git a/arm/raspi/third_party/widevine/cdm/linux/arm64/LICENSE b/arm/third_party/widevine/cdm/linux/arm64/LICENSE
similarity index 100%
rename from arm/raspi/third_party/widevine/cdm/linux/arm64/LICENSE
rename to arm/third_party/widevine/cdm/linux/arm64/LICENSE
diff --git a/arm/raspi/third_party/widevine/cdm/linux/arm64/libwidevinecdm.so b/arm/third_party/widevine/cdm/linux/arm64/libwidevinecdm.so
similarity index 100%
rename from arm/raspi/third_party/widevine/cdm/linux/arm64/libwidevinecdm.so
rename to arm/third_party/widevine/cdm/linux/arm64/libwidevinecdm.so
diff --git a/arm/raspi/third_party/widevine/cdm/linux/arm64/libwidevinecdm_real.so b/arm/third_party/widevine/cdm/linux/arm64/libwidevinecdm_real.so
similarity index 100%
rename from arm/raspi/third_party/widevine/cdm/linux/arm64/libwidevinecdm_real.so
rename to arm/third_party/widevine/cdm/linux/arm64/libwidevinecdm_real.so
diff --git a/arm/raspi/third_party/widevine/cdm/linux/arm64/manifest.json b/arm/third_party/widevine/cdm/linux/arm64/manifest.json
similarity index 100%
rename from arm/raspi/third_party/widevine/cdm/linux/arm64/manifest.json
rename to arm/third_party/widevine/cdm/linux/arm64/manifest.json
diff --git a/arm/raspi/third_party/widevine/cdm/linux/arm64/widevine_cdm_version.h b/arm/third_party/widevine/cdm/linux/arm64/widevine_cdm_version.h
similarity index 100%
rename from arm/raspi/third_party/widevine/cdm/linux/arm64/widevine_cdm_version.h
rename to arm/third_party/widevine/cdm/linux/arm64/widevine_cdm_version.h
diff --git a/infra/THORIUM_DEV_BOOKMARKS.html b/infra/THORIUM_DEV_BOOKMARKS.html
index ddea06b8..834f4c89 100644
--- a/infra/THORIUM_DEV_BOOKMARKS.html
+++ b/infra/THORIUM_DEV_BOOKMARKS.html
@@ -58,10 +58,7 @@
ignores.txt - Chromium Code Search
diff --git a/logos/NEW/webui/extension.svg b/logos/NEW/webui/extension.svg
index 0b17b55c..1ff80eb4 100644
--- a/logos/NEW/webui/extension.svg
+++ b/logos/NEW/webui/extension.svg
@@ -1 +1 @@
-
+
diff --git a/logos/NEW/webui/icon_extensions.svg b/logos/NEW/webui/icon_extensions.svg
index febd5808..aa87165d 100644
--- a/logos/NEW/webui/icon_extensions.svg
+++ b/logos/NEW/webui/icon_extensions.svg
@@ -1 +1 @@
-
+
diff --git a/logos/NEW/webui/searchbox/bookmark_cr23.svg b/logos/NEW/webui/searchbox/bookmark_cr23.svg
new file mode 100644
index 00000000..7c4b7baa
--- /dev/null
+++ b/logos/NEW/webui/searchbox/bookmark_cr23.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logos/NEW/webui/dino.svg b/logos/NEW/webui/searchbox/dino.svg
similarity index 100%
rename from logos/NEW/webui/dino.svg
rename to logos/NEW/webui/searchbox/dino.svg
diff --git a/logos/NEW/webui/searchbox/dino_cr23.svg b/logos/NEW/webui/searchbox/dino_cr23.svg
new file mode 100644
index 00000000..ebdf51fc
--- /dev/null
+++ b/logos/NEW/webui/searchbox/dino_cr23.svg
@@ -0,0 +1 @@
+
diff --git a/logos/NEW/webui/searchbox/extension_app.svg b/logos/NEW/webui/searchbox/extension_app.svg
new file mode 100644
index 00000000..1a52035d
--- /dev/null
+++ b/logos/NEW/webui/searchbox/extension_app.svg
@@ -0,0 +1 @@
+
diff --git a/logos/NEW/webui/incognito.svg b/logos/NEW/webui/searchbox/incognito.svg
similarity index 100%
rename from logos/NEW/webui/incognito.svg
rename to logos/NEW/webui/searchbox/incognito.svg
diff --git a/logos/NEW/webui/searchbox/incognito_cr23.svg b/logos/NEW/webui/searchbox/incognito_cr23.svg
new file mode 100644
index 00000000..db803f3d
--- /dev/null
+++ b/logos/NEW/webui/searchbox/incognito_cr23.svg
@@ -0,0 +1 @@
+
diff --git a/logos/NEW/webui/searchbox/star_active.svg b/logos/NEW/webui/searchbox/star_active.svg
new file mode 100644
index 00000000..f01a4717
--- /dev/null
+++ b/logos/NEW/webui/searchbox/star_active.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/setup.sh b/setup.sh
index 7fe99118..9d0c51cc 100755
--- a/setup.sh
+++ b/setup.sh
@@ -126,6 +126,16 @@ patchAC3 () {
cd ~/thorium
}
+patchSSE2 () {
+ cp -v other/SSE2/angle-lockfree.patch ${CR_SRC_DIR}/third_party/angle/src/ &&
+
+ printf "\n" &&
+ printf "${YEL}Patching ANGLE for SSE2...${c0}\n" &&
+ cd ${CR_SRC_DIR}/third_party/angle/src &&
+ git apply --reject ./angle-lockfree.patch &&
+ cd ~/thorium
+}
+
cd ~/thorium &&
printf "\n" &&
@@ -144,7 +154,6 @@ copyMacOS () {
printf "\n" &&
printf "${YEL}Copying files for MacOS...${c0}\n" &&
cp -v arm/mac_arm.gni ${CR_SRC_DIR}/build/config/arm.gni &&
- cp -v other/AVX2/build/config/compiler/BUILD.gn ${CR_SRC_DIR}/build/config/compiler/ &&
cp -r -v arm/third_party/* ${CR_SRC_DIR}/third_party/ &&
cd ${CR_SRC_DIR} &&
python3 tools/update_pgo_profiles.py --target=mac update --gs-url-base=chromium-optimization-profiles/pgo_profiles &&
@@ -263,6 +272,7 @@ copySSE2 () {
python3 tools/update_pgo_profiles.py --target=win32 update --gs-url-base=chromium-optimization-profiles/pgo_profiles &&
cd ~/thorium &&
[ -f ${CR_SRC_DIR}/third_party/ffmpeg/ffmpeg_hevc_ac3.patch ] || patchAC3;
+ [ -f ${CR_SRC_DIR}/third_party/angle/src/angle-lockfree.patch ] || patchSSE2;
printf "\n"
}
case $1 in
diff --git a/src/chrome/app/theme/chromium/product_logo_16.png b/src/chrome/app/theme/chromium/product_logo_16.png
new file mode 100644
index 00000000..5f86bf2a
Binary files /dev/null and b/src/chrome/app/theme/chromium/product_logo_16.png differ
diff --git a/src/chrome/app/theme/chromium/product_logo_32.png b/src/chrome/app/theme/chromium/product_logo_32.png
new file mode 100644
index 00000000..5e685e9f
Binary files /dev/null and b/src/chrome/app/theme/chromium/product_logo_32.png differ
diff --git a/src/chrome/app/theme/chromium/win/chromium_doc.ico b/src/chrome/app/theme/chromium/win/chromium_doc.ico
new file mode 100644
index 00000000..af7337ea
Binary files /dev/null and b/src/chrome/app/theme/chromium/win/chromium_doc.ico differ
diff --git a/src/chrome/app/theme/chromium/win/chromium_pdf.ico b/src/chrome/app/theme/chromium/win/chromium_pdf.ico
new file mode 100644
index 00000000..c8a46f05
Binary files /dev/null and b/src/chrome/app/theme/chromium/win/chromium_pdf.ico differ
diff --git a/src/media/base/media_switches.cc b/src/media/base/media_switches.cc
index c2bd10af..a056ad07 100644
--- a/src/media/base/media_switches.cc
+++ b/src/media/base/media_switches.cc
@@ -115,12 +115,12 @@ const char kAudioCapturerWithEchoCancellation[] =
"audio-capturer-with-echo-cancellation";
#endif // BUILDFLAG(IS_FUCHSIA)
-#if defined(USE_CRAS)
+#if BUILDFLAG(USE_CRAS)
// Use CRAS, the ChromeOS audio server.
const char kUseCras[] = "use-cras";
// Enforce system audio echo cancellation.
const char kSystemAecEnabled[] = "system-aec-enabled";
-#endif // defined(USE_CRAS)
+#endif // BUILDFLAG(USE_CRAS)
// For automated testing of protected content, this switch allows specific
// domains (e.g. example.com) to always allow the permission to share the
@@ -367,6 +367,13 @@ BASE_FEATURE(kResumeBackgroundVideo,
BASE_FEATURE(kMacLoopbackAudioForScreenShare,
"MacLoopbackAudioForScreenShare",
base::FEATURE_DISABLED_BY_DEFAULT);
+
+// Use the built-in MacOS screen-sharing picker (SCContentSharingPicker). This
+// flag will only use the built-in picker on MacOS 15 Sequoia and later where it
+// is required to avoid recurring permission dialogs.
+BASE_FEATURE(kUseSCContentSharingPicker,
+ "UseSCContentSharingPicker",
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_LINUX)
@@ -474,7 +481,7 @@ BASE_FEATURE(kContextMenuSaveVideoFrameAs,
// Enables the "Search Video Frame with " context menu item.
BASE_FEATURE(kContextMenuSearchForVideoFrame,
"ContextMenuSearchForVideoFrame",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(CHROME_WIDE_ECHO_CANCELLATION)
// If echo cancellation for a mic signal is requested, mix and cancel all audio
@@ -568,12 +575,10 @@ BASE_FEATURE(kCrOSDspBasedAgcAllowed,
"CrOSDspBasedAgcAllowed",
base::FEATURE_ENABLED_BY_DEFAULT);
-BASE_FEATURE(kIgnoreUiGains,
- "IgnoreUiGains",
- base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kIgnoreUiGains, "IgnoreUiGains", base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kShowForceRespectUiGainsToggle,
"ShowForceRespectUiGainsToggle",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kCrOSSystemVoiceIsolationOption,
"CrOSSystemVoiceIsolationOption",
@@ -591,12 +596,6 @@ BASE_FEATURE(kMemoryPressureBasedSourceBufferGC,
"MemoryPressureBasedSourceBufferGC",
base::FEATURE_DISABLED_BY_DEFAULT);
-// Enables writing pixels together for all planes to a multi-planar shared
-// image.
-BASE_FEATURE(kUseWritePixelsYUV,
- "UseWritePixelsYUV",
- base::FEATURE_ENABLED_BY_DEFAULT);
-
// Controls whether the Mirroring Service will fetch, analyze, and store
// information on the quality of the session using RTCP logs.
BASE_FEATURE(kEnableRtcpReporting,
@@ -673,6 +672,13 @@ BASE_FEATURE(kFeatureManagementLiveTranslateCrOS,
"FeatureManagementLiveTranslateCrOS",
base::FEATURE_DISABLED_BY_DEFAULT);
+#if !BUILDFLAG(IS_ANDROID)
+// Blocks picture-in-picture windows while file dialogs are open.
+BASE_FEATURE(kFileDialogsBlockPictureInPicture,
+ "FileDialogsBlockPictureInPicture",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+#endif // !BUILDFLAG(IS_ANDROID)
+
// Show toolbar button that opens dialog for controlling media sessions.
BASE_FEATURE(kGlobalMediaControls,
"GlobalMediaControls",
@@ -688,17 +694,12 @@ BASE_FEATURE(kGlobalMediaControlsAutoDismiss,
"GlobalMediaControlsAutoDismiss",
base::FEATURE_ENABLED_BY_DEFAULT);
-#if BUILDFLAG(IS_CHROMEOS)
-// Updated global media controls UI for CrOS.
-BASE_FEATURE(kGlobalMediaControlsCrOSUpdatedUI,
- "GlobalMediaControlsCrOSUpdatedUI",
- base::FEATURE_ENABLED_BY_DEFAULT);
-#else // BUILDFLAG(IS_CHROMEOS)
+#if !BUILDFLAG(IS_CHROMEOS)
// Updated global media controls UI for all the non-CrOS desktop platforms.
BASE_FEATURE(kGlobalMediaControlsUpdatedUI,
"GlobalMediaControlsUpdatedUI",
base::FEATURE_DISABLED_BY_DEFAULT);
-#endif // BUILDFLAG(IS_CHROMEOS)
+#endif // !BUILDFLAG(IS_CHROMEOS)
#if !BUILDFLAG(IS_ANDROID)
// If enabled, users can request Media Remoting without fullscreen-in-tab.
@@ -827,6 +828,11 @@ BASE_FEATURE(kGlobalVaapiLock,
BASE_FEATURE(kVaapiH264TemporalLayerHWEncoding,
"VaapiH264TemporalLayerEncoding",
base::FEATURE_ENABLED_BY_DEFAULT);
+// Enable software bitrate controller for H264 temporal layer encoding with HW
+// encoder on ChromeOS.
+BASE_FEATURE(kVaapiH264SWBitrateController,
+ "VaapiH264SWBitrateController",
+ base::FEATURE_DISABLED_BY_DEFAULT);
// Enable VP8 temporal layer encoding with HW encoder on ChromeOS.
BASE_FEATURE(kVaapiVp8TemporalLayerHWEncoding,
"VaapiVp8TemporalLayerEncoding",
@@ -835,6 +841,10 @@ BASE_FEATURE(kVaapiVp8TemporalLayerHWEncoding,
BASE_FEATURE(kVaapiVp9SModeHWEncoding,
"VaapiVp9SModeHWEncoding",
base::FEATURE_ENABLED_BY_DEFAULT);
+// Enables VSync aligned MJPEG decoding.
+BASE_FEATURE(kVSyncMjpegDecoding,
+ "VSyncMjpegDecoding",
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif // defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
// Enables the new V4L2StatefulVideoDecoder instead of V4L2VideoDecoder.
@@ -843,7 +853,11 @@ BASE_FEATURE(kVaapiVp9SModeHWEncoding,
// all platforms.
BASE_FEATURE(kV4L2FlatStatefulVideoDecoder,
"V4L2FlatStatefulVideoDecoder",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
+// Enable H264 temporal layer encoding with V4L2 HW encoder on ChromeOS.
+BASE_FEATURE(kV4L2H264TemporalLayerHWEncoding,
+ "V4L2H264TemporalLayerHWEncoding",
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif
// Inform video blitter of video color space.
@@ -860,9 +874,9 @@ BASE_FEATURE(kVideoFrameUseClientSITextureTarget,
"VideoFrameUseClientSITextureTarget",
base::FEATURE_ENABLED_BY_DEFAULT);
-// Displays a minimize button on video picture-in-picture windows.
-BASE_FEATURE(kVideoPictureInPictureMinimizeButton,
- "VideoPictureInPictureMinimizeButton",
+// Displays new video picture-in-picture controls for the 2024 UI update.
+BASE_FEATURE(kVideoPictureInPictureControlsUpdate2024,
+ "VideoPictureInPictureControlsUpdate2024",
base::FEATURE_DISABLED_BY_DEFAULT);
// A video encoder is allowed to drop a frame in cast mirroring.
@@ -878,7 +892,7 @@ BASE_FEATURE(kWebCodecsVideoEncoderFrameDrop,
// A hardware video encoder is allowed to drop a frame in WebRTC.
BASE_FEATURE(kWebRTCHardwareVideoEncoderFrameDrop,
"WebRTCHardwareVideoEncoderFrameDrop",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
// Inform webrtc with correct video color space information whenever
// possible.
@@ -897,6 +911,12 @@ BASE_FEATURE(kExternalClearKeyForTesting,
// Specifies the path to the MediaFoundation Clear Key CDM for testing.
const base::FeatureParam kMediaFoundationClearKeyCdmPathForTesting{
&kExternalClearKeyForTesting, "media_foundation_cdm_path", ""};
+
+// Enables the use of a faulty GPU for MediaFoundation. This is used for testing
+// purposes only.
+BASE_FEATURE(kEnableFaultyGPUForMediaFoundation,
+ "EnableFaultyGPUForMediaFoundation",
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_WIN)
// Enables the On-Device Web Speech feature on supported devices.
@@ -963,11 +983,7 @@ BASE_FEATURE(kLiveCaptionUseWaitK,
// Live Caption can be used in multiple languages, as opposed to just English.
BASE_FEATURE(kLiveCaptionMultiLanguage,
"LiveCaptionMultiLanguage",
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
base::FEATURE_ENABLED_BY_DEFAULT
-#else
- base::FEATURE_DISABLED_BY_DEFAULT
-#endif
);
// Enable experimental Live Caption languages.
@@ -993,11 +1009,7 @@ BASE_FEATURE(kLiveCaptionWebAudio,
// Live Translate translates captions generated by Live Caption.
BASE_FEATURE(kLiveTranslate,
"LiveTranslate",
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
base::FEATURE_ENABLED_BY_DEFAULT
-#else
- base::FEATURE_DISABLED_BY_DEFAULT
-#endif
);
// Prevents UrlProvisionFetcher from making a provisioning request. If
@@ -1112,6 +1124,17 @@ BASE_FEATURE(kAVDColorSpaceChanges,
"AVDColorSpaceChanges",
base::FEATURE_ENABLED_BY_DEFAULT);
+// Whether FFmpeg supports decoding H.264 video in software. Has no effect if
+// BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) is false.
+BASE_FEATURE(kBuiltInH264Decoder,
+ "BuiltInH264Decoder",
+#if BUILDFLAG(IS_ANDROID) || !BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
+ base::FEATURE_DISABLED_BY_DEFAULT
+#else
+ base::FEATURE_ENABLED_BY_DEFAULT
+#endif
+);
+
#if BUILDFLAG(IS_ANDROID)
// Should we allow video playback to use an overlay if it's not needed for
// security? Normally, we'd always want to allow this, except as part of the
@@ -1120,10 +1143,10 @@ BASE_FEATURE(kAllowNonSecureOverlays,
"AllowNonSecureOverlays",
base::FEATURE_ENABLED_BY_DEFAULT);
-// Enables support for playback of encrypted AV1 content.
-BASE_FEATURE(kEnableEncryptedAV1,
- "EnableEncryptedAV1",
- base::FEATURE_ENABLED_BY_DEFAULT);
+// Enables block model (LinearBlock) on supported devices.
+BASE_FEATURE(kMediaCodecBlockModel,
+ "MediaCodecBlockModel",
+ base::FEATURE_DISABLED_BY_DEFAULT);
// Allow FrameInfoHelper to guess coded size information for MediaCodec frames.
BASE_FEATURE(kMediaCodecCodedSizeGuessing,
@@ -1164,11 +1187,6 @@ BASE_FEATURE(kMediaDrmGetStatusForPolicy,
"MediaDrmGetStatusForPolicy",
base::FEATURE_ENABLED_BY_DEFAULT);
-// Enables CanPlayType() (and other queries) for HLS MIME types. Note that
-// disabling this also causes navigation to .m3u8 files to trigger downloading
-// instead of playback.
-BASE_FEATURE(kCanPlayHls, "CanPlayHls", base::FEATURE_ENABLED_BY_DEFAULT);
-
// Enables the use of MediaPlayerRenderer for HLS playback. When disabled,
// HLS manifests will fail to load (triggering source fallback or load error).
BASE_FEATURE(kHlsPlayer, "HlsPlayer", base::FEATURE_ENABLED_BY_DEFAULT);
@@ -1200,6 +1218,13 @@ BASE_FEATURE(kAllowMediaCodecSoftwareDecoder,
"AllowMediaCodecSoftwareDecoder",
base::FEATURE_DISABLED_BY_DEFAULT);
+// This feature allows for some MediaDrm functions to be executed in a separate
+// process so that crashes do not bring down the browser. Flag is available so
+// that it can be disabled for WebView as separate processes are not allowed.
+BASE_FEATURE(kAllowMediaCodecCallsInSeparateProcess,
+ "AllowMediaCodecCallsInSeparateProcess",
+ base::FEATURE_ENABLED_BY_DEFAULT);
+
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(ENABLE_HLS_DEMUXER)
@@ -1233,17 +1258,6 @@ BASE_FEATURE(kChromeOSHWVBREncoding,
#endif
);
-#if !BUILDFLAG(USE_VAAPI)
-// Enable the hardware-accelerated direct video decoder instead of the one
-// needing the VdaVideoDecoder adapter. This flag is used mainly as a
-// chrome:flag for developers debugging issues as well as to be able to
-// experiment with direct VideoDecoder path on Linux Desktop.
-// TODO(b/159825227): remove when the direct video decoder is fully launched.
-BASE_FEATURE(kUseChromeOSDirectVideoDecoder,
- "UseChromeOSDirectVideoDecoder",
- base::FEATURE_ENABLED_BY_DEFAULT);
-#endif // !BUILDFLAG(USE_VAAPI)
-
// Limit the number of concurrent hardware decoder instances on ChromeOS.
BASE_FEATURE(kLimitConcurrentDecoderInstances,
"LimitConcurrentDecoderInstances",
@@ -1296,21 +1310,13 @@ BASE_FEATURE(kEnableArmHwdrm10bitOverlays,
#if BUILDFLAG(USE_CHROMEOS_PROTECTED_MEDIA)
// Enable use of HW based L1 Widevine DRM via the cdm-oemcrypto daemon on
// ChromeOS. This flag is temporary while we finish development.
-// Expiry: M128
+// Expiry: M133
+// TODO(b/364969273): Remove this flag later.
BASE_FEATURE(kEnableArmHwdrm,
"EnableArmHwdrm",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ base::FEATURE_ENABLED_BY_DEFAULT);
#endif // BUILDFLAG(USE_CHROMEOS_PROTECTED_MEDIA)
#endif // defined(ARCH_CPU_ARM_FAMILY)
-#if BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI)
-// ChromeOS has one of two VideoDecoder implementations active based on
-// SoC/board specific configurations that are sent via command line flags. This
-// switch allows using the non default implementation for testing.
-// TODO(b/159825227): remove when the "old" video decoder is fully launched.
-BASE_FEATURE(kUseAlternateVideoDecoderImplementation,
- "UseAlternateVideoDecoderImplementation",
- base::FEATURE_DISABLED_BY_DEFAULT);
-#endif // BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(USE_VAAPI)
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
#if BUILDFLAG(IS_WIN)
@@ -1414,7 +1420,12 @@ const base::FeatureParam kBatchReadCount{&kMediaFoundationBatchRead,
// ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION is disabled.
BASE_FEATURE(kPlatformEncryptedDolbyVision,
"PlatformEncryptedDolbyVision",
+#if BUILDFLAG(IS_WIN)
+ base::FEATURE_ENABLED_BY_DEFAULT
+#else
base::FEATURE_ENABLED_BY_DEFAULT);
+#endif
+);
// When ENABLE_PLATFORM_ENCRYPTED_DOLBY_VISION is enabled at build time and
// `kPlatformEncryptedDolbyVision` is enabled at run time, encrypted Dolby
@@ -1723,6 +1734,13 @@ BASE_FEATURE(kCastStreamingMacHardwareH264,
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
+#if BUILDFLAG(IS_WIN)
+// Controls whether hardware H264 is default enabled on Windows.
+BASE_FEATURE(kCastStreamingWinHardwareH264,
+ "CastStreamingWinHardwareH264",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+#endif
+
#if BUILDFLAG(IS_FUCHSIA)
// Enables use of Fuchsia's Mediacodec service for encoding.
BASE_FEATURE(kFuchsiaMediacodecVideoEncoder,
@@ -1734,11 +1752,7 @@ BASE_FEATURE(kFuchsiaMediacodecVideoEncoder,
// smaller than maximum supported decodes as advertiszed by decoder.
BASE_FEATURE(kVideoDecodeBatching,
"VideoDecodeBatching",
-#if BUILDFLAG(IS_CHROMEOS)
- base::FEATURE_ENABLED_BY_DEFAULT
-#else
base::FEATURE_DISABLED_BY_DEFAULT
-#endif
);
// Safety switch to allow us to revert to the previous behavior of using the
@@ -1864,10 +1878,6 @@ bool IsVideoCaptureAcceleratedJpegDecodingEnabled() {
#endif
}
-bool IsWritePixelsYUVEnabled() {
- return base::FeatureList::IsEnabled(kUseWritePixelsYUV);
-}
-
#if BUILDFLAG(IS_WIN)
bool IsMediaFoundationD3D11VideoCaptureEnabled() {
return base::FeatureList::IsEnabled(kMediaFoundationD3D11VideoCapture);
diff --git a/src/media/ffmpeg/ffmpeg_common.cc b/src/media/ffmpeg/ffmpeg_common.cc
index b0d6abd1..22119846 100644
--- a/src/media/ffmpeg/ffmpeg_common.cc
+++ b/src/media/ffmpeg/ffmpeg_common.cc
@@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifdef UNSAFE_BUFFERS_BUILD
+// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
+#pragma allow_unsafe_buffers
+#endif
+
#include "media/ffmpeg/ffmpeg_common.h"
#include "base/hash/sha1.h"
diff --git a/src/media/filters/ffmpeg_glue.cc b/src/media/filters/ffmpeg_glue.cc
index f8f8d01e..0295daef 100644
--- a/src/media/filters/ffmpeg_glue.cc
+++ b/src/media/filters/ffmpeg_glue.cc
@@ -12,10 +12,20 @@
#include "base/types/cxx23_to_underlying.h"
#include "media/base/container_names.h"
#include "media/base/media_switches.h"
+#include "media/base/supported_types.h"
#include "media/ffmpeg/ffmpeg_common.h"
namespace media {
+// Kill switches in case things explode. Remove after M132.
+// TODO(crbug.com/355485812): Re-enable this flag.
+BASE_FEATURE(kAllowOnlyAudioCodecsDuringDemuxing,
+ "AllowOnlyAudioCodecsDuringDemuxing",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+BASE_FEATURE(kForbidH264ParsingDuringDemuxing,
+ "ForbidH264ParsingDuringDemuxing",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
// Internal buffer size used by AVIO for reading.
// TODO(dalecurtis): Experiment with this buffer size and measure impact on
// performance. Currently we want to use 32kb to preserve existing behavior
@@ -108,6 +118,12 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
// Enable fast, but inaccurate seeks for MP3.
format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
+ // We don't allow H.264 parsing during demuxing since we have our own parser
+ // and the ffmpeg one increases memory usage unnecessarily.
+ if (base::FeatureList::IsEnabled(kForbidH264ParsingDuringDemuxing)) {
+ format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
+ }
+
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
// instances were real failures. Solves bugs like http://crbug.com/710791.
format_context_->error_recognition |= AV_EF_EXPLODE;
@@ -122,6 +138,13 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
// deprecations and when an external ffmpeg is used this adds extra
// security.
static const base::NoDestructor kCombinedCodecList([]() {
+ if (base::FeatureList::IsEnabled(kAllowOnlyAudioCodecsDuringDemuxing)) {
+ // We also don't allow ffmpeg to use any video decoders during demuxing
+ // since it's unnecessary for the codecs we use and just increases
+ // memory usage.
+ return std::string(GetAllowedAudioDecoders());
+ }
+
return base::JoinString(
{GetAllowedAudioDecoders(), GetAllowedVideoDecoders()}, ",");
}());
@@ -151,22 +174,15 @@ const char* FFmpegGlue::GetAllowedAudioDecoders() {
// static
const char* FFmpegGlue::GetAllowedVideoDecoders() {
- static const base::NoDestructor kAllowedVideoCodecs([]() {
// This should match the configured lists in //third_party/ffmpeg.
-#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
- std::vector allowed_decoders;
-#if BUILDFLAG(USE_PROPRIETARY_CODECS)
- allowed_decoders.push_back("h264");
+#if BUILDFLAG(USE_PROPRIETARY_CODECS) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
#if BUILDFLAG(ENABLE_PLATFORM_HEVC)
- allowed_decoders.push_back("hevc");
-#endif // BUILDFLAG(ENABLE_PLATFORM_HEVC)
-#endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
- return base::JoinString(allowed_decoders, ",");
+ return IsBuiltInVideoCodec(VideoCodec::kH264) ? "h264,hevc" : "";
#else
- return std::string();
-#endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
- }());
- return kAllowedVideoCodecs->c_str();
+ return IsBuiltInVideoCodec(VideoCodec::kH264) ? "h264" : "";
+#else
+ return "";
+#endif
}
bool FFmpegGlue::OpenContext(bool is_local_file) {
diff --git a/src/media/filters/ffmpeg_video_decoder.cc b/src/media/filters/ffmpeg_video_decoder.cc
index 6364f782..8c8cd1f6 100644
--- a/src/media/filters/ffmpeg_video_decoder.cc
+++ b/src/media/filters/ffmpeg_video_decoder.cc
@@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifdef UNSAFE_BUFFERS_BUILD
+// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
+#pragma allow_unsafe_buffers
+#endif
+
#include "media/filters/ffmpeg_video_decoder.h"
#include
@@ -21,6 +26,7 @@
#include "media/base/limits.h"
#include "media/base/media_log.h"
#include "media/base/media_switches.h"
+#include "media/base/supported_types.h"
#include "media/base/timestamp_constants.h"
#include "media/base/video_aspect_ratio.h"
#include "media/base/video_frame.h"
@@ -120,7 +126,8 @@ static void ReleaseVideoBufferImpl(void* opaque, uint8_t* data) {
// static
bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
- return avcodec_find_decoder(VideoCodecToCodecID(codec)) != nullptr;
+ // We only build support for H.264 and HEVC.
+ return codec == VideoCodec::kH264 && IsBuiltInVideoCodec(codec);
}
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
diff --git a/src/net/base/load_flags_list.h b/src/net/base/load_flags_list.h
index 958f3b56..e78786d0 100644
--- a/src/net/base/load_flags_list.h
+++ b/src/net/base/load_flags_list.h
@@ -95,15 +95,15 @@ LOAD_FLAG(SUPPORT_ASYNC_REVALIDATION, 1 << 14)
// Indicates that a prefetch request's cached response should be restricted in
// in terms of reuse. The cached response can only be reused by requests with
-// the LOAD_CAN_USE_RESTRICTED_PREFETCH load flag.
-LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15)
+// the LOAD_CAN_USE_RESTRICTED_PREFETCH_FOR_MAIN_FRAME load flag.
+LOAD_FLAG(RESTRICTED_PREFETCH_FOR_MAIN_FRAME, 1 << 15)
// This flag must be set on requests that are allowed to reuse cache entries
-// that are marked as RESTRICTED_PREFETCH. Requests without this flag cannot
-// reuse restricted prefetch responses in the cache. Restricted response reuse
-// is considered privileged, and therefore this flag must only be set from a
-// trusted process.
-LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 16)
+// that are marked as RESTRICTED_PREFETCH_FOR_MAIN_FRAME. Requests without this
+// flag cannot reuse restricted prefetch responses in the cache. Restricted
+// response reuse is considered privileged, and therefore this flag must only be
+// set from a trusted process.
+LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH_FOR_MAIN_FRAME, 1 << 16)
// Indicates that this load can use a shared dictionary.
LOAD_FLAG(CAN_USE_SHARED_DICTIONARY, 1 << 17)
diff --git a/src/net/dns/dns_client.cc b/src/net/dns/dns_client.cc
index fb719114..d38d5952 100644
--- a/src/net/dns/dns_client.cc
+++ b/src/net/dns/dns_client.cc
@@ -88,7 +88,8 @@ void UpdateConfigForDohUpgrade(DnsConfig* config) {
}
class DnsClientImpl : public DnsClient {
- const bool disable_thorium_dns_config = base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-dns-config");
+ const bool disable_thorium_dns_config =
+ base::CommandLine::ForCurrentProcess()->HasSwitch("disable-thorium-dns-config");
public:
DnsClientImpl(NetLog* net_log, const RandIntCallback& rand_int_callback)
: net_log_(net_log), rand_int_callback_(rand_int_callback) {}
@@ -251,14 +252,12 @@ class DnsClientImpl : public DnsClient {
private:
std::optional BuildEffectiveConfig() const {
DnsConfig config;
- // in Bromite it is sufficient to have secure DoH enabled to give the overrides priority
+ // In Thorium it is sufficient to have secure DoH enabled to give the overrides priority
if (config_overrides_.dns_over_https_config && config_overrides_.secure_dns_mode && !disable_thorium_dns_config) {
config = config_overrides_.ApplyOverrides(DnsConfig());
- } else if (disable_thorium_dns_config && config_overrides_.OverridesEverything()) {
- config = config_overrides_.ApplyOverrides(DnsConfig());
} else {
if (!system_config_) {
- LOG(WARNING) << "BuildEffectiveConfig(): System configuration not set: No system_config_ ";
+ LOG(WARNING) << "dns_client.cc->BuildEffectiveConfig(): System configuration not set: No system_config_ ";
return std::nullopt;
}
@@ -276,7 +275,7 @@ class DnsClientImpl : public DnsClient {
config.nameservers.clear();
if (!config.IsValid()) {
- LOG(WARNING) << "BuildEffectiveConfig(): invalid configuration";
+ LOG(WARNING) << "dns_client.cc->BuildEffectiveConfig(): Invalid configuration";
return std::nullopt;
}
diff --git a/src/net/dns/dns_transaction.cc b/src/net/dns/dns_transaction.cc
index e557acca..78b01fd5 100644
--- a/src/net/dns/dns_transaction.cc
+++ b/src/net/dns/dns_transaction.cc
@@ -472,7 +472,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
request_->SetIdempotency(IDEMPOTENT);
std::unique_ptr reader =
std::make_unique(
- query_->io_buffer()->data(), query_->io_buffer()->size());
+ query_->io_buffer()->span());
request_->set_upload(
ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
extra_request_headers.SetHeader(HttpRequestHeaders::kContentType,
@@ -813,8 +813,7 @@ class DnsTCPAttempt : public DnsAttempt {
uint16_t query_size = static_cast(query_->io_buffer()->size());
if (static_cast(query_size) != query_->io_buffer()->size())
return ERR_FAILED;
- base::as_writable_bytes(length_buffer_->span())
- .copy_from(base::U16ToBigEndian(query_size));
+ length_buffer_->span().copy_from(base::U16ToBigEndian(query_size));
buffer_ = base::MakeRefCounted(length_buffer_,
length_buffer_->size());
next_state_ = STATE_SEND_LENGTH;
@@ -879,8 +878,8 @@ class DnsTCPAttempt : public DnsAttempt {
return OK;
}
- response_length_ = base::U16FromBigEndian(
- base::as_bytes(length_buffer_->span().first<2u>()));
+ response_length_ =
+ base::U16FromBigEndian(length_buffer_->span().first<2u>());
// Check if advertised response is too short. (Optimization only.)
if (response_length_ < query_->io_buffer()->size())
return ERR_DNS_MALFORMED_RESPONSE;
diff --git a/src/net/url_request/url_request_http_job.cc b/src/net/url_request/url_request_http_job.cc
index fc4a63cc..194c2064 100644
--- a/src/net/url_request/url_request_http_job.cc
+++ b/src/net/url_request/url_request_http_job.cc
@@ -111,6 +111,7 @@
#if BUILDFLAG(ENABLE_DEVICE_BOUND_SESSIONS)
#include "net/device_bound_sessions/registration_fetcher_param.h"
+#include "net/device_bound_sessions/session_challenge_param.h"
#include "net/device_bound_sessions/session_service.h"
#endif // BUILDFLAG(ENABLE_DEVICE_BOUND_SESSIONS)
@@ -306,7 +307,7 @@ HttpRequestSSLUpgradeDecision GetMetricForSSLUpgradeDecision(
return is_secure ? HttpRequestSSLUpgradeDecision::kSSLDynamicUpgrade
: HttpRequestSSLUpgradeDecision::kInsecureDynamicUpgrade;
}
- NOTREACHED_NORETURN();
+ NOTREACHED();
}
void RecordSTSHistograms(net::SSLUpgradeDecision upgrade_decision,
@@ -445,6 +446,9 @@ void URLRequestHttpJob::Start() {
request_info_.is_subframe_document_resource =
request_->isolation_info().request_type() ==
net::IsolationInfo::RequestType::kSubFrame;
+ request_info_.is_main_frame_navigation =
+ request_->isolation_info().IsMainFrameRequest();
+ request_info_.initiator = request_->initiator();
request_info_.load_flags = request_->load_flags();
request_info_.priority_incremental = request_->priority_incremental();
request_info_.secure_dns_policy = request_->secure_dns_policy();
@@ -496,7 +500,9 @@ bool ShouldBlockAllCookies(PrivacyMode privacy_mode) {
} // namespace
void URLRequestHttpJob::MaybeSetSecFetchStorageAccessHeader() {
- if (!base::FeatureList::IsEnabled(features::kStorageAccessHeaders)) {
+ if (!request_->network_delegate()->IsStorageAccessHeaderEnabled(
+ base::OptionalToPtr(request_->isolation_info().top_frame_origin()),
+ request_->url())) {
return;
}
// Avoid attaching the header in cases where the Cookie header is not included
@@ -1044,10 +1050,7 @@ void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int result) {
clear_site_data_prevents_cookies_from_being_stored = true;
}
- base::Time response_date;
- std::optional server_time = std::nullopt;
- if (GetResponseHeaders()->GetDateValue(&response_date))
- server_time = std::make_optional(response_date);
+ std::optional server_time = GetResponseHeaders()->GetDateValue();
bool force_ignore_site_for_cookies =
request_->force_ignore_site_for_cookies();
@@ -1167,14 +1170,26 @@ void URLRequestHttpJob::OnSetCookieResult(const CookieOptions& options,
#if BUILDFLAG(ENABLE_DEVICE_BOUND_SESSIONS)
void URLRequestHttpJob::ProcessDeviceBoundSessionsHeader() {
+ device_bound_sessions::SessionService* service =
+ request_->context()->device_bound_session_service();
+ if (!service) {
+ return;
+ }
+
+ const auto& request_url = request_->url();
+ auto* headers = GetResponseHeaders();
std::vector params =
device_bound_sessions::RegistrationFetcherParam::CreateIfValid(
- request_->url(), GetResponseHeaders());
- if (auto* service = request_->context()->device_bound_session_service()) {
- for (auto& param : params) {
- service->RegisterBoundSession(std::move(param),
- request_->isolation_info());
- }
+ request_url, headers);
+ for (auto& param : params) {
+ service->RegisterBoundSession(std::move(param), request_->isolation_info());
+ }
+
+ std::vector challenge_params =
+ device_bound_sessions::SessionChallengeParam::CreateIfValid(request_url,
+ headers);
+ for (auto& param : challenge_params) {
+ service->SetChallengeForBoundSession(request_url, std::move(param));
}
}
#endif // BUILDFLAG(ENABLE_DEVICE_BOUND_SESSIONS)
@@ -1585,7 +1600,9 @@ bool URLRequestHttpJob::NeedsAuth() {
}
bool URLRequestHttpJob::NeedsRetryWithStorageAccess() {
- if (!base::FeatureList::IsEnabled(features::kStorageAccessHeaders)) {
+ if (!request_->network_delegate()->IsStorageAccessHeaderEnabled(
+ base::OptionalToPtr(request_->isolation_info().top_frame_origin()),
+ request_->url())) {
return false;
}
if (!ShouldAddCookieHeader() ||
@@ -1601,7 +1618,11 @@ bool URLRequestHttpJob::NeedsRetryWithStorageAccess() {
}
HttpResponseHeaders* headers = request_->response_headers();
- return headers && headers->HasStorageAccessRetryHeader();
+ // We use the Origin header's value directly, rather than
+ // `request_.initiator()`, because the header may be "null" in some cases.
+ return headers && headers->HasStorageAccessRetryHeader(base::OptionalToPtr(
+ request_info_.extra_headers.GetHeader(
+ HttpRequestHeaders::kOrigin)));
}
void URLRequestHttpJob::SetSharedDictionaryGetter(
diff --git a/src/ui/base/x/x11_util.cc b/src/ui/base/x/x11_util.cc
index b7b3edc6..958b4b78 100644
--- a/src/ui/base/x/x11_util.cc
+++ b/src/ui/base/x/x11_util.cc
@@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#ifdef UNSAFE_BUFFERS_BUILD
+// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
+#pragma allow_unsafe_buffers
+#endif
+
// This file defines utility functions for X11 (Linux only). This code has been
// ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
// remains woefully incomplete.
@@ -18,6 +23,7 @@
#include "base/command_line.h"
#include "base/containers/contains.h"
+#include "base/containers/span.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
@@ -133,7 +139,7 @@ void DrawPixmap(x11::Connection* connection,
for (int row = 0; row < height; row += rows_per_request) {
size_t n_rows = std::min(rows_per_request, height - row);
auto data = base::MakeRefCounted(
- vec.data() + row * row_bytes, n_rows * row_bytes);
+ base::span(vec).subspan(row * row_bytes, n_rows * row_bytes));
connection->PutImage({
.format = x11::ImageFormat::ZPixmap,
.drawable = drawable,
@@ -365,14 +371,9 @@ bool GetCustomFramePrefDefault() {
return false;
}
- ui::WindowManagerName wm = GuessWindowManager();
// Never default to using the custom title bar, unless the windows manager is a tiling WM.
// Thorium should integrate, not be a special little snowflake.
- if (IsWmTiling(wm)) {
- return true;
- } else {
- return false;
- }
+ return false;
}
bool IsWmTiling(WindowManagerName window_manager) {
@@ -548,8 +549,7 @@ UMALinuxWindowManager GetWindowManagerUMA() {
case WM_XMONAD:
return UMALinuxWindowManager::kXmonad;
}
- NOTREACHED_IN_MIGRATION();
- return UMALinuxWindowManager::kOther;
+ NOTREACHED();
}
bool IsX11WindowFullScreen(x11::Window window) {
diff --git a/src/ui/webui/resources/cr_components/searchbox/icons/bookmark_cr23.svg b/src/ui/webui/resources/cr_components/searchbox/icons/bookmark_cr23.svg
new file mode 100644
index 00000000..7c4b7baa
--- /dev/null
+++ b/src/ui/webui/resources/cr_components/searchbox/icons/bookmark_cr23.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/ui/webui/resources/cr_components/searchbox/icons/extension_app.svg b/src/ui/webui/resources/cr_components/searchbox/icons/extension_app.svg
new file mode 100644
index 00000000..1a52035d
--- /dev/null
+++ b/src/ui/webui/resources/cr_components/searchbox/icons/extension_app.svg
@@ -0,0 +1 @@
+
diff --git a/src/ui/webui/resources/cr_components/searchbox/icons/star_active.svg b/src/ui/webui/resources/cr_components/searchbox/icons/star_active.svg
new file mode 100644
index 00000000..f01a4717
--- /dev/null
+++ b/src/ui/webui/resources/cr_components/searchbox/icons/star_active.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/ui/webui/resources/images/extension.svg b/src/ui/webui/resources/images/extension.svg
index 0b17b55c..1ff80eb4 100644
--- a/src/ui/webui/resources/images/extension.svg
+++ b/src/ui/webui/resources/images/extension.svg
@@ -1 +1 @@
-
+
diff --git a/src/ui/webui/resources/images/icon_extensions.svg b/src/ui/webui/resources/images/icon_extensions.svg
index febd5808..aa87165d 100644
--- a/src/ui/webui/resources/images/icon_extensions.svg
+++ b/src/ui/webui/resources/images/icon_extensions.svg
@@ -1 +1 @@
-
+