Update to Chromium version 137.0.7151.0 (#1453031)

This commit is contained in:
Marshall Greenblatt
2025-05-06 12:45:36 -04:00
parent faa85bf980
commit 7944038baf
81 changed files with 731 additions and 680 deletions

View File

@@ -73,7 +73,7 @@ CefRect GetScreenFrameRectFromDIPContentRect(HWND window,
// Convert from DIP using a method that can handle multiple displays with
// different DPI. If |window| is nullptr the closest display will be used.
const auto screen_rect =
display::win::ScreenWin::DIPToScreenRect(window, dip_rect);
display::win::GetScreenWin()->DIPToScreenRect(window, dip_rect);
RECT rect = {screen_rect.x(), screen_rect.y(),
screen_rect.x() + screen_rect.width(),
@@ -109,7 +109,7 @@ CefRect GetAdjustedScreenFrameRect(CefRect screen_rect,
// Convert to DIP using a method that can handle multiple displays with
// different DPI.
const auto dip_rect = display::win::ScreenWin::ScreenToDIPRect(
const auto dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
nullptr, gfx::Rect(screen_rect.x, screen_rect.y, screen_rect.width,
screen_rect.height));
const auto visible_dip_rect = MakeVisibleOnScreenRect(
@@ -206,7 +206,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() {
// Convert to DIP using a method that can handle multiple displays with
// different DPI. Client coordinates always have origin (0,0).
const gfx::Rect dip_rect = display::win::ScreenWin::ScreenToDIPRect(
const gfx::Rect dip_rect = display::win::GetScreenWin()->ScreenToDIPRect(
window_info_.window, gfx::Rect(0, 0, cr.right, cr.bottom));
// Stay on top if top-most window hosting the web view is topmost.

View File

@@ -68,8 +68,10 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
DCHECK(widget->widget_delegate()->CanActivate());
// WidgetDelegate::DeleteDelegate() will execute the registered callback.
RegisterDeleteDelegateCallback(base::BindOnce(
&CefWindowDelegateView::DeleteDelegate, base::Unretained(this)));
RegisterDeleteDelegateCallback(
RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefWindowDelegateView::DeleteDelegate,
base::Unretained(this)));
}
void CefWindowDelegateView::InitContent() {

View File

@@ -252,7 +252,7 @@ void LoadCookies(const CefBrowserContext::Getter& browser_context_getter,
if (request.trusted_params.has_value() &&
!request.trusted_params->isolation_info.IsEmpty()) {
const auto& isolation_info = request.trusted_params->isolation_info;
partition_key_collection = net::CookiePartitionKeyCollection::FromOptional(
partition_key_collection = net::CookiePartitionKeyCollection(
net::CookiePartitionKey::FromNetworkIsolationKey(
isolation_info.network_isolation_key(), request.site_for_cookies,
net::SchemefulSite(request.url),

View File

@@ -9,6 +9,7 @@
#include "base/notreached.h"
#include "cef/libcef/browser/browser_host_base.h"
#include "chrome/browser/ui/permission_bubble/permission_prompt.h"
#include "components/permissions/permission_request.h"
namespace permission_prompt {

View File

@@ -216,8 +216,9 @@ void CefOverlayViewHost::Init(views::View* host_view,
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
// registered DeleteDelegate callback.
SetOwnedByWidget(true);
SetOwnedByWidget(OwnedByWidgetPassKey());
RegisterDeleteDelegateCallback(
RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefOverlayViewHost::Cleanup, base::Unretained(this)));
if (window_view_->IsChromeStyle()) {

View File

@@ -218,7 +218,7 @@ display::Display GetDisplayNearestPoint(const gfx::Point& point,
#if BUILDFLAG(IS_WIN)
if (input_pixel_coords) {
find_point = gfx::ToFlooredPoint(
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point)));
display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
}
#endif
return display::Screen::GetScreen()->GetDisplayNearestPoint(find_point);
@@ -230,7 +230,7 @@ display::Display GetDisplayMatchingBounds(const gfx::Rect& bounds,
#if BUILDFLAG(IS_WIN)
if (input_pixel_coords) {
find_bounds =
display::win::ScreenWin::ScreenToDIPRect(nullptr, find_bounds);
display::win::GetScreenWin()->ScreenToDIPRect(nullptr, find_bounds);
}
#endif
return display::Screen::GetScreen()->GetDisplayMatching(find_bounds);
@@ -249,19 +249,19 @@ void ConvertPointToPixels(gfx::Point* point, float device_scale_factor) {
#if BUILDFLAG(IS_WIN)
gfx::Point ConvertPointFromPixels(const gfx::Point& point) {
return gfx::ToFlooredPoint(
display::win::ScreenWin::ScreenToDIPPoint(gfx::PointF(point)));
display::win::GetScreenWin()->ScreenToDIPPoint(gfx::PointF(point)));
}
gfx::Point ConvertPointToPixels(const gfx::Point& point) {
return display::win::ScreenWin::DIPToScreenPoint(point);
return display::win::GetScreenWin()->DIPToScreenPoint(point);
}
gfx::Rect ConvertRectFromPixels(const gfx::Rect& rect) {
return display::win::ScreenWin::ScreenToDIPRect(nullptr, rect);
return display::win::GetScreenWin()->ScreenToDIPRect(nullptr, rect);
}
gfx::Rect ConvertRectToPixels(const gfx::Rect& rect) {
return display::win::ScreenWin::DIPToScreenRect(nullptr, rect);
return display::win::GetScreenWin()->DIPToScreenRect(nullptr, rect);
}
#endif // BUILDFLAG(IS_WIN)

View File

@@ -110,7 +110,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
// Convert from DIP to pixel coordinates using a method that can handle
// multiple displays with different DPI.
const auto screen_rect =
display::win::ScreenWin::DIPToScreenRect(window, client_bounds);
display::win::GetScreenWin()->DIPToScreenRect(window, client_bounds);
RECT rect = {screen_rect.x(), screen_rect.y(),
screen_rect.x() + screen_rect.width(),
@@ -123,7 +123,7 @@ class NativeFrameViewEx : public views::NativeFrameView {
rect.right - rect.left, rect.bottom - rect.top);
// Convert back to DIP.
return display::win::ScreenWin::ScreenToDIPRect(window, pixel_rect);
return display::win::GetScreenWin()->ScreenToDIPRect(window, pixel_rect);
#else
// Use the default implementation.
return views::NativeFrameView::GetWindowBoundsForClientBounds(
@@ -420,8 +420,9 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) {
// Cause WidgetDelegate::DeleteDelegate() to delete |this| after executing the
// registered DeleteDelegate callback.
SetOwnedByWidget(true);
SetOwnedByWidget(OwnedByWidgetPassKey());
RegisterDeleteDelegateCallback(
RegisterDeleteCallbackPassKey(),
base::BindOnce(&CefWindowView::DeleteDelegate, base::Unretained(this)));
if (cef_delegate()) {