mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 127.0.6533.0 (#1313161)
This commit is contained in:
@@ -34,7 +34,7 @@ class CefBrowserPlatformDelegateNative
|
||||
void WasResized() override;
|
||||
|
||||
// Translate CEF events to Chromium/Blink Web events.
|
||||
virtual content::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
virtual input::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const = 0;
|
||||
virtual blink::WebMouseEvent TranslateWebClickEvent(
|
||||
const CefMouseEvent& mouse_event,
|
||||
|
@@ -101,10 +101,10 @@ gfx::Point CefBrowserPlatformDelegateNativeAura::GetScreenPoint(
|
||||
return screen_pt;
|
||||
}
|
||||
|
||||
content::NativeWebKeyboardEvent
|
||||
input::NativeWebKeyboardEvent
|
||||
CefBrowserPlatformDelegateNativeAura::TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const {
|
||||
return content::NativeWebKeyboardEvent(TranslateUiKeyEvent(key_event));
|
||||
return input::NativeWebKeyboardEvent(TranslateUiKeyEvent(key_event));
|
||||
}
|
||||
|
||||
blink::WebMouseEvent
|
||||
|
@@ -41,7 +41,7 @@ class CefBrowserPlatformDelegateNativeAura
|
||||
bool want_dip_coords) const override;
|
||||
|
||||
// CefBrowserPlatformDelegateNative methods:
|
||||
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const override;
|
||||
blink::WebMouseEvent TranslateWebClickEvent(
|
||||
const CefMouseEvent& mouse_event,
|
||||
|
@@ -9,9 +9,9 @@
|
||||
#include "cef/libcef/browser/context.h"
|
||||
#include "cef/libcef/browser/native/window_delegate_view.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "components/input/native_web_keyboard_event.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/common/input/native_web_keyboard_event.h"
|
||||
#include "third_party/blink/public/mojom/renderer_preferences.mojom.h"
|
||||
#include "ui/events/keycodes/dom/dom_key.h"
|
||||
#include "ui/events/keycodes/dom/keycode_converter.h"
|
||||
@@ -227,13 +227,13 @@ void CefBrowserPlatformDelegateNativeLinux::ViewText(const std::string& text) {
|
||||
}
|
||||
|
||||
bool CefBrowserPlatformDelegateNativeLinux::HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
// TODO(cef): Is something required here to handle shortcut keys?
|
||||
return false;
|
||||
}
|
||||
|
||||
CefEventHandle CefBrowserPlatformDelegateNativeLinux::GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const {
|
||||
const input::NativeWebKeyboardEvent& event) const {
|
||||
// TODO(cef): We need to return an XEvent* from this method, but
|
||||
// |event.os_event->native_event()| now returns a ui::Event* instead.
|
||||
// See https://crbug.com/965991.
|
||||
@@ -285,12 +285,12 @@ ui::KeyEvent CefBrowserPlatformDelegateNativeLinux::TranslateUiKeyEvent(
|
||||
return ui::KeyEvent(type, key_code, dom_code, flags, dom_key, time_stamp);
|
||||
}
|
||||
|
||||
content::NativeWebKeyboardEvent
|
||||
input::NativeWebKeyboardEvent
|
||||
CefBrowserPlatformDelegateNativeLinux::TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const {
|
||||
ui::KeyEvent ui_event = TranslateUiKeyEvent(key_event);
|
||||
if (key_event.type == KEYEVENT_CHAR) {
|
||||
return content::NativeWebKeyboardEvent(ui_event, key_event.character);
|
||||
return input::NativeWebKeyboardEvent(ui_event, key_event.character);
|
||||
}
|
||||
return content::NativeWebKeyboardEvent(ui_event);
|
||||
return input::NativeWebKeyboardEvent(ui_event);
|
||||
}
|
||||
|
@@ -30,14 +30,13 @@ class CefBrowserPlatformDelegateNativeLinux
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
void SizeTo(int width, int height) override;
|
||||
void ViewText(const std::string& text) override;
|
||||
bool HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
|
||||
CefEventHandle GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const override;
|
||||
const input::NativeWebKeyboardEvent& event) const override;
|
||||
|
||||
// CefBrowserPlatformDelegateNativeAura methods:
|
||||
ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override;
|
||||
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const override;
|
||||
|
||||
private:
|
||||
|
@@ -43,17 +43,16 @@ class CefBrowserPlatformDelegateNativeMac
|
||||
gfx::Point GetScreenPoint(const gfx::Point& view,
|
||||
bool want_dip_coords) const override;
|
||||
void ViewText(const std::string& text) override;
|
||||
bool HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
|
||||
CefEventHandle GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const override;
|
||||
const input::NativeWebKeyboardEvent& event) const override;
|
||||
std::unique_ptr<CefJavaScriptDialogRunner> CreateJavaScriptDialogRunner()
|
||||
override;
|
||||
std::unique_ptr<CefMenuRunner> CreateMenuRunner() override;
|
||||
bool IsPrintPreviewSupported() const override;
|
||||
|
||||
// CefBrowserPlatformDelegateNative methods:
|
||||
content::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
input::NativeWebKeyboardEvent TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const override;
|
||||
blink::WebMouseEvent TranslateWebClickEvent(
|
||||
const CefMouseEvent& mouse_event,
|
||||
|
@@ -17,10 +17,10 @@
|
||||
#include "cef/libcef/browser/native/javascript_dialog_runner_mac.h"
|
||||
#include "cef/libcef/browser/native/menu_runner_mac.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "components/input/native_web_keyboard_event.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/input/native_web_keyboard_event.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
|
||||
@@ -360,7 +360,7 @@ void CefBrowserPlatformDelegateNativeMac::SendKeyEvent(
|
||||
return;
|
||||
}
|
||||
|
||||
content::NativeWebKeyboardEvent web_event = TranslateWebKeyEvent(event);
|
||||
input::NativeWebKeyboardEvent web_event = TranslateWebKeyEvent(event);
|
||||
view->ForwardKeyboardEvent(web_event, ui::LatencyInfo());
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ void CefBrowserPlatformDelegateNativeMac::ViewText(const std::string& text) {
|
||||
}
|
||||
|
||||
bool CefBrowserPlatformDelegateNativeMac::HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
// Give the top level menu equivalents a chance to handle the event.
|
||||
NSEvent* ns_event = event.os_event.Get();
|
||||
if (ns_event.type == NSEventTypeKeyDown) {
|
||||
@@ -460,7 +460,7 @@ bool CefBrowserPlatformDelegateNativeMac::HandleKeyboardEvent(
|
||||
}
|
||||
|
||||
CefEventHandle CefBrowserPlatformDelegateNativeMac::GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const {
|
||||
const input::NativeWebKeyboardEvent& event) const {
|
||||
return CAST_NSEVENT_TO_CEF_EVENT_HANDLE(event.os_event.Get());
|
||||
}
|
||||
|
||||
@@ -481,10 +481,10 @@ bool CefBrowserPlatformDelegateNativeMac::IsPrintPreviewSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
content::NativeWebKeyboardEvent
|
||||
input::NativeWebKeyboardEvent
|
||||
CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
|
||||
const CefKeyEvent& key_event) const {
|
||||
content::NativeWebKeyboardEvent result(
|
||||
input::NativeWebKeyboardEvent result(
|
||||
blink::WebInputEvent::Type::kUndefined,
|
||||
blink::WebInputEvent::Modifiers::kNoModifiers, ui::EventTimeForNow());
|
||||
|
||||
@@ -533,8 +533,8 @@ CefBrowserPlatformDelegateNativeMac::TranslateWebKeyEvent(
|
||||
isARepeat:NO
|
||||
keyCode:key_event.native_key_code];
|
||||
|
||||
result = content::NativeWebKeyboardEvent(
|
||||
base::apple::OwnedNSEvent(synthetic_event));
|
||||
result =
|
||||
input::NativeWebKeyboardEvent(base::apple::OwnedNSEvent(synthetic_event));
|
||||
if (key_event.type == KEYEVENT_CHAR) {
|
||||
result.SetType(blink::WebInputEvent::Type::kChar);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include "cef/libcef/browser/geometry_util.h"
|
||||
#include "cef/libcef/browser/native/window_delegate_view.h"
|
||||
#include "cef/libcef/browser/thread_util.h"
|
||||
#include "content/public/common/input/native_web_keyboard_event.h"
|
||||
#include "components/input/native_web_keyboard_event.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
||||
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
|
||||
#include "ui/aura/window.h"
|
||||
@@ -375,7 +375,7 @@ void CefBrowserPlatformDelegateNativeWin::ViewText(const std::string& text) {
|
||||
}
|
||||
|
||||
bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) {
|
||||
const input::NativeWebKeyboardEvent& event) {
|
||||
// Any unhandled keyboard/character messages are sent to DefWindowProc so that
|
||||
// shortcut keys work correctly.
|
||||
if (event.os_event) {
|
||||
@@ -409,7 +409,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
|
||||
UINT scan_code = ::MapVirtualKeyW(event.windows_key_code, MAPVK_VK_TO_VSC);
|
||||
msg.lParam = (scan_code << 16) | // key scan code
|
||||
1; // key repeat count
|
||||
if (event.GetModifiers() & content::NativeWebKeyboardEvent::kAltKey) {
|
||||
if (event.GetModifiers() & input::NativeWebKeyboardEvent::kAltKey) {
|
||||
msg.lParam |= (1 << 29);
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ bool CefBrowserPlatformDelegateNativeWin::HandleKeyboardEvent(
|
||||
}
|
||||
|
||||
CefEventHandle CefBrowserPlatformDelegateNativeWin::GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const {
|
||||
const input::NativeWebKeyboardEvent& event) const {
|
||||
if (!event.os_event) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -29,10 +29,9 @@ class CefBrowserPlatformDelegateNativeWin
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
void SizeTo(int width, int height) override;
|
||||
void ViewText(const std::string& text) override;
|
||||
bool HandleKeyboardEvent(
|
||||
const content::NativeWebKeyboardEvent& event) override;
|
||||
bool HandleKeyboardEvent(const input::NativeWebKeyboardEvent& event) override;
|
||||
CefEventHandle GetEventHandle(
|
||||
const content::NativeWebKeyboardEvent& event) const override;
|
||||
const input::NativeWebKeyboardEvent& event) const override;
|
||||
|
||||
// CefBrowserPlatformDelegateNativeAura methods:
|
||||
ui::KeyEvent TranslateUiKeyEvent(const CefKeyEvent& key_event) const override;
|
||||
|
@@ -37,7 +37,8 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
|
||||
// See CalculateWindowStylesFromInitParams in
|
||||
// ui/views/widget/widget_hwnd_utils.cc for the conversion of |params| to
|
||||
// Windows style flags.
|
||||
views::Widget::InitParams params;
|
||||
views::Widget::InitParams params(
|
||||
views::Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET);
|
||||
params.parent_widget = parent_widget;
|
||||
params.bounds = bounds;
|
||||
params.delegate = this;
|
||||
|
Reference in New Issue
Block a user