Update to Chromium version 92.0.4515.0 (#885287)

This commit is contained in:
Marshall Greenblatt
2021-06-03 21:34:56 -04:00
parent f2f52c1e2c
commit 00dca9601e
190 changed files with 1234 additions and 1309 deletions

View File

@@ -349,7 +349,7 @@ void CefBrowserPlatformDelegateNativeWin::ViewText(const std::string& text) {
std::string str = text;
scoped_refptr<base::RefCountedString> str_ref =
base::RefCountedString::TakeString(&str);
CEF_POST_USER_VISIBLE_TASK(base::Bind(WriteTempFileAndView, str_ref));
CEF_POST_USER_VISIBLE_TASK(base::BindOnce(WriteTempFileAndView, str_ref));
}
bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
@@ -395,7 +395,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
// static
void CefBrowserPlatformDelegate::HandleExternalProtocol(const GURL& url) {
CEF_POST_USER_VISIBLE_TASK(base::Bind(ExecuteExternalProtocol, url));
CEF_POST_USER_VISIBLE_TASK(base::BindOnce(ExecuteExternalProtocol, url));
}
CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(

View File

@@ -36,7 +36,7 @@ bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor) {
#if defined(USE_AURA)
CefCursorHandle platform_cursor;
ui::PlatformCursor image_cursor = nullptr;
scoped_refptr<ui::PlatformCursor> image_cursor;
if (ui_cursor.type() == ui::mojom::CursorType::kCustom) {
image_cursor = ui::CursorFactory::GetInstance()->CreateImageCursor(
@@ -49,10 +49,6 @@ bool OnCursorChange(CefBrowserHostBase* browser, const ui::Cursor& ui_cursor) {
handled = handler->OnCursorChange(browser, platform_cursor, cursor_type,
custom_cursor_info);
if (image_cursor) {
ui::CursorFactory::GetInstance()->UnrefImageCursor(image_cursor);
}
#elif defined(OS_MAC)
// |web_cursor| owns the resulting |native_cursor|.
content::WebCursor web_cursor(ui_cursor);

View File

@@ -10,13 +10,17 @@
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-forward.h"
#if defined(USE_AURA)
#include "ui/base/cursor/platform_cursor.h"
#endif
class CefBrowserHostBase;
namespace cursor_util {
#if defined(USE_AURA)
cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type);
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor);
cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor);
#endif // defined(USE_AURA)
// Returns true if the client handled the cursor change.

View File

@@ -8,6 +8,8 @@
#if defined(USE_X11)
#include "ui/base/x/x11_cursor.h"
#elif defined(USE_OZONE)
#include "ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h"
#endif
namespace cursor_util {
@@ -20,13 +22,16 @@ cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
return 0;
}
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor) {
cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor) {
#if defined(USE_X11)
// See https://crbug.com/1029142 for background.
return static_cast<cef_cursor_handle_t>(
static_cast<ui::X11Cursor*>(cursor)->xcursor());
ui::X11Cursor::FromPlatformCursor(cursor)->xcursor());
#elif defined(USE_OZONE)
return static_cast<cef_cursor_handle_t>(
ui::BitmapCursorOzone::FromPlatformCursor(cursor)->platform_data());
#else
return cursor;
return 0;
#endif
}

View File

@@ -156,8 +156,8 @@ cef_cursor_handle_t GetPlatformCursor(ui::mojom::CursorType type) {
return LoadCursor(module_handle, cursor_id);
}
cef_cursor_handle_t ToCursorHandle(ui::PlatformCursor cursor) {
return static_cast<ui::WinCursor*>(cursor)->hcursor();
cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor) {
return ui::WinCursor::FromPlatformCursor(cursor)->hcursor();
}
} // namespace cursor_util

View File

@@ -487,8 +487,8 @@ void CefNativeMenuWin::RunMenuAt(const gfx::Point& point, int alignment) {
// does.
menu_to_select_factory_.InvalidateWeakPtrs();
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&CefNativeMenuWin::DelayedSelect,
menu_to_select_factory_.GetWeakPtr()));
FROM_HERE, base::BindOnce(&CefNativeMenuWin::DelayedSelect,
menu_to_select_factory_.GetWeakPtr()));
menu_action_ = MENU_ACTION_SELECTED;
}
// Send MenuWillClose after we schedule the select, otherwise MenuWillClose is

View File

@@ -48,7 +48,7 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
params.remove_standard_frame = true;
// Cause WidgetDelegate::CanActivate to return true. See comments in
// AlloyBrowserHostImpl::PlatformSetFocus.
params.activatable = views::Widget::InitParams::ACTIVATABLE_YES;
params.activatable = views::Widget::InitParams::Activatable::kYes;
params.z_order = always_on_top_ ? ui::ZOrderLevel::kFloatingWindow
: ui::ZOrderLevel::kNormal;

View File

@@ -9,6 +9,7 @@
#include "libcef/browser/browser_host_base.h"
#include "libcef/browser/thread_util.h"
#include "net/base/network_interfaces.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/events/platform/x11/x11_event_source.h"
@@ -391,8 +392,8 @@ void CefWindowX11::ProcessXEvent(const x11::Event& event) {
if (!focus_pending_) {
focus_pending_ = true;
CEF_POST_DELAYED_TASK(CEF_UIT,
base::Bind(&CefWindowX11::ContinueFocus,
weak_ptr_factory_.GetWeakPtr()),
base::BindOnce(&CefWindowX11::ContinueFocus,
weak_ptr_factory_.GetWeakPtr()),
100);
}
} else {