Compare commits

...

21 Commits

Author SHA1 Message Date
Marshall Greenblatt
65b79a64a3 Update to Chromium version 107.0.5304.122 2022-11-29 20:13:46 +00:00
Marshall Greenblatt
26c0b5e462 linux: Set use_allocator=none by default (see issue #3095) 2022-11-16 13:49:41 -05:00
Marshall Greenblatt
d2cd90f03a tests: Fix CorsTest.Iframe failures (see issue #3348)
Run test initialization after the server has started.
2022-11-16 13:49:19 -05:00
Marshall Greenblatt
1f0a21a25e win: Fix 1px gap with maximized frameless windows on Win11 (fixes issue #3414) 2022-11-09 13:13:42 -05:00
Marshall Greenblatt
0a489c6ada Update to Chromium version 107.0.5304.110 2022-11-09 16:21:34 +00:00
Marshall Greenblatt
59a795cb74 chrome: Fix crash in BrowserView::GetDownloadBubbleUIController (fixes issue #3416) 2022-11-08 20:14:36 -05:00
Rye Mutt
8a0d72d88e win: tools: Add VS2022 to msvs_env.bat 2022-11-08 17:24:53 -05:00
Marshall Greenblatt
58ed78eea5 Update to Chromium version 107.0.5304.88 2022-11-07 20:06:59 +00:00
Marshall Greenblatt
eb36a79857 Update to Chromium version 107.0.5304.68 2022-10-26 16:32:01 +00:00
Marshall Greenblatt
8beb523991 Update to Chromium version 107.0.5304.62 2022-10-21 15:26:41 +00:00
Marshall Greenblatt
632c702272 alloy: Fix renderer crashes related to BadgeService (fixes issue #3005) 2022-10-20 13:00:53 -04:00
Marshall Greenblatt
792694178c Update to Chromium version 107.0.5304.36 2022-10-18 17:12:46 -04:00
npavlov
0bd2c19a20 Add screen pixel to screen DIP conversion methods.
On Windows these new CefDisplay methods convert between screen pixel coordinates
and screen DIP coordinates. On macOS and Linux these methods just return a copy
of the input coordinates.
2022-10-14 12:39:13 -04:00
Marshall Greenblatt
b095af7f07 Add support for PGO builds (fixes issue #2956)
This configuration applies to Official Release builds only.

Chromium currently provides PGO profiles for Windows x86/x64, MacOS x64/ARM64
and Linux x64. Official builds for these platforms must run automate-git.py with
the `--with-pgo-profiles` command-line flag. Official builds for other platforms
must disable PGO builds by adding `chrome_pgo_phase=0` to GN_DEFINES.
2022-10-11 12:23:33 -04:00
Marshall Greenblatt
f717ff1365 Don't include ceftests/resources in minimal distrib (fixes issue #3408) 2022-10-10 14:08:50 -04:00
Marshall Greenblatt
e2ebe99118 Update to Chromium version 107.0.5304.29 2022-10-07 14:27:57 +00:00
Marshall Greenblatt
92f0b8a971 widevine: Support CDM host verification and storage ID (fixes issue #3404)
This functionality will be enabled if .sig files exist in the required
locations. See the issue for details.
2022-10-05 11:39:36 -04:00
Marshall Greenblatt
9e207ab857 Support GN configuration of enable_rlz (see issue #3404) 2022-10-05 11:38:53 -04:00
Marshall Greenblatt
e92a530af3 Linux: Remove the fatal_linker_warnings=false default GN arg
This value is no longer required with Ubuntu 16+ host systems.
2022-09-30 14:12:25 -04:00
Marshall Greenblatt
183bef031b alloy: Fix crash after file dialog selection (fixes issue #3401) 2022-09-30 14:11:45 -04:00
Marshall Greenblatt
318ab1716e Update to Chromium version 107.0.5304.18 2022-09-29 15:08:18 -04:00
42 changed files with 608 additions and 129 deletions

View File

@@ -106,6 +106,7 @@ import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//rlz/buildflags/buildflags.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
@@ -257,6 +258,14 @@ assert(enable_print_preview)
# Enable support for Widevine CDM.
assert(enable_widevine)
if (is_mac || is_win) {
# Enable Widevine CDM host verification and storage ID.
assert(enable_cdm_host_verification)
assert(enable_cdm_storage_id)
assert(alternate_cdm_storage_id_key != "")
assert(enable_rlz)
}
# Enable Views UI framework.
assert(toolkit_views)
@@ -1165,6 +1174,13 @@ source_set("libcef_static") {
"//ui/wm/public",
]
}
if (enable_cdm_host_verification) {
sources += [
"libcef/common/cdm_host_file_path.cc",
"libcef/common/cdm_host_file_path.h",
]
}
}

View File

@@ -7,5 +7,6 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/107.0.5304.0'
'chromium_checkout': 'refs/tags/107.0.5304.122',
'depot_tools_checkout': 'e3ed6a8e01'
}

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=3ff71283b14972df89a3c4c7c698faf887cef6d0$
// $hash=6eed21d200bad5e898dfbe2701ad327cc1e4cc5c$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_
@@ -140,6 +140,20 @@ CEF_EXPORT size_t cef_display_get_count(void);
CEF_EXPORT void cef_display_get_alls(size_t* displaysCount,
cef_display_t** displays);
///
/// Convert |point| from DIP screen coordinates to pixel screen coordinates.
/// This function is only used on Windows.
///
CEF_EXPORT cef_point_t
cef_display_convert_screen_point_to_pixels(const cef_point_t* point);
///
/// Convert |point| from pixel screen coordinates to DIP screen coordinates.
/// This function is only used on Windows.
///
CEF_EXPORT cef_point_t
cef_display_convert_screen_point_from_pixels(const cef_point_t* point);
#ifdef __cplusplus
}
#endif

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "44197292401010f8fce5b053733edd8642d01095"
#define CEF_API_HASH_UNIVERSAL "a63640eaa583092b069ec9895526b3e9e4932f6a"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "95bf7fa1356070be95b7a6fee958355c6619fb63"
#define CEF_API_HASH_PLATFORM "510cec552fbcfb4b7d47853ddfccd91f1e4f4c7b"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "8ec5426d7aa0418fca147380e97623a49cd8eaf4"
#define CEF_API_HASH_PLATFORM "ad36f5b62d9c4c2100859abb6b5b9fcedf8934ef"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "b2cbc2e6a3048d2415566d35ba434967fd796491"
#define CEF_API_HASH_PLATFORM "d9657b0023ae05b5b92787b5e7da70893caf15af"
#endif
#ifdef __cplusplus

View File

@@ -91,6 +91,20 @@ class CefDisplay : public CefBaseRefCounted {
/*--cef(count_func=displays:GetDisplayCount)--*/
static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays);
///
/// Convert |point| from DIP screen coordinates to pixel screen coordinates.
/// This method is only used on Windows.
///
/*--cef()--*/
static CefPoint ConvertScreenPointToPixels(const CefPoint& point);
///
/// Convert |point| from pixel screen coordinates to DIP screen coordinates.
/// This method is only used on Windows.
///
/*--cef()--*/
static CefPoint ConvertScreenPointFromPixels(const CefPoint& point);
///
/// Returns the unique identifier for this Display.
///

View File

@@ -140,6 +140,7 @@
#include "storage/browser/quota/quota_settings.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
#include "third_party/blink/public/mojom/badging/badging.mojom.h"
#include "third_party/blink/public/mojom/prerender/prerender.mojom.h"
#include "third_party/blink/public/web/web_window_features.h"
#include "ui/base/l10n/l10n_util.h"
@@ -377,6 +378,14 @@ void BindPluginInfoHost(
std::move(receiver));
}
void BindBadgeService(
content::RenderFrameHost* frame_host,
mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {}
void BindBadgeServiceForServiceWorker(
const content::ServiceWorkerVersionBaseInfo& info,
mojo::PendingReceiver<blink::mojom::BadgeService> receiver) {}
void BindMediaFoundationRendererNotifierHandler(
content::RenderFrameHost* frame_host,
mojo::PendingReceiver<media::mojom::MediaFoundationRendererNotifier>
@@ -1331,6 +1340,7 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
CefBrowserFrame::RegisterBrowserInterfaceBindersForFrame(render_frame_host,
map);
map->Add<blink::mojom::BadgeService>(base::BindRepeating(&BindBadgeService));
map->Add<media::mojom::MediaFoundationRendererNotifier>(
base::BindRepeating(&BindMediaFoundationRendererNotifierHandler));
map->Add<network_hints::mojom::NetworkHintsHandler>(
@@ -1360,6 +1370,14 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
extension);
}
void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
content::BrowserContext* browser_context,
mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>*
map) {
map->Add<blink::mojom::BadgeService>(
base::BindRepeating(&BindBadgeServiceForServiceWorker));
}
base::FilePath
AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() {
return GetRootCachePath();

View File

@@ -229,6 +229,10 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
void RegisterBrowserInterfaceBindersForFrame(
content::RenderFrameHost* render_frame_host,
mojo::BinderMapWithContext<content::RenderFrameHost*>* map) override;
void RegisterBrowserInterfaceBindersForServiceWorker(
content::BrowserContext* browser_context,
mojo::BinderMapWithContext<const content::ServiceWorkerVersionBaseInfo&>*
map) override;
base::FilePath GetSandboxedStorageServiceDataDirectory() override;
std::string GetProduct() override;
std::string GetChromeProduct() override;

View File

@@ -75,7 +75,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase {
host_resolver_->ResolveHost(
network::mojom::HostResolverHost::NewHostPortPair(
net::HostPortPair::FromURL(GURL(origin.ToString()))),
net::NetworkIsolationKey::CreateTransient(), nullptr,
net::NetworkAnonymizationKey::CreateTransient(), nullptr,
receiver_.BindNewPipeAndPassRemote());
}

View File

@@ -51,6 +51,30 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
displays.push_back(new CefDisplayImpl(vec[i]));
}
// static
CefPoint CefDisplay::ConvertScreenPointToPixels(const CefPoint& point) {
CEF_REQUIRE_UIT_RETURN(CefPoint());
#if BUILDFLAG(IS_WIN)
const gfx::Point pix_point =
view_util::ConvertPointToPixels(gfx::Point(point.x, point.y));
return CefPoint(pix_point.x(), pix_point.y());
#else
return point;
#endif
}
// static
CefPoint CefDisplay::ConvertScreenPointFromPixels(const CefPoint& point) {
CEF_REQUIRE_UIT_RETURN(CefPoint());
#if BUILDFLAG(IS_WIN)
const gfx::Point dip_point =
view_util::ConvertPointFromPixels(gfx::Point(point.x, point.y));
return CefPoint(dip_point.x(), dip_point.y());
#else
return point;
#endif
}
CefDisplayImpl::CefDisplayImpl(const display::Display& display)
: display_(display) {
CEF_REQUIRE_UIT();

View File

@@ -227,6 +227,17 @@ void ConvertPointToPixels(gfx::Point* point, float device_scale_factor) {
gfx::ScalePoint(gfx::PointF(*point), device_scale_factor));
}
#if BUILDFLAG(IS_WIN)
gfx::Point ConvertPointFromPixels(const gfx::Point& point) {
return gfx::ToFlooredPoint(
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point)));
}
gfx::Point ConvertPointToPixels(const gfx::Point& point) {
return display::win::ScreenWin::DIPToScreenPoint(point);
}
#endif // BUILDFLAG(IS_WIN)
bool ConvertPointToScreen(views::View* view,
gfx::Point* point,
bool output_pixel_coords) {

View File

@@ -91,6 +91,14 @@ void ConvertPointFromPixels(gfx::Point* point, float device_scale_factor);
// using |device_scale_factor|.
void ConvertPointToPixels(gfx::Point* point, float device_scale_factor);
#if BUILDFLAG(IS_WIN)
// Convert |point| from pixel screen coordinates to DIP screen coordinates.
gfx::Point ConvertPointFromPixels(const gfx::Point& point);
// Convert |point| from DIP screen coordinates to pixel screen coordinates.
gfx::Point ConvertPointToPixels(const gfx::Point& point);
#endif // BUILDFLAG(IS_WIN)
// Convert |point| from |view| to screen coordinates. If |output_pixel_coords|
// is true then |point| will be output in pixel coordinates instead of density
// independent pixels (DIP). Returns false if |view| does not currently belong

View File

@@ -39,7 +39,7 @@
#include "ui/base/resource/resource_bundle.h"
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
#include "chrome/common/media/cdm_host_file_path.h"
#include "libcef/common/cdm_host_file_path.h"
#endif
namespace {
@@ -92,7 +92,7 @@ void AlloyContentClient::AddContentDecryptionModules(
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
if (cdm_host_file_paths)
AddCdmHostFilePaths(cdm_host_file_paths);
cef::AddCdmHostFilePaths(cdm_host_file_paths);
#endif
}

View File

@@ -0,0 +1,119 @@
// Copyright 2022 The Chromium Embedded Framework Authors. Portions Copyright
// 2017 The Chromium Authors. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "libcef/common/cdm_host_file_path.h"
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_version.h"
#if BUILDFLAG(IS_MAC)
#include "libcef/common/util_mac.h"
#endif
namespace cef {
namespace {
// TODO(xhwang): Move this to a common place if needed.
const base::FilePath::CharType kSignatureFileExtension[] =
FILE_PATH_LITERAL(".sig");
// Returns the signature file path given the |file_path|. This function should
// only be used when the signature file and the file are located in the same
// directory.
base::FilePath GetSigFilePath(const base::FilePath& file_path) {
return file_path.AddExtension(kSignatureFileExtension);
}
bool FileExists(const base::FilePath& path) {
return base::PathExists(path) && !base::DirectoryExists(path);
}
} // namespace
void AddCdmHostFilePaths(
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
DVLOG(1) << __func__;
DCHECK(cdm_host_file_paths);
DCHECK(cdm_host_file_paths->empty());
#if BUILDFLAG(IS_WIN)
// Find the full path to the current executable.
base::FilePath cef_exe;
CHECK(base::PathService::Get(base::FILE_EXE, &cef_exe));
const auto cef_exe_sig = GetSigFilePath(cef_exe);
DVLOG(2) << __func__ << ": exe_path=" << cef_exe.value()
<< ", signature_path=" << cef_exe_sig.value();
if (FileExists(cef_exe_sig)) {
cdm_host_file_paths->emplace_back(cef_exe, cef_exe_sig);
}
// Find the full path to the module. This may be the same as the executable if
// libcef is statically linked.
base::FilePath cef_module;
CHECK(base::PathService::Get(base::FILE_MODULE, &cef_module));
if (cef_module != cef_exe) {
const auto cef_module_sig = GetSigFilePath(cef_module);
DVLOG(2) << __func__ << ": module_path=" << cef_module.value()
<< ", signature_path=" << cef_module_sig.value();
if (FileExists(cef_module_sig)) {
cdm_host_file_paths->emplace_back(cef_module, cef_module_sig);
}
}
#elif BUILDFLAG(IS_MAC)
// Find the full path to the current executable.
base::FilePath cef_exe;
CHECK(base::PathService::Get(base::FILE_EXE, &cef_exe));
// Find the sig file for the executable in the main Resources directory. This
// directory may be empty if we're not bundled.
const auto main_resources_path = util_mac::GetMainResourcesDirectory();
if (!main_resources_path.empty()) {
const auto exe_name = cef_exe.BaseName();
const auto exe_sig_path =
GetSigFilePath(main_resources_path.Append(exe_name));
DVLOG(2) << __func__ << ": exe_path=" << cef_exe.value()
<< ", signature_path=" << exe_sig_path.value();
if (FileExists(exe_sig_path)) {
cdm_host_file_paths->emplace_back(cef_exe, exe_sig_path);
}
}
// Find the sig file for the framework in the framework Resources directory.
// This directory may be empty if we're not bundled.
const auto framework_resources_path =
util_mac::GetFrameworkResourcesDirectory();
if (!framework_resources_path.empty()) {
const auto framework_name = util_mac::GetFrameworkName();
const auto framework_path =
util_mac::GetFrameworkDirectory().Append(framework_name);
const auto framework_sig_path =
GetSigFilePath(framework_resources_path.Append(framework_name));
DVLOG(2) << __func__ << ": framework_path=" << framework_path.value()
<< ", signature_path=" << framework_sig_path.value();
if (FileExists(framework_sig_path)) {
cdm_host_file_paths->emplace_back(framework_path, framework_sig_path);
}
}
#endif // !BUILDFLAG(IS_MAC)
}
} // namespace cef

View File

@@ -0,0 +1,20 @@
// Copyright 2022 The Chromium Embedded Framework Authors. Portions Copyright
// 2017 The Chromium Authors. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef CEF_LIBCEF_COMMON_CDM_HOST_FILE_PATH_H_
#define CEF_LIBCEF_COMMON_CDM_HOST_FILE_PATH_H_
#include <vector>
#include "media/cdm/cdm_host_file.h"
namespace cef {
// Gets a list of CDM host file paths and put them in |cdm_host_file_paths|.
void AddCdmHostFilePaths(
std::vector<media::CdmHostFilePath>* cdm_host_file_paths);
} // namespace cef
#endif // CEF_LIBCEF_COMMON_CDM_HOST_FILE_PATH_H_

View File

@@ -7,9 +7,27 @@
#include "libcef/common/app_manager.h"
#include "chrome/common/media/cdm_registration.h"
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
#include "libcef/common/cdm_host_file_path.h"
#endif
ChromeContentClientCef::ChromeContentClientCef() = default;
ChromeContentClientCef::~ChromeContentClientCef() = default;
void ChromeContentClientCef::AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
if (cdms)
RegisterCdmInfo(cdms);
#if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION)
if (cdm_host_file_paths)
cef::AddCdmHostFilePaths(cdm_host_file_paths);
#endif
}
void ChromeContentClientCef::AddAdditionalSchemes(Schemes* schemes) {
ChromeContentClient::AddAdditionalSchemes(schemes);
CefAppManager::Get()->AddAdditionalSchemes(schemes);

View File

@@ -14,6 +14,9 @@ class ChromeContentClientCef : public ChromeContentClient {
~ChromeContentClientCef() override;
// content::ContentClient overrides.
void AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
void AddAdditionalSchemes(Schemes* schemes) override;
};

View File

@@ -8,15 +8,16 @@
#include <string>
namespace base {
class FilePath;
}
#include "base/files/file_path.h"
namespace util_mac {
// Returns the path to the NSLibraryDirectory (e.g. "~/Library").
bool GetLocalLibraryDirectory(base::FilePath* result);
// Returns the framework name (e.g. "Chromium Embedded Framework").
base::FilePath::StringType GetFrameworkName();
// Returns the path to the CEF framework directory inside the top-level app
// bundle (e.g. "myapp.app/Contents/Frameworks/Chromium Embedded
// Framework.framework"). May return an empty value if not running in an app

View File

@@ -8,7 +8,6 @@
#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/mac/bundle_locations.h"
#include "base/mac/foundation_util.h"
@@ -72,6 +71,10 @@ bool GetLocalLibraryDirectory(base::FilePath* result) {
return base::mac::GetLocalDirectory(NSLibraryDirectory, result);
}
base::FilePath::StringType GetFrameworkName() {
return FILE_PATH_LITERAL("Chromium Embedded Framework");
}
base::FilePath GetFrameworkDirectory() {
base::FilePath frameworks_path =
base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(
@@ -83,8 +86,8 @@ base::FilePath GetFrameworkDirectory() {
if (frameworks_path.empty())
return base::FilePath();
return frameworks_path.Append(
FILE_PATH_LITERAL("Chromium Embedded Framework.framework"));
return frameworks_path.Append(GetFrameworkName())
.AddExtension(FILE_PATH_LITERAL(".framework"));
}
base::FilePath GetFrameworkResourcesDirectory() {

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=546b8f890852fb4df26a85aec6b83effe1bdc6e6$
// $hash=5e68fdaae42fe008a95bcf2672debe3cf04fa2ff$
//
#include "libcef_dll/cpptoc/views/display_cpptoc.h"
@@ -121,6 +121,48 @@ CEF_EXPORT void cef_display_get_alls(size_t* displaysCount,
}
}
CEF_EXPORT cef_point_t
cef_display_convert_screen_point_to_pixels(const cef_point_t* point) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: point; type: simple_byref_const
DCHECK(point);
if (!point)
return CefPoint();
// Translate param: point; type: simple_byref_const
CefPoint pointVal = point ? *point : CefPoint();
// Execute
cef_point_t _retval = CefDisplay::ConvertScreenPointToPixels(pointVal);
// Return type: simple
return _retval;
}
CEF_EXPORT cef_point_t
cef_display_convert_screen_point_from_pixels(const cef_point_t* point) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: point; type: simple_byref_const
DCHECK(point);
if (!point)
return CefPoint();
// Translate param: point; type: simple_byref_const
CefPoint pointVal = point ? *point : CefPoint();
// Execute
cef_point_t _retval = CefDisplay::ConvertScreenPointFromPixels(pointVal);
// Return type: simple
return _retval;
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=ba41b36a0cdd335f2a964665576aaf50d8be9c55$
// $hash=afef323719b977c74bb86d015ad1b0f5c253c3ba$
//
#include "libcef_dll/ctocpp/views/display_ctocpp.h"
@@ -110,6 +110,32 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
}
}
NO_SANITIZE("cfi-icall")
CefPoint CefDisplay::ConvertScreenPointToPixels(const CefPoint& point) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_point_t _retval = cef_display_convert_screen_point_to_pixels(&point);
// Return type: simple
return _retval;
}
NO_SANITIZE("cfi-icall")
CefPoint CefDisplay::ConvertScreenPointFromPixels(const CefPoint& point) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_point_t _retval = cef_display_convert_screen_point_from_pixels(&point);
// Return type: simple
return _retval;
}
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall") int64 CefDisplayCToCpp::GetID() {

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=93d56886080f7dc864034a17ce1f794198b14259$
// $hash=7e9918c2136d28088af105cb6678fe13b42ce5c0$
//
#include <dlfcn.h>
@@ -232,6 +232,10 @@ struct libcef_pointers {
decltype(&cef_display_get_matching_bounds) cef_display_get_matching_bounds;
decltype(&cef_display_get_count) cef_display_get_count;
decltype(&cef_display_get_alls) cef_display_get_alls;
decltype(&cef_display_convert_screen_point_to_pixels)
cef_display_convert_screen_point_to_pixels;
decltype(&cef_display_convert_screen_point_from_pixels)
cef_display_convert_screen_point_from_pixels;
decltype(&cef_label_button_create) cef_label_button_create;
decltype(&cef_menu_button_create) cef_menu_button_create;
decltype(&cef_panel_create) cef_panel_create;
@@ -441,6 +445,8 @@ int libcef_init_pointers(const char* path) {
INIT_ENTRY(cef_display_get_matching_bounds);
INIT_ENTRY(cef_display_get_count);
INIT_ENTRY(cef_display_get_alls);
INIT_ENTRY(cef_display_convert_screen_point_to_pixels);
INIT_ENTRY(cef_display_convert_screen_point_from_pixels);
INIT_ENTRY(cef_label_button_create);
INIT_ENTRY(cef_menu_button_create);
INIT_ENTRY(cef_panel_create);
@@ -1257,6 +1263,18 @@ void cef_display_get_alls(size_t* displaysCount,
g_libcef_pointers.cef_display_get_alls(displaysCount, displays);
}
NO_SANITIZE("cfi-icall")
cef_point_t cef_display_convert_screen_point_to_pixels(
const cef_point_t* point) {
return g_libcef_pointers.cef_display_convert_screen_point_to_pixels(point);
}
NO_SANITIZE("cfi-icall")
cef_point_t cef_display_convert_screen_point_from_pixels(
const cef_point_t* point) {
return g_libcef_pointers.cef_display_convert_screen_point_from_pixels(point);
}
NO_SANITIZE("cfi-icall")
struct _cef_label_button_t* cef_label_button_create(
struct _cef_button_delegate_t* delegate,

View File

@@ -118,6 +118,9 @@ patches = [
# Allow override of RWHVBase::GetNewScreenInfosForUpdate() which is now
# required due to https://crrev.com/96938eb36e in order to use
# RWHVBase::UpdateScreenInfo() with OSR.
#
# Windows: Fix 1px gap with maximized frameless windows on Win11.
# https://bitbucket.org/chromiumembedded/cef/issues/3414
'name': 'views_widget',
},
{
@@ -608,5 +611,10 @@ patches = [
# chrome/browser/devtools/protocol/page_handler.cc.
# https://bugs.chromium.org/p/chromium/issues/detail?id=1366011
'name': 'chrome_browser_devtools_1366011'
},
{
# Support GN configuration of enable_rlz (see issue #3404).
# https://chromium-review.googlesource.com/c/chromium/src/+/3934411
'name': 'rlz_3934411'
}
]

View File

@@ -20,10 +20,10 @@ index 18c138c21a853..554e22458da45 100644
// TODO(wjmaclean): We should update the ProcessLock comparison API
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index fe59047aca94b..a2b6583dba0b5 100644
index cb4c320c7f020..dedfabddad297 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -6542,6 +6542,14 @@ std::pair<url::Origin, std::string> NavigationRequest::
@@ -6554,6 +6554,14 @@ std::pair<url::Origin, std::string> NavigationRequest::
origin_and_debug_info.second += ", error";
}
@@ -38,7 +38,7 @@ index fe59047aca94b..a2b6583dba0b5 100644
if (use_opaque_origin) {
origin_and_debug_info =
std::make_pair(origin_and_debug_info.first.DeriveNewOpaqueOrigin(),
@@ -6569,6 +6577,15 @@ std::pair<url::Origin, std::string> NavigationRequest::
@@ -6581,6 +6589,15 @@ std::pair<url::Origin, std::string> NavigationRequest::
GetOriginForURLLoaderFactoryWithoutFinalFrameHostWithDebugInfo(
SandboxFlagsToCommit());

View File

@@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index a094aa41ec525..8f3fa35fe40bb 100644
index e54bbc810767f..978fed0f3e071 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -1840,8 +1840,6 @@ config("thin_archive") {
@@ -1844,8 +1844,6 @@ config("thin_archive") {
# confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 073ded4a9482b..55edbcad5b2a3 100644
index 8a745f6c29c0d..925acef4d38bb 100644
--- chrome/browser/BUILD.gn
+++ chrome/browser/BUILD.gn
@@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni")
@@ -10,7 +10,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -1974,6 +1975,7 @@ static_library("browser") {
@@ -1976,6 +1977,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2520,6 +2522,10 @@ static_library("browser") {
@@ -2523,6 +2525,10 @@ static_library("browser") {
]
}
@@ -29,7 +29,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644
if (is_android) {
sources += [
"after_startup_task_utils_android.cc",
@@ -6349,8 +6355,6 @@ static_library("browser") {
@@ -6352,8 +6358,6 @@ static_library("browser") {
sources += [
"enterprise/chrome_browser_main_extra_parts_enterprise.cc",
"enterprise/chrome_browser_main_extra_parts_enterprise.h",

View File

@@ -13,7 +13,7 @@ index af62c19be9db6..d58f033cffecc 100644
return false;
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 7b4b0ed936514..8949125070a54 100644
index 14d4783802ca6..4f9edb0b96d98 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@@ -43,7 +43,7 @@ index 7b4b0ed936514..8949125070a54 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -5665,6 +5671,7 @@ static_library("ui") {
@@ -5674,6 +5680,7 @@ static_library("ui") {
if (enable_basic_printing) {
deps += [
"//components/printing/browser",

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc
index d1244c71932df..fab3cb730f084 100644
index f4d0d93510f26..e1ccee6851a04 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -310,6 +310,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -42,7 +42,7 @@ index d1244c71932df..fab3cb730f084 100644
}
RenderViewContextMenu::~RenderViewContextMenu() = default;
@@ -1160,6 +1179,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1165,6 +1184,12 @@ void RenderViewContextMenu::InitMenu() {
// menu, meaning that each menu item added/removed in this function will cause
// it to visibly jump on the screen (see b/173569669).
AppendQuickAnswersItems();
@@ -55,7 +55,7 @@ index d1244c71932df..fab3cb730f084 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3015,6 +3040,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -3020,6 +3045,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}
@@ -69,7 +69,7 @@ index d1244c71932df..fab3cb730f084 100644
RenderViewContextMenu::GetHandlersForLinkUrl() {
custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers =
diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h
index 0156137c2853a..ad27c7920e6e7 100644
index 1963c6ed3776d..d302dc4f05bdd 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -127,6 +127,12 @@ class RenderViewContextMenu
@@ -85,7 +85,7 @@ index 0156137c2853a..ad27c7920e6e7 100644
protected:
Profile* GetProfile() const;
@@ -356,6 +362,9 @@ class RenderViewContextMenu
@@ -357,6 +363,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index ab0022f97fd3a..0632f7b4d966d 100644
index ab0022f97fd3a..4f27ddec84153 100644
--- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@
@@ -24,7 +24,20 @@ index ab0022f97fd3a..0632f7b4d966d 100644
ShowFolderUploadConfirmationDialog(
path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
@@ -480,7 +488,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
@@ -367,6 +375,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
if (AbortIfWebContentsDestroyed())
return;
+ // Don't trigger creation of a AccountConsistencyModeManager (see issue #3401)
+ if (cef::IsAlloyRuntimeEnabled()) {
+ NotifyListenerAndEnd(std::move(list));
+ return;
+ }
+
#if BUILDFLAG(FULL_SAFE_BROWSING)
enterprise_connectors::ContentAnalysisDelegate::Data data;
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
@@ -480,7 +494,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
FileSelectHelper::GetFileTypesFromAcceptType(
@@ -34,7 +47,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> base_file_type(
new ui::SelectFileDialog::FileTypeInfo());
if (accept_types.empty())
@@ -494,17 +503,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -494,17 +509,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back();
@@ -60,7 +73,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
} else {
if (!base::IsStringASCII(accept_type))
continue;
@@ -515,10 +531,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -515,10 +537,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
description_id = IDS_AUDIO_FILES;
else if (ascii_type == "video/*")
description_id = IDS_VIDEO_FILES;
@@ -81,7 +94,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
if (extensions->size() > old_extension_size)
valid_type_count++;
}
@@ -543,6 +567,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -543,6 +573,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
l10n_util::GetStringUTF16(description_id));
}
@@ -97,7 +110,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
return file_type;
}
@@ -550,7 +583,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -550,7 +589,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -107,7 +120,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
Profile* profile = Profile::FromBrowserContext(
render_frame_host->GetProcess()->GetBrowserContext());
@@ -569,6 +603,7 @@ void FileSelectHelper::RunFileChooser(
@@ -569,6 +609,7 @@ void FileSelectHelper::RunFileChooser(
// message.
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
@@ -115,7 +128,7 @@ index ab0022f97fd3a..0632f7b4d966d 100644
file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
params.Clone());
}
@@ -622,7 +657,8 @@ void FileSelectHelper::RunFileChooser(
@@ -622,7 +663,8 @@ void FileSelectHelper::RunFileChooser(
}
void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) {

View File

@@ -198,7 +198,7 @@ index 791b74ef57995..20cd406ff81bb 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 6f268f5937bd5..2152a26496ceb 100644
index ed79018b99afb..7353238e1fb0f 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -31,6 +31,7 @@
@@ -260,7 +260,7 @@ index 6f268f5937bd5..2152a26496ceb 100644
}
std::vector<base::FilePath>
@@ -6623,10 +6635,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -6625,10 +6637,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -273,7 +273,7 @@ index 6f268f5937bd5..2152a26496ceb 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -6645,7 +6657,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -6647,7 +6659,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -283,7 +283,7 @@ index 6f268f5937bd5..2152a26496ceb 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -6777,7 +6790,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -6779,7 +6792,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -293,7 +293,7 @@ index 6f268f5937bd5..2152a26496ceb 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index cb93058f317e4..27215441c206c 100644
index df6896d3f444f..8ee9b740f7f41 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -119,6 +119,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -324,7 +324,7 @@ index cb93058f317e4..27215441c206c 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 5e72dbd77de9b..40c346953edb0 100644
index bcdc111b9168a..a78f8696530d0 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -11,6 +11,7 @@
@@ -346,7 +346,7 @@ index 5e72dbd77de9b..40c346953edb0 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1347,6 +1352,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -1348,6 +1353,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
SessionDataService::RegisterProfilePrefs(registry);
#endif

View File

@@ -179,10 +179,10 @@ index 195674a56169c..bee591ec8f2f3 100644
BrowserFrame(const BrowserFrame&) = delete;
BrowserFrame& operator=(const BrowserFrame&) = delete;
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
index a8e5cd8826ca4..0b958e49730d4 100644
index 092add8cc9349..7b9f8c33ce328 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -305,11 +305,10 @@ using content::NativeWebKeyboardEvent;
@@ -306,11 +306,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
using web_modal::WebContentsModalDialogHost;
@@ -197,7 +197,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -802,11 +801,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver {
@@ -803,11 +802,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -221,7 +221,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
SetShowIcon(
::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay()));
@@ -848,7 +858,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -849,7 +859,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
@@ -229,7 +229,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -894,8 +903,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -895,8 +904,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@@ -247,7 +247,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1841,6 +1857,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
@@ -1845,6 +1861,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const {
if (immersive_mode_controller_->IsEnabled())
return false;
@@ -256,7 +256,17 @@ index a8e5cd8826ca4..0b958e49730d4 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3202,7 +3220,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -2715,7 +2733,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
- DCHECK(toolbar_button_provider_);
+ if (!toolbar_button_provider_)
+ return nullptr;
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3207,7 +3226,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@@ -266,7 +276,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -3747,8 +3766,10 @@ void BrowserView::Layout() {
@@ -3752,8 +3772,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -279,7 +289,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -3814,6 +3835,11 @@ void BrowserView::AddedToWidget() {
@@ -3819,6 +3841,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -291,7 +301,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
toolbar_->Init();
// TODO(pbos): Manage this either inside SidePanel or the corresponding button
@@ -3874,13 +3900,9 @@ void BrowserView::AddedToWidget() {
@@ -3879,13 +3906,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -307,7 +317,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4296,7 +4318,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4301,7 +4324,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -317,7 +327,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -4638,6 +4661,8 @@ Profile* BrowserView::GetProfile() {
@@ -4643,6 +4667,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -326,7 +336,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -4660,6 +4685,8 @@ void BrowserView::HideDownloadShelf() {
@@ -4665,6 +4691,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -465,7 +475,7 @@ index 57d5e9f7b4e3c..da7b2d14bae49 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 73869775288dc..524f32d3ae877 100644
index afe27a1bdcc26..530238e430e29 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -170,12 +170,13 @@ auto& GetViewCommandMap() {
@@ -494,7 +504,7 @@ index 73869775288dc..524f32d3ae877 100644
size_animation_.Reset(1);
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index e597548896482..b9985ed50a2e3 100644
index da32d80ee4f08..8a5e1af098414 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -95,7 +95,8 @@ class ToolbarView : public views::AccessiblePaneView,

View File

@@ -12,7 +12,7 @@ index 286e99d804cd0..2f431dcab0283 100644
GetContentClient()->browser()->GetUserAgent());
version.SetString("V8-Version", V8_VERSION_STRING);
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index cbadbda605709..048c88486ce06 100644
index aee570cfc179d..fb5ee4ce008f1 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -716,6 +716,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest(

View File

@@ -10,7 +10,7 @@ index 38062cfb9329e..14429ff0ee7eb 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index 696d21520e076..874954e24bc8c 100644
index 0878808a8dc72..59efcead3b145 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -1734,7 +1734,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {

View File

@@ -0,0 +1,15 @@
diff --git rlz/buildflags/buildflags.gni rlz/buildflags/buildflags.gni
index 8090796ea3ec7..acfc599577296 100644
--- rlz/buildflags/buildflags.gni
+++ rlz/buildflags/buildflags.gni
@@ -9,4 +9,9 @@ import("//build/config/chromeos/ui_mode.gni")
# rlz codes for searches but do not use the library.
enable_rlz_support = is_win || is_apple || is_chromeos_ash
-enable_rlz = is_chrome_branded && enable_rlz_support
+declare_args() {
+ enable_rlz = is_chrome_branded && enable_rlz_support
+}
+
+assert(!enable_rlz || enable_rlz_support,
+ "RLZ is only supported on Windows, Apple and ChromeOS Ash.")

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index a41ab3c6e50f0..1dd98219869cf 100644
index 9b4f43c0c9c13..a68ecf3bd933d 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -22,6 +22,7 @@
@@ -42,7 +42,7 @@ index a41ab3c6e50f0..1dd98219869cf 100644
::network::mojom::NetworkContextFilePaths::New();
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 4c79de32e5f01..9ff92cda4dc3c 100644
index 48a6f90e18d4e..51fe448cd2289 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -549,6 +549,25 @@ void CookieMonster::SetCookieableSchemes(
@@ -72,7 +72,7 @@ index 4c79de32e5f01..9ff92cda4dc3c 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK(thread_checker_.CalledOnValidThread());
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 0e48488a03aa5..412f09945878d 100644
index 490072c987e95..19a43087e07fa 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -209,6 +209,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@@ -123,10 +123,10 @@ index 955126eed8968..cda1d55350d1e 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 757059958a1ea..6eeac7e1df7a6 100644
index ef9b375140df2..e8ca983e93fc1 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2385,17 +2385,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2388,17 +2388,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@@ -157,10 +157,10 @@ index 757059958a1ea..6eeac7e1df7a6 100644
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index ecb6f95f694c0..7a567de87c2b1 100644
index cf3f2d65c15aa..d49ca60c9bd87 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -341,6 +341,9 @@ struct NetworkContextParams {
@@ -342,6 +342,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 8500ee5f439c3..7fde560103ec2 100644
index 92b87fc3be69c..f5fcf0c7bd7b5 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -662,6 +662,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@@ -418,10 +418,21 @@ index d24c447bb8030..29215d6578169 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index db731ec8ab093..f63db294d8480 100644
index db731ec8ab093..f590ff6d99e85 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -826,7 +826,11 @@ bool HWNDMessageHandler::IsVisible() const {
@@ -625,7 +625,9 @@ void HWNDMessageHandler::SetDwmFrameExtension(DwmFrameState state) {
if (!delegate_->HasFrame() && ui::win::IsAeroGlassEnabled() &&
!is_translucent_) {
MARGINS m = {0, 0, 0, 0};
- if (state == DwmFrameState::kOn)
+ // Fix 1px gap with frameless windows on Win11 by not setting DWM margins
+ // when maximized. See CEF issue #3414.
+ if (state == DwmFrameState::kOn && !IsMaximized())
m = {0, 0, 1, 0};
DwmExtendFrameIntoClientArea(hwnd(), &m);
}
@@ -826,7 +828,11 @@ bool HWNDMessageHandler::IsVisible() const {
}
bool HWNDMessageHandler::IsActive() const {
@@ -434,7 +445,7 @@ index db731ec8ab093..f63db294d8480 100644
}
bool HWNDMessageHandler::IsMinimized() const {
@@ -3224,10 +3228,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3224,10 +3230,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -253,13 +253,16 @@ struct TestSetup {
return GetResource(request->GetURL(), request->GetMethod());
}
// Optional initialization after the test server is started.
virtual void Initialize() {}
// Validate expected initial state.
void Validate() const { DCHECK(!resources.empty()); }
std::string GetMainURL() const { return resources.front()->GetPathURL(); }
// Returns true if the server will be used.
bool NeedsServer() const {
virtual bool NeedsServer() const {
ResourceList::const_iterator it = resources.begin();
for (; it != resources.end(); ++it) {
Resource* resource = *it;
@@ -346,9 +349,7 @@ class TestServerObserver : public test_server::ObserverHelper {
class CorsTestHandler : public RoutingTestHandler {
public:
explicit CorsTestHandler(TestSetup* setup) : setup_(setup) {
setup_->Validate();
}
explicit CorsTestHandler(TestSetup* setup) : setup_(setup) {}
void RunTest() override {
StartServer(base::BindOnce(&CorsTestHandler::TriggerCreateBrowser, this));
@@ -489,6 +490,9 @@ class CorsTestHandler : public RoutingTestHandler {
protected:
void TriggerCreateBrowser() {
setup_->Initialize();
setup_->Validate();
main_url_ = setup_->GetMainURL();
CreateBrowser(main_url_);
}
@@ -817,18 +821,45 @@ void SetupIframeRequest(CookieTestSetup* setup,
setup->AddResource(iframe_resource);
}
struct IframeTestSetup : CookieTestSetup {
IframeTestSetup(const std::string& test_name,
HandlerType main_handler,
HandlerType iframe_handler,
const std::string& sandbox_attribs)
: test_name_(test_name),
main_handler_(main_handler),
iframe_handler_(iframe_handler),
sandbox_attribs_(sandbox_attribs) {}
bool NeedsServer() const override {
return main_handler_ == HandlerType::SERVER ||
iframe_handler_ == HandlerType::SERVER;
}
void Initialize() override {
SetupIframeRequest(this, test_name_, main_handler_, &resource_main_,
iframe_handler_, &resource_iframe_, sandbox_attribs_);
}
private:
const std::string test_name_;
const HandlerType main_handler_;
const HandlerType iframe_handler_;
const std::string sandbox_attribs_;
CookieResource resource_main_;
CookieResource resource_iframe_;
};
} // namespace
// Test iframe sandbox attributes with different origin combinations.
#define CORS_TEST_IFRAME(test_name, handler_main, handler_iframe, \
sandbox_attribs) \
TEST(CorsTest, Iframe##test_name) { \
CookieTestSetup setup; \
CookieResource resource_main, resource_iframe; \
SetupIframeRequest(&setup, "CorsTest.Iframe" #test_name, \
HandlerType::handler_main, &resource_main, \
HandlerType::handler_iframe, &resource_iframe, \
sandbox_attribs); \
IframeTestSetup setup("CorsTest.Iframe" #test_name, \
HandlerType::handler_main, \
HandlerType::handler_iframe, sandbox_attribs); \
CefRefPtr<CorsTestHandler> handler = new CorsTestHandler(&setup); \
handler->ExecuteTest(); \
ReleaseAndWaitForDestructor(handler); \

View File

@@ -200,6 +200,12 @@ void RunWindowLayoutAndCoords(CefRefPtr<CefWindow> window) {
display->ConvertPointFromPixels(point);
EXPECT_EQ(CefPoint(client_bounds_in_screen.x, client_bounds_in_screen.y),
point);
// We don't know what the pixel values will be, but they should be reversable.
point = CefPoint(client_bounds_in_screen.x, client_bounds_in_screen.y);
const auto pixels = CefDisplay::ConvertScreenPointToPixels(point);
const auto dip = CefDisplay::ConvertScreenPointFromPixels(pixels);
EXPECT_EQ(point, dip);
}
void WindowLayoutAndCoordsImpl(CefRefPtr<CefWaitableEvent> event) {

View File

@@ -809,6 +809,12 @@ parser.add_option(
dest='arm64build',
default=False,
help='Create an ARM64 build.')
parser.add_option(
'--with-pgo-profiles',
action='store_true',
dest='withpgoprofiles',
default=False,
help='Download PGO profiles for the build.')
# Test-related options.
parser.add_option(
@@ -1261,6 +1267,9 @@ if not os.path.exists(gclient_file) or options.forceconfig:
"'managed': False,"+\
"'name': 'src', "+\
"'url': '" + chromium_url + "', "+\
"'custom_vars': {"+\
"'checkout_pgo_profiles': " + ('True' if options.withpgoprofiles else 'False') + ", "+\
"}, "+\
"'custom_deps': {"+\
"'build': None, "+\
"'build/scripts/command_wrapper/bin': None, "+\

View File

@@ -14,20 +14,4 @@
'source' : '../net/base/net_error_list.h',
'target' : 'include/base/internal/cef_net_error_list.h',
},
{
'source' : '../net/data/ssl/certificates/expired_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/expired_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/localhost_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/localhost_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/ok_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/ok_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/root_ca_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/root_ca_cert.pem',
},
]

View File

@@ -0,0 +1,29 @@
# Additional handling of transfer files.
# target: Target location relative to the target release directory. This
# value is required.
# source: Source location relative to the CEF root directory. This value
# is optional. If specified the source file will be copied to the target
# location and a TRANSFER-README.txt file will be created.
# post-process: Post-processing operation to perform. This value is
# optional and may be any one of the following:
# 'normalize_headers': Replace fully-qualified project header paths with
# the optionally specified 'new_header_path' value.
[
{
'source' : '../net/data/ssl/certificates/expired_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/expired_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/localhost_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/localhost_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/ok_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/ok_cert.pem',
},
{
'source' : '../net/data/ssl/certificates/root_ca_cert.pem',
'target' : 'tests/ceftests/resources/net/data/ssl/certificates/root_ca_cert.pem',
},
]

View File

@@ -212,12 +212,6 @@ def GetRecommendedDefaultArgs():
# distribution.
'is_component_build': False,
# Specify the current PGO phase. Default is 0 (turned off) for normal
# builds and 2 (used during the optimization phase) for official Windows
# and macOS builds. Currently turned off for CEF because it requires
# additional setup and is not yet tested. See issue #2956.
'chrome_pgo_phase': 0,
# Disable support for background apps, which don't make sense with CEF.
# Default is enabled on desktop platforms. This feature was also causing
# strange shutdown crashes when using the Chrome runtime with a Debug
@@ -235,18 +229,17 @@ def GetRecommendedDefaultArgs():
'v8_enable_sandbox': False,
}
if platform == 'windows' or platform == 'mac':
# A browser specific value of at least 32 characters that will be used in
# the computation of the CDM storage ID.
result['alternate_cdm_storage_id_key'] = '968b476909da4373b08903c28e859454'
if platform != 'windows':
# Only allow non-component Debug builds on non-Windows platforms. These
# builds will fail on Windows due to linker issues (running out of memory,
# etc). See https://bitbucket.org/chromiumembedded/cef/issues/2679.
result['forbid_non_component_debug_builds'] = False
if platform == 'mac':
# Use the system allocator on Mac. Default is 'partition' (PartitionAlloc)
# with the allocator shim enabled. See issue #3061.
result['use_allocator'] = 'none'
result['use_allocator_shim'] = False
if platform == 'linux':
# Use a sysroot environment. Default is true. False is recommended for local
# builds.
@@ -255,18 +248,20 @@ def GetRecommendedDefaultArgs():
# x86 or x64 build: $ gclient runhooks
result['use_sysroot'] = False
# Don't add the `-Wl,--fatal-warnings` linker flag when building on Ubuntu
# 14 (Trusty) host systems. It results in errors like the following:
# ld.lld: error: found local symbol '__bss_start' in global part of symbol
# table in file /usr/lib/x86_64-linux-gnu/libGL.so
# TODO(cef): Remove this flag once we require a newer host system.
result['fatal_linker_warnings'] = False
# Disable QT by default because we don't want to introduce the build
# dependencies at this time. For background see
# https://groups.google.com/a/chromium.org/g/chromium-packagers/c/-2VGexQAK6w/m/5K5ppK9WBAAJ
result['use_qt'] = False
if platform == 'mac':
# Disable the allocator shim. Default is True. See issue #3061.
result['use_allocator_shim'] = False
if platform == 'mac' or platform == 'linux':
# Use the system allocator instead of PartitionAlloc. Default is 'partition'
# with the allocator shim enabled. See issues #3061 and #3095.
result['use_allocator'] = 'none'
return result
@@ -294,6 +289,14 @@ def GetRequiredArgs():
'clang_use_chrome_plugins': False,
}
if platform == 'windows' or platform == 'mac':
# Enable Widevine CDM host verification and storage ID.
result['enable_cdm_host_verification'] = True
result['enable_cdm_storage_id'] = True
# Enable use of the RLZ library as required by CDM storage ID.
result['enable_rlz'] = True
if platform == 'linux':
# Don't generate Chromium installer packages. This avoids GN dependency
# errors with CEF (see issue #2301).

View File

@@ -31,7 +31,7 @@ if exist %vcvars% goto found_vcvars
:: Search for the default VS installation path.
for %%x in ("%PROGRAMFILES(X86)%" "%PROGRAMFILES%") do (
for %%y in (2019 2017) do (
for %%y in (2022 2019 2017) do (
for %%z in (Professional Enterprise Community BuildTools) do (
set vcvars="%%~x\Microsoft Visual Studio\%%y\%%z\VC\Auxiliary\Build\%vcvarsbat%"
if exist !vcvars! goto found_vcvars