diff --git a/include/capi/cef_browser_capi.h b/include/capi/cef_browser_capi.h index f231cae8c2af23eb943ee436440f60545d634982..5fd85e30bd83ca53c25ef8252e154706940ac090 100644 --- a/include/capi/cef_browser_capi.h +++ b/include/capi/cef_browser_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=c8f99d2f23e74d0a2fbaf373dec8bd052ac95f67$ +// $hash=83a95a5618c4bab2aede7138fc9ab97542ce2777$ // #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ @@ -1352,6 +1352,19 @@ typedef struct _cef_browser_host_t { /// void(CEF_CALLBACK *set_nested_scroll_mode)(struct _cef_browser_host_t *self, int mode); + + /// + // Set the property values for width, height, and keyboard height + /// + void(CEF_CALLBACK *set_virtual_key_board_arg)( + struct _cef_browser_host_t *self, int32_t width, int32_t height, + double keyboard); + + /// + // Set the virtual keyboard to override the web status + /// + int(CEF_CALLBACK *should_virtual_keyboard_overlay)( + struct _cef_browser_host_t *self); } cef_browser_host_t; /// diff --git a/include/capi/cef_cookie_capi.h b/include/capi/cef_cookie_capi.h index 5131f9b3b4462206a8c020f94984699f20f4bbe5..85033314ec93279427c4d307b3e789bba4411203 100644 --- a/include/capi/cef_cookie_capi.h +++ b/include/capi/cef_cookie_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=cdba4ba5d7263e7659504384a7565cb56e1b1d11$ +// $hash=bfe7557738a68d638d3708e372b82632d6d06e7d$ // #ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ @@ -65,52 +65,49 @@ typedef struct _cef_cookie_manager_t { // Get whether this cookie manager can accpet and send cookies. Returns false // (0) if can't. /// - int(CEF_CALLBACK* is_accept_cookie_allowed)( - struct _cef_cookie_manager_t* self); + int(CEF_CALLBACK *is_accept_cookie_allowed)( + struct _cef_cookie_manager_t *self); /// // Set whether this cookie manager can accpet and send cookies. /// - void(CEF_CALLBACK* put_accept_cookie_enabled)( - struct _cef_cookie_manager_t* self, - int accept); + void(CEF_CALLBACK *put_accept_cookie_enabled)( + struct _cef_cookie_manager_t *self, int accept); /// // Gets whether cookies of third parties are allowed to be set. Returns false // (0) if can't. /// - int(CEF_CALLBACK* is_third_party_cookie_allowed)( - struct _cef_cookie_manager_t* self); + int(CEF_CALLBACK *is_third_party_cookie_allowed)( + struct _cef_cookie_manager_t *self); /// // Set whether cookies of third parties are allowed to be set. /// - void(CEF_CALLBACK* put_accept_third_party_cookie_enabled)( - struct _cef_cookie_manager_t* self, - int accept); + void(CEF_CALLBACK *put_accept_third_party_cookie_enabled)( + struct _cef_cookie_manager_t *self, int accept); /// // Get whether this cookie manager can accpet and send cookies for file scheme // URL. Returns false (0) if can't. /// - int(CEF_CALLBACK* is_file_urlscheme_cookies_allowed)( - struct _cef_cookie_manager_t* self); + int(CEF_CALLBACK *is_file_urlscheme_cookies_allowed)( + struct _cef_cookie_manager_t *self); /// // Set whether this cookie manager can accpet and send cookies for file scheme // URL. /// - void(CEF_CALLBACK* put_accept_file_urlscheme_cookies_enabled)( - struct _cef_cookie_manager_t* self, - int allow); + void(CEF_CALLBACK *put_accept_file_urlscheme_cookies_enabled)( + struct _cef_cookie_manager_t *self, int allow); /// // Visit all cookies on the UI thread. The returned cookies are ordered by // longest path, then by earliest creation date. Returns false (0) if cookies // cannot be accessed. /// - int(CEF_CALLBACK* visit_all_cookies)(struct _cef_cookie_manager_t* self, - struct _cef_cookie_visitor_t* visitor, + int(CEF_CALLBACK *visit_all_cookies)(struct _cef_cookie_manager_t *self, + struct _cef_cookie_visitor_t *visitor, int is_sync); /// @@ -120,10 +117,10 @@ typedef struct _cef_cookie_manager_t { // cookies are ordered by longest path, then by earliest creation date. // Returns false (0) if cookies cannot be accessed. /// - int(CEF_CALLBACK* visit_url_cookies)(struct _cef_cookie_manager_t* self, - const cef_string_t* url, + int(CEF_CALLBACK *visit_url_cookies)(struct _cef_cookie_manager_t *self, + const cef_string_t *url, int includeHttpOnly, - struct _cef_cookie_visitor_t* visitor, + struct _cef_cookie_visitor_t *visitor, int is_sync); /// @@ -135,10 +132,10 @@ typedef struct _cef_cookie_manager_t { // asnychronously on the UI thread after the cookie has been set. Returns // false (0) if an invalid URL is specified or if cookies cannot be accessed. /// - int(CEF_CALLBACK* set_cookie)(struct _cef_cookie_manager_t* self, - const cef_string_t* url, - const struct _cef_cookie_t* cookie, - struct _cef_set_cookie_callback_t* callback, + int(CEF_CALLBACK *set_cookie)(struct _cef_cookie_manager_t *self, + const cef_string_t *url, + const struct _cef_cookie_t *cookie, + struct _cef_set_cookie_callback_t *callback, int is_sync); /// @@ -152,21 +149,18 @@ typedef struct _cef_cookie_manager_t { // or if cookies cannot be accessed. Cookies can alternately be deleted using // the Visit*Cookies() functions. /// - int(CEF_CALLBACK* delete_cookies)( - struct _cef_cookie_manager_t* self, - const cef_string_t* url, - const cef_string_t* cookie_name, - int is_session, - struct _cef_delete_cookies_callback_t* callback, - int is_sync); + int(CEF_CALLBACK *delete_cookies)( + struct _cef_cookie_manager_t *self, const cef_string_t *url, + const cef_string_t *cookie_name, int is_session, + struct _cef_delete_cookies_callback_t *callback, int is_sync); /// // Flush the backing store (if any) to disk. If |callback| is non-NULL it will // be executed asnychronously on the UI thread after the flush is complete. // Returns false (0) if cookies cannot be accessed. /// - int(CEF_CALLBACK* flush_store)(struct _cef_cookie_manager_t* self, - struct _cef_completion_callback_t* callback); + int(CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t *self, + struct _cef_completion_callback_t *callback); } cef_cookie_manager_t; /// @@ -174,20 +168,20 @@ typedef struct _cef_cookie_manager_t { // CefSettings.cache_path if specified or in memory otherwise. If |callback| is // non-NULL it will be executed asnychronously on the UI thread after the // manager's storage has been initialized. Using this function is equivalent to -// calling cef_request_context_t::cef_request_context_get_global_context()->GetD -// efaultCookieManager(). +// calling cef_request_context_t::cef_request_context_get_global_context()- +// >GetDefaultCookieManager(). /// -CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager( - struct _cef_completion_callback_t* callback); +CEF_EXPORT cef_cookie_manager_t *cef_cookie_manager_get_global_manager( + struct _cef_completion_callback_t *callback); /// // Convert string cookie to CefCookie. The function will return true (1) when // excuted success, otherwise return false (0). /// -CEF_EXPORT int cef_cookie_manager_create_cef_cookie( - const cef_string_t* url, - const cef_string_t* value, - struct _cef_cookie_t* cef_cookie); +CEF_EXPORT int +cef_cookie_manager_create_cef_cookie(const cef_string_t *url, + const cef_string_t *value, + struct _cef_cookie_t *cef_cookie); /// // Structure to implement for visiting cookie values. The functions of this @@ -206,19 +200,17 @@ typedef struct _cef_cookie_visitor_t { // Return false (0) to stop visiting cookies. This function may never be // called if no cookies are found. /// - int(CEF_CALLBACK* visit)(struct _cef_cookie_visitor_t* self, - const struct _cef_cookie_t* cookie, - int count, - int total, - int* deleteCookie); + int(CEF_CALLBACK *visit)(struct _cef_cookie_visitor_t *self, + const struct _cef_cookie_t *cookie, int count, + int total, int *deleteCookie); /// // Method that will be called when all cookies have been visited, contenate // them into one string line. The string cookie line will be passed into this // function. /// - void(CEF_CALLBACK* set_cookie_line)(struct _cef_cookie_visitor_t* self, - const cef_string_t* cookieLine); + void(CEF_CALLBACK *set_cookie_line)(struct _cef_cookie_visitor_t *self, + const cef_string_t *cookieLine); } cef_cookie_visitor_t; /// @@ -235,7 +227,7 @@ typedef struct _cef_set_cookie_callback_t { // Method that will be called upon completion. |success| will be true (1) if // the cookie was set successfully. /// - void(CEF_CALLBACK* on_complete)(struct _cef_set_cookie_callback_t* self, + void(CEF_CALLBACK *on_complete)(struct _cef_set_cookie_callback_t *self, int success); } cef_set_cookie_callback_t; @@ -253,7 +245,7 @@ typedef struct _cef_delete_cookies_callback_t { // Method that will be called upon completion. |num_deleted| will be the // number of cookies that were deleted. /// - void(CEF_CALLBACK* on_complete)(struct _cef_delete_cookies_callback_t* self, + void(CEF_CALLBACK *on_complete)(struct _cef_delete_cookies_callback_t *self, int num_deleted); } cef_delete_cookies_callback_t; @@ -261,4 +253,4 @@ typedef struct _cef_delete_cookies_callback_t { } #endif -#endif // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ +#endif // CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ diff --git a/include/capi/cef_scheme_capi.h b/include/capi/cef_scheme_capi.h index fa07fd7691c7ab22b21f46d47aba1361261d5938..4a97ff9815f9e2e78b0cc3cf8060cd6491c145a0 100644 --- a/include/capi/cef_scheme_capi.h +++ b/include/capi/cef_scheme_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=2dd528ca9ff88be60782b87036f464a6bd6e69a5$ +// $hash=94ca93e838c9509f2bafc994b034634bb02c68a6$ // #ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ @@ -72,8 +72,8 @@ typedef struct _cef_scheme_registrar_t { // per unique |scheme_name| value. If |scheme_name| is already registered or // if an error occurs this function will return false (0). /// - int(CEF_CALLBACK* add_custom_scheme)(struct _cef_scheme_registrar_t* self, - const cef_string_t* scheme_name, + int(CEF_CALLBACK *add_custom_scheme)(struct _cef_scheme_registrar_t *self, + const cef_string_t *scheme_name, int options); } cef_scheme_registrar_t; @@ -96,12 +96,10 @@ typedef struct _cef_scheme_handler_factory_t { // example, if the request came from cef_urlrequest_t). The |request| object // passed to this function cannot be modified. /// - struct _cef_resource_handler_t*(CEF_CALLBACK* create)( - struct _cef_scheme_handler_factory_t* self, - struct _cef_browser_t* browser, - struct _cef_frame_t* frame, - const cef_string_t* scheme_name, - struct _cef_request_t* request); + struct _cef_resource_handler_t *(CEF_CALLBACK *create)( + struct _cef_scheme_handler_factory_t *self, + struct _cef_browser_t *browser, struct _cef_frame_t *frame, + const cef_string_t *scheme_name, struct _cef_request_t *request); } cef_scheme_handler_factory_t; /// @@ -116,20 +114,20 @@ typedef struct _cef_scheme_handler_factory_t { // matches the specified |scheme_name| and optional |domain_name|. Returns false // (0) if an error occurs. This function may be called on any thread in the // browser process. Using this function is equivalent to calling cef_request_con -// text_t::cef_request_context_get_global_context()->register_scheme_handler_fac -// tory(). +// text_t::cef_request_context_get_global_context()- +// >register_scheme_handler_factory(). /// -CEF_EXPORT int cef_register_scheme_handler_factory( - const cef_string_t* scheme_name, - const cef_string_t* domain_name, - cef_scheme_handler_factory_t* factory); +CEF_EXPORT int +cef_register_scheme_handler_factory(const cef_string_t *scheme_name, + const cef_string_t *domain_name, + cef_scheme_handler_factory_t *factory); /// // Clear all scheme handler factories registered with the global request // context. Returns false (0) on error. This function may be called on any // thread in the browser process. Using this function is equivalent to calling c -// ef_request_context_t::cef_request_context_get_global_context()->clear_scheme_ -// handler_factories(). +// ef_request_context_t::cef_request_context_get_global_context()- +// >clear_scheme_handler_factories(). /// CEF_EXPORT int cef_clear_scheme_handler_factories(); @@ -137,4 +135,4 @@ CEF_EXPORT int cef_clear_scheme_handler_factories(); } #endif -#endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ +#endif // CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index ef0cfdb63f4290d825a2b4f8da71baa953cf6d14..15f046a5ced729cb252a214aa904f96417150fc9 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -42,15 +42,15 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "7081ae4a766782e4e24c953f117be8e3f7e0f6c5" +#define CEF_API_HASH_UNIVERSAL "9818cbdcecc29679c4406caea9437b06c2756248" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "26c63f74fc69f811858c9a454eb6d01efa330087" +#define CEF_API_HASH_PLATFORM "23d8a5a69f3ce1cea46437f788618edadba7031a" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "88d1588f8655c6ca290efc1600830dab3a7d1a45" +#define CEF_API_HASH_PLATFORM "60d466ac35daf4ca9060fdf5bdf46d8a98de3ff7" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "08dbc5997f00d108be7db532f792ca9456e75075" +#define CEF_API_HASH_PLATFORM "801b95b5544e6eebdea2ec481fb73767575c5c00" #elif defined(OS_OHOS) -#define CEF_API_HASH_PLATFORM "08dbc5997f00d108be7db532f792ca9456e75075" +#define CEF_API_HASH_PLATFORM "801b95b5544e6eebdea2ec481fb73767575c5c00" #endif #ifdef __cplusplus diff --git a/include/cef_browser.h b/include/cef_browser.h index 92f965254c352f4007a4c5adf7dac9724f489edf..4942b3c4b2f37ee9f534c5c65193afbd4dccf06e 100644 --- a/include/cef_browser.h +++ b/include/cef_browser.h @@ -1450,6 +1450,20 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /// /*--cef()--*/ virtual void SetNestedScrollMode(int mode) = 0; + + /// + // Set the property values for width, height, and keyboard height + /// + /*--cef()--*/ + virtual void SetVirtualKeyBoardArg(int32_t width, + int32_t height, + double keyboard) = 0; + + /// + // Set the virtual keyboard to override the web status + /// + /*--cef()--*/ + virtual bool ShouldVirtualKeyboardOverlay() = 0; }; /// diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index 424bce7788f198affaf3034479fb40e3ff9abd98..83e935a7bccb1fc99f9f751e723d6923fca7a04e 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -2047,6 +2047,19 @@ void AlloyBrowserHostImpl::SetToken(void* token) { } }; +void AlloyBrowserHostImpl::SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard) { + if (platform_delegate_) { + platform_delegate_->SetVirtualKeyBoardArg(width, height, keyboard); + } +}; + +bool AlloyBrowserHostImpl::ShouldVirtualKeyboardOverlay() { + if (platform_delegate_) { + return platform_delegate_->ShouldVirtualKeyboardOverlay(); + } + return false; +}; + void AlloyBrowserHostImpl::ContentsZoomChange(bool zoom_in) { double curFactor = GetZoomLevel(); double tempZoomFactor = zoom_in ? curFactor + 2.0 : curFactor - 2.0; diff --git a/libcef/browser/alloy/alloy_browser_host_impl.h b/libcef/browser/alloy/alloy_browser_host_impl.h index 1e31842a4d4eefb010df699b86ca38a388ac95f5..7bd27d9473ce1ee6fa51ab0e7d08cba3f34149dc 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/libcef/browser/alloy/alloy_browser_host_impl.h @@ -206,6 +206,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, void SetToken(void* token) override; void ContentsZoomChange(bool zoom_in) override; void SetNestedScrollMode(int mode) override; + void SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard) override; + bool ShouldVirtualKeyboardOverlay() override; #else bool HandleContextMenu(content::WebContents* web_contents, const content::ContextMenuParams& params); diff --git a/libcef/browser/browser_platform_delegate.h b/libcef/browser/browser_platform_delegate.h index 49d239ec886fdc79800e6f4c7e61dce8151e4865..7ddd10538dfcf4079b2096b85036bc0de1eabcab 100644 --- a/libcef/browser/browser_platform_delegate.h +++ b/libcef/browser/browser_platform_delegate.h @@ -395,6 +395,9 @@ class CefBrowserPlatformDelegate { virtual void WasKeyboardResized() {}; virtual void SetToken(void* token) {}; virtual void SetNestedScrollMode(int mode) {}; + virtual void SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard){}; + virtual bool ShouldVirtualKeyboardOverlay(){return false;}; + #endif protected: // Allow deletion via std::unique_ptr only. diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 5006c2f0bcc97a1531273e7a159f8e2496054811..647b90431550f93d18442c7a7283ed7cef2e7c4c 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -819,4 +819,18 @@ void CefBrowserPlatformDelegateOsr::SetNestedScrollMode(int mode) { if (view) view->SetNestedScrollMode(mode); } + +void CefBrowserPlatformDelegateOsr::SetVirtualKeyBoardArg( + int32_t width, int32_t height, double keyboard) { + CefRenderWidgetHostViewOSR* view = GetOSRHostView(); + if (view) + view->SetVirtualKeyBoardArg(width, height, keyboard); +} + +bool CefBrowserPlatformDelegateOsr::ShouldVirtualKeyboardOverlay() { + CefRenderWidgetHostViewOSR* view = GetOSRHostView(); + if (view) + return view->ShouldVirtualKeyboardOverlayContent(); + return false; +} #endif diff --git a/libcef/browser/osr/browser_platform_delegate_osr.h b/libcef/browser/osr/browser_platform_delegate_osr.h index 190008aa490a28dee25a3e3f89a6d8393d994cc7..150d81a3907cbb900b94ee332cf5c55819b619cd 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.h +++ b/libcef/browser/osr/browser_platform_delegate_osr.h @@ -125,6 +125,8 @@ class CefBrowserPlatformDelegateOsr void SetShouldFrameSubmissionBeforeDraw(bool should) override; void WasKeyboardResized() override; void SetNestedScrollMode(int mode) override; + void SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard) override; + bool ShouldVirtualKeyboardOverlay() override; #endif // CefBrowserPlatformDelegateNative::WindowlessHandler methods: CefWindowHandle GetParentWindowHandle() const override; diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 2d1fe63173e79696f87caa8311b9110b8a4d48cc..67ffb8be53719f6dd35af5aa7fa8bd8716eff8cb 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -46,6 +46,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/content_switches.h" +#include "content/browser/renderer_host/frame_tree.h" #include "media/base/video_frame.h" #include "media/capture/mojom/video_capture_buffer.mojom.h" #include "services/device/public/mojom/screen_orientation.mojom.h" @@ -2480,3 +2481,31 @@ void CefRenderWidgetHostViewOSR::OnScrollState(bool scroll_state) { handler->OnScrollState(browser_impl_.get(), scroll_state); } } + +void CefRenderWidgetHostViewOSR::NotifyVirtualKeyboardOverlayRect( + const gfx::Rect& keyboard_rect) { + content::RenderFrameHostImpl* frame_host = render_widget_host()->frame_tree()->GetMainFrame(); + if(!frame_host){ + return; + } + frame_host->GetPage().NotifyVirtualKeyboardOverlayRect(keyboard_rect); +} + +bool CefRenderWidgetHostViewOSR::ShouldVirtualKeyboardOverlayContent() { + content::RenderFrameHostImpl* frame_host = render_widget_host()->frame_tree()->GetMainFrame(); + return frame_host && + frame_host->GetPage().virtual_keyboard_overlays_content(); +} + +void CefRenderWidgetHostViewOSR::SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard) { + LOG(DEBUG) << "CefRenderWidgetHostViewOSR::SetVirtualKeyBoardArg ; width = " + << width << "height = " << height << "keyboard = " << keyboard; + gfx::Rect keyboard_rect; + keyboard_rect.set_x(0); + keyboard_rect.set_y(0); + keyboard_rect.set_width(width); + keyboard_rect.set_height(keyboard); + if(ShouldVirtualKeyboardOverlayContent()){ + NotifyVirtualKeyboardOverlayRect(keyboard_rect); + } +} diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 29e9f15251a4374c6bd93003b6e0a2275c739ae1..041def6cfcdcb256ee163d43bab07c974c0fad48 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -188,10 +188,12 @@ class CefRenderWidgetHostViewOSR #if !BUILDFLAG(IS_MAC) viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties( const cc::RenderFrameMetadata& metadata) override; + void NotifyVirtualKeyboardOverlayRect(const gfx::Rect& keyboard_rect) override; + bool ShouldVirtualKeyboardOverlayContent() override; #endif void SetShouldFrameSubmissionBeforeDraw(bool should); - + void SetVirtualKeyBoardArg(int32_t width, int32_t height, double keyboard); viz::SurfaceId GetCurrentSurfaceId() const override; void ImeCompositionRangeChanged( const gfx::Range& range, diff --git a/libcef_dll/cpptoc/browser_host_cpptoc.cc b/libcef_dll/cpptoc/browser_host_cpptoc.cc index eac9d8f4d4ef8bdcedc8186542f99ef0e8409a60..63c228fac0f319dd6b893753487ceca1501f1609 100644 --- a/libcef_dll/cpptoc/browser_host_cpptoc.cc +++ b/libcef_dll/cpptoc/browser_host_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=589ec555823e8cc830050400cc736387c94933a6$ +// $hash=6dceea9df559f7a4fa814655b93746e4d32d266a$ // #include "libcef_dll/cpptoc/browser_host_cpptoc.h" @@ -2246,6 +2246,40 @@ void CEF_CALLBACK browser_host_set_nested_scroll_mode( CefBrowserHostCppToC::Get(self)->SetNestedScrollMode(mode); } +void CEF_CALLBACK browser_host_set_virtual_key_board_arg( + struct _cef_browser_host_t *self, int32_t width, int32_t height, + double keyboard) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefBrowserHostCppToC::Get(self)->SetVirtualKeyBoardArg(width, height, + keyboard); +} + +int CEF_CALLBACK +browser_host_should_virtual_keyboard_overlay(struct _cef_browser_host_t *self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + bool _retval = + CefBrowserHostCppToC::Get(self)->ShouldVirtualKeyboardOverlay(); + + // Return type: bool + return _retval; +} + } // namespace // CONSTRUCTOR - Do not edit by hand. @@ -2382,6 +2416,10 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() { GetStruct()->set_window_id = browser_host_set_window_id; GetStruct()->set_token = browser_host_set_token; GetStruct()->set_nested_scroll_mode = browser_host_set_nested_scroll_mode; + GetStruct()->set_virtual_key_board_arg = + browser_host_set_virtual_key_board_arg; + GetStruct()->should_virtual_keyboard_overlay = + browser_host_should_virtual_keyboard_overlay; } // DESTRUCTOR - Do not edit by hand. diff --git a/libcef_dll/ctocpp/browser_host_ctocpp.cc b/libcef_dll/ctocpp/browser_host_ctocpp.cc index 1f3e7ea0fd48d1273ae89e0f4ddedc5c472ff69f..ffc7219c80eea3d5dd7767d6d761517479d0aa06 100644 --- a/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ b/libcef_dll/ctocpp/browser_host_ctocpp.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c5a8a14f58353c4e2e98fbc4addd2cf4152a4b47$ +// $hash=7502a9f059e64917da6f4596dec1538807f208ae$ // #include "libcef_dll/ctocpp/browser_host_ctocpp.h" @@ -2057,6 +2057,38 @@ void CefBrowserHostCToCpp::SetNestedScrollMode(int mode) { _struct->set_nested_scroll_mode(_struct, mode); } +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::SetVirtualKeyBoardArg(int32_t width, int32_t height, + double keyboard) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t *_struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, set_virtual_key_board_arg)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->set_virtual_key_board_arg(_struct, width, height, keyboard); +} + +NO_SANITIZE("cfi-icall") +bool CefBrowserHostCToCpp::ShouldVirtualKeyboardOverlay() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t *_struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, should_virtual_keyboard_overlay)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->should_virtual_keyboard_overlay(_struct); + + // Return type: bool + return _retval ? true : false; +} + // CONSTRUCTOR - Do not edit by hand. CefBrowserHostCToCpp::CefBrowserHostCToCpp() {} diff --git a/libcef_dll/ctocpp/browser_host_ctocpp.h b/libcef_dll/ctocpp/browser_host_ctocpp.h index 6192cd0fb49605fd5be6fb14b3a6da44186bf3dd..4a18df580dabfef63e341cc60f4a2a8b4b9f6167 100644 --- a/libcef_dll/ctocpp/browser_host_ctocpp.h +++ b/libcef_dll/ctocpp/browser_host_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3a992887bac05cc5408e2a2eaae2e0446efadd4$ +// $hash=90d09af162fca80f710d4a53d35c1881b36394c0$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ @@ -194,6 +194,9 @@ public: void SetWindowId(int window_id, int nweb_id) override; void SetToken(void *token) override; void SetNestedScrollMode(int mode) override; + void SetVirtualKeyBoardArg(int32_t width, int32_t height, + double keyboard) override; + bool ShouldVirtualKeyboardOverlay() override; }; #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_