Add CefRenderHandler::OnVirtualKeyboardRequested (issue #2607)

This commit is contained in:
Riku Palomäki
2019-02-26 16:49:41 +00:00
committed by Marshall Greenblatt
parent c72d57aa60
commit 379fb8d39e
10 changed files with 173 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7af995d59f8f171a08ea92b3b0c3428fb26f93ad$
// $hash=94f5afecaaa5c9c534438a1c97a4af27a97d148c$
//
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
@@ -500,6 +500,27 @@ render_handler_on_text_selection_changed(struct _cef_render_handler_t* self,
selected_rangeVal);
}
void CEF_CALLBACK
render_handler_on_virtual_keyboard_requested(struct _cef_render_handler_t* self,
cef_browser_t* browser,
cef_text_input_mode_t input_mode) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefRenderHandlerCppToC::Get(self)->OnVirtualKeyboardRequested(
CefBrowserCToCpp::Wrap(browser), input_mode);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
@@ -524,6 +545,8 @@ CefRenderHandlerCppToC::CefRenderHandlerCppToC() {
render_handler_on_ime_composition_range_changed;
GetStruct()->on_text_selection_changed =
render_handler_on_text_selection_changed;
GetStruct()->on_virtual_keyboard_requested =
render_handler_on_virtual_keyboard_requested;
}
// DESTRUCTOR - Do not edit by hand.

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=bb77b018f638f1bc43208d48a84b02696b9c055c$
// $hash=9a7d89bc978623c025c82f438eec0da543aaa7a6$
//
#include "libcef_dll/ctocpp/render_handler_ctocpp.h"
@@ -431,6 +431,28 @@ void CefRenderHandlerCToCpp::OnTextSelectionChanged(
&selected_range);
}
NO_SANITIZE("cfi-icall")
void CefRenderHandlerCToCpp::OnVirtualKeyboardRequested(
CefRefPtr<CefBrowser> browser,
TextInputMode input_mode) {
shutdown_checker::AssertNotShutdown();
cef_render_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_virtual_keyboard_requested))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Execute
_struct->on_virtual_keyboard_requested(
_struct, CefBrowserCppToC::Wrap(browser), input_mode);
}
// CONSTRUCTOR - Do not edit by hand.
CefRenderHandlerCToCpp::CefRenderHandlerCToCpp() {}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=f76bdd2d055df74b08fe6c77b40b68d908f20dc9$
// $hash=b4922b3f59c932edf64692772b300f231e588388$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_
@@ -77,6 +77,8 @@ class CefRenderHandlerCToCpp
void OnTextSelectionChanged(CefRefPtr<CefBrowser> browser,
const CefString& selected_text,
const CefRange& selected_range) override;
void OnVirtualKeyboardRequested(CefRefPtr<CefBrowser> browser,
TextInputMode input_mode) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_