mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 92.0.4515.0 (#885287)
This commit is contained in:
@@ -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(
|
||||
|
@@ -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);
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user