Rename SendFocusEvent to SetFocus (fixes issue #866)
Also removes CefBrowserHost::SendFocusEvent. Use the existing SetFocus method instead.
This commit is contained in:
parent
a74fa88812
commit
41b64e428c
|
@ -33,7 +33,7 @@
|
||||||
// by hand. See the translator.README.txt file in the tools directory for
|
// by hand. See the translator.README.txt file in the tools directory for
|
||||||
// more information.
|
// more information.
|
||||||
//
|
//
|
||||||
// $hash=6e192c6e8a59c37e98e458578a287dd36b8ed90f$
|
// $hash=b83b96e2b90124bba8084e2df7f66cc6749df872$
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
#ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_
|
||||||
|
@ -681,12 +681,6 @@ typedef struct _cef_browser_host_t {
|
||||||
void(CEF_CALLBACK* send_touch_event)(struct _cef_browser_host_t* self,
|
void(CEF_CALLBACK* send_touch_event)(struct _cef_browser_host_t* self,
|
||||||
const struct _cef_touch_event_t* event);
|
const struct _cef_touch_event_t* event);
|
||||||
|
|
||||||
///
|
|
||||||
// Send a focus event to the browser.
|
|
||||||
///
|
|
||||||
void(CEF_CALLBACK* send_focus_event)(struct _cef_browser_host_t* self,
|
|
||||||
int setFocus);
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// Send a capture lost event to the browser.
|
// Send a capture lost event to the browser.
|
||||||
///
|
///
|
||||||
|
|
|
@ -42,13 +42,13 @@
|
||||||
// way that may cause binary incompatibility with other builds. The universal
|
// way that may cause binary incompatibility with other builds. The universal
|
||||||
// hash value will change if any platform is affected whereas the platform hash
|
// hash value will change if any platform is affected whereas the platform hash
|
||||||
// values will change only if that particular platform is affected.
|
// values will change only if that particular platform is affected.
|
||||||
#define CEF_API_HASH_UNIVERSAL "6198f526f7dcccda1b66b81826ac030c1f76fd15"
|
#define CEF_API_HASH_UNIVERSAL "1e47eac2e964bf96bdbe3b0d358f28d7a2057f51"
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#define CEF_API_HASH_PLATFORM "7b514a69fd70f75f8a7ddba848136a9cdd8182d4"
|
#define CEF_API_HASH_PLATFORM "f66e7db3f60e0ed5dd389277c9351c31ee71752b"
|
||||||
#elif defined(OS_MAC)
|
#elif defined(OS_MAC)
|
||||||
#define CEF_API_HASH_PLATFORM "e33e34f6268be00c7eb4a69bdc97d6f5f3bc6154"
|
#define CEF_API_HASH_PLATFORM "1911de75fc8837d4bf9dbab275406ca2b284be69"
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
#define CEF_API_HASH_PLATFORM "edbea2dd852cfcf63a0f57d7495e5d69e87f0052"
|
#define CEF_API_HASH_PLATFORM "2aecfcaaf2e017e4b56c38ab814b6d9b29b584e6"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -708,12 +708,6 @@ class CefBrowserHost : public virtual CefBaseRefCounted {
|
||||||
/*--cef()--*/
|
/*--cef()--*/
|
||||||
virtual void SendTouchEvent(const CefTouchEvent& event) = 0;
|
virtual void SendTouchEvent(const CefTouchEvent& event) = 0;
|
||||||
|
|
||||||
///
|
|
||||||
// Send a focus event to the browser.
|
|
||||||
///
|
|
||||||
/*--cef()--*/
|
|
||||||
virtual void SendFocusEvent(bool setFocus) = 0;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// Send a capture lost event to the browser.
|
// Send a capture lost event to the browser.
|
||||||
///
|
///
|
||||||
|
|
|
@ -365,7 +365,7 @@ void AlloyBrowserHostImpl::SetFocusInternal(bool focus) {
|
||||||
if (focus)
|
if (focus)
|
||||||
OnSetFocus(FOCUS_SOURCE_SYSTEM);
|
OnSetFocus(FOCUS_SOURCE_SYSTEM);
|
||||||
else if (platform_delegate_)
|
else if (platform_delegate_)
|
||||||
platform_delegate_->SendFocusEvent(false);
|
platform_delegate_->SetFocus(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
CefWindowHandle AlloyBrowserHostImpl::GetWindowHandle() {
|
CefWindowHandle AlloyBrowserHostImpl::GetWindowHandle() {
|
||||||
|
@ -653,10 +653,6 @@ void AlloyBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
|
||||||
platform_delegate_->SendTouchEvent(event);
|
platform_delegate_->SendTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlloyBrowserHostImpl::SendFocusEvent(bool setFocus) {
|
|
||||||
SetFocus(setFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AlloyBrowserHostImpl::SendCaptureLostEvent() {
|
void AlloyBrowserHostImpl::SendCaptureLostEvent() {
|
||||||
if (!CEF_CURRENTLY_ON_UIT()) {
|
if (!CEF_CURRENTLY_ON_UIT()) {
|
||||||
CEF_POST_TASK(
|
CEF_POST_TASK(
|
||||||
|
@ -818,7 +814,7 @@ void AlloyBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (platform_delegate_)
|
if (platform_delegate_)
|
||||||
platform_delegate_->SendFocusEvent(true);
|
platform_delegate_->SetFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlloyBrowserHostImpl::RunFileChooser(
|
void AlloyBrowserHostImpl::RunFileChooser(
|
||||||
|
|
|
@ -113,7 +113,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase,
|
||||||
void Invalidate(PaintElementType type) override;
|
void Invalidate(PaintElementType type) override;
|
||||||
void SendExternalBeginFrame() override;
|
void SendExternalBeginFrame() override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
|
||||||
void SendCaptureLostEvent() override;
|
void SendCaptureLostEvent() override;
|
||||||
void NotifyMoveOrResizeStarted() override;
|
void NotifyMoveOrResizeStarted() override;
|
||||||
int GetWindowlessFrameRate() override;
|
int GetWindowlessFrameRate() override;
|
||||||
|
|
|
@ -172,7 +172,7 @@ void CefBrowserPlatformDelegate::SendTouchEvent(const CefTouchEvent& event) {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegate::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegate::SetFocus(bool setFocus) {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ class CefBrowserPlatformDelegate {
|
||||||
|
|
||||||
// Send focus event. The browser's WebContents may be NULL when this method is
|
// Send focus event. The browser's WebContents may be NULL when this method is
|
||||||
// called.
|
// called.
|
||||||
virtual void SendFocusEvent(bool setFocus);
|
virtual void SetFocus(bool setFocus);
|
||||||
|
|
||||||
// Send capture lost event.
|
// Send capture lost event.
|
||||||
virtual void SendCaptureLostEvent();
|
virtual void SendCaptureLostEvent();
|
||||||
|
|
|
@ -273,10 +273,6 @@ void ChromeBrowserHostImpl::SendTouchEvent(const CefTouchEvent& event) {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChromeBrowserHostImpl::SendFocusEvent(bool setFocus) {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChromeBrowserHostImpl::SendCaptureLostEvent() {
|
void ChromeBrowserHostImpl::SendCaptureLostEvent() {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,6 @@ class ChromeBrowserHostImpl : public CefBrowserHostBase {
|
||||||
void Invalidate(PaintElementType type) override;
|
void Invalidate(PaintElementType type) override;
|
||||||
void SendExternalBeginFrame() override;
|
void SendExternalBeginFrame() override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
|
||||||
void SendCaptureLostEvent() override;
|
void SendCaptureLostEvent() override;
|
||||||
void NotifyMoveOrResizeStarted() override;
|
void NotifyMoveOrResizeStarted() override;
|
||||||
int GetWindowlessFrameRate() override;
|
int GetWindowlessFrameRate() override;
|
||||||
|
|
|
@ -77,7 +77,7 @@ void CefBrowserPlatformDelegateBackground::SendTouchEvent(
|
||||||
// Nothing to do here.
|
// Nothing to do here.
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateBackground::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateBackground::SetFocus(bool setFocus) {
|
||||||
// Nothing to do here.
|
// Nothing to do here.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CefBrowserPlatformDelegateBackground
|
||||||
int deltaX,
|
int deltaX,
|
||||||
int deltaY) override;
|
int deltaY) override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
void ViewText(const std::string& text) override;
|
void ViewText(const std::string& text) override;
|
||||||
bool HandleKeyboardEvent(
|
bool HandleKeyboardEvent(
|
||||||
|
|
|
@ -133,7 +133,7 @@ views::Widget* CefBrowserPlatformDelegateNativeLinux::GetWindowWidget() const {
|
||||||
return window_widget_;
|
return window_widget_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateNativeLinux::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateNativeLinux::SetFocus(bool setFocus) {
|
||||||
if (!setFocus)
|
if (!setFocus)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ class CefBrowserPlatformDelegateNativeLinux
|
||||||
void CloseHostWindow() override;
|
void CloseHostWindow() override;
|
||||||
CefWindowHandle GetHostWindowHandle() const override;
|
CefWindowHandle GetHostWindowHandle() const override;
|
||||||
views::Widget* GetWindowWidget() const override;
|
views::Widget* GetWindowWidget() const override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
void NotifyMoveOrResizeStarted() override;
|
void NotifyMoveOrResizeStarted() override;
|
||||||
void SizeTo(int width, int height) override;
|
void SizeTo(int width, int height) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CefBrowserPlatformDelegateNativeMac
|
||||||
int deltaX,
|
int deltaX,
|
||||||
int deltaY) override;
|
int deltaY) override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
void ViewText(const std::string& text) override;
|
void ViewText(const std::string& text) override;
|
||||||
bool HandleKeyboardEvent(
|
bool HandleKeyboardEvent(
|
||||||
|
|
|
@ -310,7 +310,7 @@ void CefBrowserPlatformDelegateNativeMac::SendTouchEvent(
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateNativeMac::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateNativeMac::SetFocus(bool setFocus) {
|
||||||
auto view = GetHostView();
|
auto view = GetHostView();
|
||||||
if (view) {
|
if (view) {
|
||||||
view->SetActive(setFocus);
|
view->SetActive(setFocus);
|
||||||
|
|
|
@ -243,7 +243,7 @@ views::Widget* CefBrowserPlatformDelegateNativeWin::GetWindowWidget() const {
|
||||||
return window_widget_;
|
return window_widget_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateNativeWin::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateNativeWin::SetFocus(bool setFocus) {
|
||||||
if (!setFocus)
|
if (!setFocus)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CefBrowserPlatformDelegateNativeWin
|
||||||
void CloseHostWindow() override;
|
void CloseHostWindow() override;
|
||||||
CefWindowHandle GetHostWindowHandle() const override;
|
CefWindowHandle GetHostWindowHandle() const override;
|
||||||
views::Widget* GetWindowWidget() const override;
|
views::Widget* GetWindowWidget() const override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
void NotifyMoveOrResizeStarted() override;
|
void NotifyMoveOrResizeStarted() override;
|
||||||
void SizeTo(int width, int height) override;
|
void SizeTo(int width, int height) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
|
|
|
@ -161,10 +161,10 @@ void CefBrowserPlatformDelegateOsr::SendTouchEvent(const CefTouchEvent& event) {
|
||||||
view->SendTouchEvent(event);
|
view->SendTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateOsr::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateOsr::SetFocus(bool setFocus) {
|
||||||
CefRenderWidgetHostViewOSR* view = GetOSRHostView();
|
CefRenderWidgetHostViewOSR* view = GetOSRHostView();
|
||||||
if (view)
|
if (view)
|
||||||
view->SendFocusEvent(setFocus);
|
view->SetFocus(setFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Point CefBrowserPlatformDelegateOsr::GetScreenPoint(
|
gfx::Point CefBrowserPlatformDelegateOsr::GetScreenPoint(
|
||||||
|
|
|
@ -42,7 +42,7 @@ class CefBrowserPlatformDelegateOsr
|
||||||
int deltaX,
|
int deltaX,
|
||||||
int deltaY) override;
|
int deltaY) override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
void ViewText(const std::string& text) override;
|
void ViewText(const std::string& text) override;
|
||||||
bool HandleKeyboardEvent(
|
bool HandleKeyboardEvent(
|
||||||
|
|
|
@ -1305,7 +1305,7 @@ bool CefRenderWidgetHostViewOSR::ShouldRouteEvents() const {
|
||||||
return !!render_widget_host_->delegate()->GetInputEventRouter();
|
return !!render_widget_host_->delegate()->GetInputEventRouter();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::SendFocusEvent(bool focus) {
|
void CefRenderWidgetHostViewOSR::SetFocus(bool focus) {
|
||||||
if (!render_widget_host_)
|
if (!render_widget_host_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ class CefRenderWidgetHostViewOSR
|
||||||
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
|
void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
|
||||||
void SendTouchEvent(const CefTouchEvent& event);
|
void SendTouchEvent(const CefTouchEvent& event);
|
||||||
bool ShouldRouteEvents() const;
|
bool ShouldRouteEvents() const;
|
||||||
void SendFocusEvent(bool focus);
|
void SetFocus(bool focus);
|
||||||
void UpdateFrameRate();
|
void UpdateFrameRate();
|
||||||
|
|
||||||
gfx::Size SizeInPixels();
|
gfx::Size SizeInPixels();
|
||||||
|
|
|
@ -217,7 +217,7 @@ void CefBrowserPlatformDelegateViews::SendTouchEvent(
|
||||||
native_delegate_->SendTouchEvent(event);
|
native_delegate_->SendTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateViews::SendFocusEvent(bool setFocus) {
|
void CefBrowserPlatformDelegateViews::SetFocus(bool setFocus) {
|
||||||
// Will activate the Widget and result in a call to WebContents::Focus().
|
// Will activate the Widget and result in a call to WebContents::Focus().
|
||||||
if (setFocus && browser_view_->root_view()) {
|
if (setFocus && browser_view_->root_view()) {
|
||||||
if (auto widget = GetWindowWidget()) {
|
if (auto widget = GetWindowWidget()) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class CefBrowserPlatformDelegateViews
|
||||||
int deltaX,
|
int deltaX,
|
||||||
int deltaY) override;
|
int deltaY) override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
void SetFocus(bool setFocus) override;
|
||||||
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
gfx::Point GetScreenPoint(const gfx::Point& view) const override;
|
||||||
void ViewText(const std::string& text) override;
|
void ViewText(const std::string& text) override;
|
||||||
bool HandleKeyboardEvent(
|
bool HandleKeyboardEvent(
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=0109529f61a92116f73bc6c0ff47bfd0423b6f07$
|
// $hash=08a83d2956014971961d1cf3f93afbc1dae48f76$
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
|
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
|
||||||
|
@ -874,20 +874,6 @@ browser_host_send_touch_event(struct _cef_browser_host_t* self,
|
||||||
CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventObj);
|
CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEF_CALLBACK
|
|
||||||
browser_host_send_focus_event(struct _cef_browser_host_t* self, int setFocus) {
|
|
||||||
shutdown_checker::AssertNotShutdown();
|
|
||||||
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
DCHECK(self);
|
|
||||||
if (!self)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Execute
|
|
||||||
CefBrowserHostCppToC::Get(self)->SendFocusEvent(setFocus ? true : false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CEF_CALLBACK
|
void CEF_CALLBACK
|
||||||
browser_host_send_capture_lost_event(struct _cef_browser_host_t* self) {
|
browser_host_send_capture_lost_event(struct _cef_browser_host_t* self) {
|
||||||
shutdown_checker::AssertNotShutdown();
|
shutdown_checker::AssertNotShutdown();
|
||||||
|
@ -1350,7 +1336,6 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() {
|
||||||
GetStruct()->send_mouse_move_event = browser_host_send_mouse_move_event;
|
GetStruct()->send_mouse_move_event = browser_host_send_mouse_move_event;
|
||||||
GetStruct()->send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
|
GetStruct()->send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
|
||||||
GetStruct()->send_touch_event = browser_host_send_touch_event;
|
GetStruct()->send_touch_event = browser_host_send_touch_event;
|
||||||
GetStruct()->send_focus_event = browser_host_send_focus_event;
|
|
||||||
GetStruct()->send_capture_lost_event = browser_host_send_capture_lost_event;
|
GetStruct()->send_capture_lost_event = browser_host_send_capture_lost_event;
|
||||||
GetStruct()->notify_move_or_resize_started =
|
GetStruct()->notify_move_or_resize_started =
|
||||||
browser_host_notify_move_or_resize_started;
|
browser_host_notify_move_or_resize_started;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=e53c3c194d40a9bdee41a348a1c9fd65822e4ba9$
|
// $hash=791e5fd2deefd0e040143477a6ae53593886e706$
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
#include "libcef_dll/ctocpp/browser_host_ctocpp.h"
|
||||||
|
@ -764,20 +764,6 @@ void CefBrowserHostCToCpp::SendTouchEvent(const CefTouchEvent& event) {
|
||||||
_struct->send_touch_event(_struct, &event);
|
_struct->send_touch_event(_struct, &event);
|
||||||
}
|
}
|
||||||
|
|
||||||
NO_SANITIZE("cfi-icall")
|
|
||||||
void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) {
|
|
||||||
shutdown_checker::AssertNotShutdown();
|
|
||||||
|
|
||||||
cef_browser_host_t* _struct = GetStruct();
|
|
||||||
if (CEF_MEMBER_MISSING(_struct, send_focus_event))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
||||||
|
|
||||||
// Execute
|
|
||||||
_struct->send_focus_event(_struct, setFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SendCaptureLostEvent() {
|
NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SendCaptureLostEvent() {
|
||||||
shutdown_checker::AssertNotShutdown();
|
shutdown_checker::AssertNotShutdown();
|
||||||
|
|
||||||
|
@ -1015,8 +1001,8 @@ void CefBrowserHostCToCpp::DragSourceSystemDragEnded() {
|
||||||
}
|
}
|
||||||
|
|
||||||
NO_SANITIZE("cfi-icall")
|
NO_SANITIZE("cfi-icall")
|
||||||
CefRefPtr<
|
CefRefPtr<CefNavigationEntry>
|
||||||
CefNavigationEntry> CefBrowserHostCToCpp::GetVisibleNavigationEntry() {
|
CefBrowserHostCToCpp::GetVisibleNavigationEntry() {
|
||||||
shutdown_checker::AssertNotShutdown();
|
shutdown_checker::AssertNotShutdown();
|
||||||
|
|
||||||
cef_browser_host_t* _struct = GetStruct();
|
cef_browser_host_t* _struct = GetStruct();
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// implementations. See the translator.README.txt file in the tools directory
|
// implementations. See the translator.README.txt file in the tools directory
|
||||||
// for more information.
|
// for more information.
|
||||||
//
|
//
|
||||||
// $hash=0de1d0125514efd66096e5e900938b6481f0ec1d$
|
// $hash=1c231cf78fe94d9e395fe8bee9c0c848d81f3ef5$
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_
|
||||||
|
@ -102,7 +102,6 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp,
|
||||||
int deltaX,
|
int deltaX,
|
||||||
int deltaY) override;
|
int deltaY) override;
|
||||||
void SendTouchEvent(const CefTouchEvent& event) override;
|
void SendTouchEvent(const CefTouchEvent& event) override;
|
||||||
void SendFocusEvent(bool setFocus) override;
|
|
||||||
void SendCaptureLostEvent() override;
|
void SendCaptureLostEvent() override;
|
||||||
void NotifyMoveOrResizeStarted() override;
|
void NotifyMoveOrResizeStarted() override;
|
||||||
int GetWindowlessFrameRate() override;
|
int GetWindowlessFrameRate() override;
|
||||||
|
|
|
@ -1041,7 +1041,7 @@ void BrowserWindowOsrGtk::Show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give focus to the browser.
|
// Give focus to the browser.
|
||||||
browser_->GetHost()->SendFocusEvent(true);
|
browser_->GetHost()->SetFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindowOsrGtk::Hide() {
|
void BrowserWindowOsrGtk::Hide() {
|
||||||
|
@ -1051,7 +1051,7 @@ void BrowserWindowOsrGtk::Hide() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Remove focus from the browser.
|
// Remove focus from the browser.
|
||||||
browser_->GetHost()->SendFocusEvent(false);
|
browser_->GetHost()->SetFocus(false);
|
||||||
|
|
||||||
if (!hidden_) {
|
if (!hidden_) {
|
||||||
// Set the browser as hidden.
|
// Set the browser as hidden.
|
||||||
|
@ -1648,7 +1648,7 @@ gint BrowserWindowOsrGtk::FocusEvent(GtkWidget* widget,
|
||||||
BrowserWindowOsrGtk* self) {
|
BrowserWindowOsrGtk* self) {
|
||||||
// May be called on the main thread and the UI thread.
|
// May be called on the main thread and the UI thread.
|
||||||
if (self->browser_.get())
|
if (self->browser_.get())
|
||||||
self->browser_->GetHost()->SendFocusEvent(event->in == TRUE);
|
self->browser_->GetHost()->SetFocus(event->in == TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,7 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
|
||||||
- (BOOL)becomeFirstResponder {
|
- (BOOL)becomeFirstResponder {
|
||||||
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
||||||
if (browser.get()) {
|
if (browser.get()) {
|
||||||
browser->GetHost()->SendFocusEvent(true);
|
browser->GetHost()->SetFocus(true);
|
||||||
return [super becomeFirstResponder];
|
return [super becomeFirstResponder];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ NSPoint ConvertPointFromWindowToScreen(NSWindow* window, NSPoint point) {
|
||||||
- (BOOL)resignFirstResponder {
|
- (BOOL)resignFirstResponder {
|
||||||
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
CefRefPtr<CefBrowser> browser = [self getBrowser];
|
||||||
if (browser.get()) {
|
if (browser.get()) {
|
||||||
browser->GetHost()->SendFocusEvent(false);
|
browser->GetHost()->SetFocus(false);
|
||||||
return [super resignFirstResponder];
|
return [super resignFirstResponder];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1431,7 +1431,7 @@ void BrowserWindowOsrMacImpl::Show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give focus to the browser.
|
// Give focus to the browser.
|
||||||
browser_window_.browser_->GetHost()->SendFocusEvent(true);
|
browser_window_.browser_->GetHost()->SetFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserWindowOsrMacImpl::Hide() {
|
void BrowserWindowOsrMacImpl::Hide() {
|
||||||
|
@ -1441,7 +1441,7 @@ void BrowserWindowOsrMacImpl::Hide() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Remove focus from the browser.
|
// Remove focus from the browser.
|
||||||
browser_window_.browser_->GetHost()->SendFocusEvent(false);
|
browser_window_.browser_->GetHost()->SetFocus(false);
|
||||||
|
|
||||||
if (!hidden_) {
|
if (!hidden_) {
|
||||||
// Set the browser as hidden.
|
// Set the browser as hidden.
|
||||||
|
|
|
@ -202,7 +202,7 @@ void OsrWindowWin::Show() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Give focus to the browser.
|
// Give focus to the browser.
|
||||||
browser_->GetHost()->SendFocusEvent(true);
|
browser_->GetHost()->SetFocus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OsrWindowWin::Hide() {
|
void OsrWindowWin::Hide() {
|
||||||
|
@ -216,7 +216,7 @@ void OsrWindowWin::Hide() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Remove focus from the browser.
|
// Remove focus from the browser.
|
||||||
browser_->GetHost()->SendFocusEvent(false);
|
browser_->GetHost()->SetFocus(false);
|
||||||
|
|
||||||
if (!hidden_) {
|
if (!hidden_) {
|
||||||
// Set the browser as hidden.
|
// Set the browser as hidden.
|
||||||
|
@ -762,7 +762,7 @@ void OsrWindowWin::OnSize() {
|
||||||
|
|
||||||
void OsrWindowWin::OnFocus(bool setFocus) {
|
void OsrWindowWin::OnFocus(bool setFocus) {
|
||||||
if (browser_)
|
if (browser_)
|
||||||
browser_->GetHost()->SendFocusEvent(setFocus);
|
browser_->GetHost()->SetFocus(setFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OsrWindowWin::OnCaptureLost() {
|
void OsrWindowWin::OnCaptureLost() {
|
||||||
|
|
|
@ -548,7 +548,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||||
case OSR_TEST_FOCUS:
|
case OSR_TEST_FOCUS:
|
||||||
if (StartTest()) {
|
if (StartTest()) {
|
||||||
// body.onfocus will make LI00 red
|
// body.onfocus will make LI00 red
|
||||||
browser->GetHost()->SendFocusEvent(true);
|
browser->GetHost()->SetFocus(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OSR_TEST_TAKE_FOCUS:
|
case OSR_TEST_TAKE_FOCUS:
|
||||||
|
@ -566,7 +566,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||||
break;
|
break;
|
||||||
case OSR_TEST_GOT_FOCUS:
|
case OSR_TEST_GOT_FOCUS:
|
||||||
if (StartTest()) {
|
if (StartTest()) {
|
||||||
browser->GetHost()->SendFocusEvent(true);
|
browser->GetHost()->SetFocus(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OSR_TEST_CURSOR:
|
case OSR_TEST_CURSOR:
|
||||||
|
@ -750,7 +750,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||||
ExpandDropDown();
|
ExpandDropDown();
|
||||||
// Wait for the first popup paint to occur
|
// Wait for the first popup paint to occur
|
||||||
} else if (type == PET_POPUP) {
|
} else if (type == PET_POPUP) {
|
||||||
browser->GetHost()->SendFocusEvent(false);
|
browser->GetHost()->SetFocus(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OSR_TEST_POPUP_HIDE_ON_ESC:
|
case OSR_TEST_POPUP_HIDE_ON_ESC:
|
||||||
|
@ -1422,7 +1422,7 @@ class OSRTestHandler : public RoutingTestHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExpandDropDown() {
|
void ExpandDropDown() {
|
||||||
GetBrowser()->GetHost()->SendFocusEvent(true);
|
GetBrowser()->GetHost()->SetFocus(true);
|
||||||
CefMouseEvent mouse_event;
|
CefMouseEvent mouse_event;
|
||||||
|
|
||||||
const CefRect& LI11select = GetElementBounds("LI11select");
|
const CefRect& LI11select = GetElementBounds("LI11select");
|
||||||
|
|
Loading…
Reference in New Issue