2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2014-07-01 00:30:29 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-03-08 13:44:56 +01:00
|
|
|
// $hash=2ef28289570e9eba45c5e2bb87c94e7e8e51ed0e$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/ctocpp/render_handler_ctocpp.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/drag_data_cpptoc.h"
|
2017-05-12 20:28:25 +02:00
|
|
|
#include "libcef_dll/ctocpp/accessibility_handler_ctocpp.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2022-01-06 19:34:35 +01:00
|
|
|
CefRefPtr<CefAccessibilityHandler>
|
|
|
|
CefRenderHandlerCToCpp::GetAccessibilityHandler() {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-05-12 20:28:25 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_accessibility_handler)) {
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-05-12 20:28:25 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_accessibility_handler_t* _retval =
|
|
|
|
_struct->get_accessibility_handler(_struct);
|
2017-05-12 20:28:25 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefAccessibilityHandlerCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
bool CefRenderHandlerCToCpp::GetRootScreenRect(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRect& rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_root_screen_rect)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->get_root_screen_rect(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), &rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2018-09-25 15:40:02 +02:00
|
|
|
void CefRenderHandlerCToCpp::GetViewRect(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRect& rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_view_rect)) {
|
2018-09-25 15:40:02 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2018-09-25 15:40:02 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2018-09-25 15:40:02 +02:00
|
|
|
_struct->get_view_rect(_struct, CefBrowserCppToC::Wrap(browser), &rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
bool CefRenderHandlerCToCpp::GetScreenPoint(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
int viewX,
|
|
|
|
int viewY,
|
|
|
|
int& screenX,
|
|
|
|
int& screenY) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_screen_point)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval =
|
|
|
|
_struct->get_screen_point(_struct, CefBrowserCppToC::Wrap(browser), viewX,
|
|
|
|
viewY, &screenX, &screenY);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
bool CefRenderHandlerCToCpp::GetScreenInfo(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefScreenInfo& screen_info) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_screen_info)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->get_screen_info(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), &screen_info);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnPopupShow(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
bool show) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_popup_show)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_popup_show(_struct, CefBrowserCppToC::Wrap(browser), show);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnPopupSize(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
const CefRect& rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_popup_size)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_popup_size(_struct, CefBrowserCppToC::Wrap(browser), &rect);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnPaint(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
PaintElementType type,
|
|
|
|
const RectList& dirtyRects,
|
|
|
|
const void* buffer,
|
|
|
|
int width,
|
|
|
|
int height) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_paint)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
// Verify param: buffer; type: simple_byaddr
|
|
|
|
DCHECK(buffer);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!buffer) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Translate param: dirtyRects; type: simple_vec_byref_const
|
|
|
|
const size_t dirtyRectsCount = dirtyRects.size();
|
|
|
|
cef_rect_t* dirtyRectsList = NULL;
|
|
|
|
if (dirtyRectsCount > 0) {
|
|
|
|
dirtyRectsList = new cef_rect_t[dirtyRectsCount];
|
|
|
|
DCHECK(dirtyRectsList);
|
|
|
|
if (dirtyRectsList) {
|
|
|
|
for (size_t i = 0; i < dirtyRectsCount; ++i) {
|
|
|
|
dirtyRectsList[i] = dirtyRects[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_paint(_struct, CefBrowserCppToC::Wrap(browser), type,
|
|
|
|
dirtyRectsCount, dirtyRectsList, buffer, width, height);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Restore param:dirtyRects; type: simple_vec_byref_const
|
2023-01-02 23:47:15 +01:00
|
|
|
if (dirtyRectsList) {
|
2017-05-17 11:29:28 +02:00
|
|
|
delete[] dirtyRectsList;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2024-03-08 13:44:56 +01:00
|
|
|
void CefRenderHandlerCToCpp::OnAcceleratedPaint(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
PaintElementType type,
|
|
|
|
const RectList& dirtyRects,
|
|
|
|
const CefAcceleratedPaintInfo& info) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_accelerated_paint)) {
|
2018-07-03 02:46:03 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2018-07-03 02:46:03 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2018-07-03 02:46:03 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2018-07-03 02:46:03 +02:00
|
|
|
|
|
|
|
// Translate param: dirtyRects; type: simple_vec_byref_const
|
|
|
|
const size_t dirtyRectsCount = dirtyRects.size();
|
|
|
|
cef_rect_t* dirtyRectsList = NULL;
|
|
|
|
if (dirtyRectsCount > 0) {
|
|
|
|
dirtyRectsList = new cef_rect_t[dirtyRectsCount];
|
|
|
|
DCHECK(dirtyRectsList);
|
|
|
|
if (dirtyRectsList) {
|
|
|
|
for (size_t i = 0; i < dirtyRectsCount; ++i) {
|
|
|
|
dirtyRectsList[i] = dirtyRects[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_accelerated_paint(_struct, CefBrowserCppToC::Wrap(browser), type,
|
2024-03-08 13:44:56 +01:00
|
|
|
dirtyRectsCount, dirtyRectsList, &info);
|
2018-07-03 02:46:03 +02:00
|
|
|
|
|
|
|
// Restore param:dirtyRects; type: simple_vec_byref_const
|
2023-01-02 23:47:15 +01:00
|
|
|
if (dirtyRectsList) {
|
2018-07-03 02:46:03 +02:00
|
|
|
delete[] dirtyRectsList;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2018-07-03 02:46:03 +02:00
|
|
|
}
|
|
|
|
|
2022-05-27 11:03:31 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefRenderHandlerCToCpp::GetTouchHandleSize(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
cef_horizontal_alignment_t orientation,
|
|
|
|
CefSize& size) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_touch_handle_size)) {
|
2022-05-27 11:03:31 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-05-27 11:03:31 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2022-05-27 11:03:31 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-05-27 11:03:31 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->get_touch_handle_size(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
orientation, &size);
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefRenderHandlerCToCpp::OnTouchHandleStateChanged(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
const CefTouchHandleState& state) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_touch_handle_state_changed)) {
|
2022-05-27 11:03:31 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-05-27 11:03:31 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2022-05-27 11:03:31 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-05-27 11:03:31 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_touch_handle_state_changed(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), &state);
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
bool CefRenderHandlerCToCpp::StartDragging(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefDragData> drag_data,
|
|
|
|
DragOperationsMask allowed_ops,
|
|
|
|
int x,
|
|
|
|
int y) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, start_dragging)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
// Verify param: drag_data; type: refptr_diff
|
|
|
|
DCHECK(drag_data.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!drag_data.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->start_dragging(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
CefDragDataCppToC::Wrap(drag_data), allowed_ops, x, y);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-07-01 00:30:29 +02:00
|
|
|
void CefRenderHandlerCToCpp::UpdateDragCursor(CefRefPtr<CefBrowser> browser,
|
2017-05-17 11:29:28 +02:00
|
|
|
DragOperation operation) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, update_drag_cursor)) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-07-01 00:30:29 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->update_drag_cursor(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
operation);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2014-10-07 22:44:33 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnScrollOffsetChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
double x,
|
|
|
|
double y) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_scroll_offset_changed)) {
|
2014-10-07 22:44:33 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-10-07 22:44:33 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2014-10-07 22:44:33 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2014-10-07 22:44:33 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_scroll_offset_changed(_struct, CefBrowserCppToC::Wrap(browser), x,
|
|
|
|
y);
|
2014-10-07 22:44:33 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-10-28 18:11:24 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnImeCompositionRangeChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
const CefRange& selected_range,
|
2016-10-28 18:11:24 +02:00
|
|
|
const RectList& character_bounds) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 18:11:24 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_ime_composition_range_changed)) {
|
2016-10-28 18:11:24 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 18:11:24 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2016-10-28 18:11:24 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 18:11:24 +02:00
|
|
|
|
|
|
|
// Translate param: character_bounds; type: simple_vec_byref_const
|
|
|
|
const size_t character_boundsCount = character_bounds.size();
|
|
|
|
cef_rect_t* character_boundsList = NULL;
|
|
|
|
if (character_boundsCount > 0) {
|
|
|
|
character_boundsList = new cef_rect_t[character_boundsCount];
|
|
|
|
DCHECK(character_boundsList);
|
|
|
|
if (character_boundsList) {
|
|
|
|
for (size_t i = 0; i < character_boundsCount; ++i) {
|
|
|
|
character_boundsList[i] = character_bounds[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->on_ime_composition_range_changed(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), &selected_range,
|
|
|
|
character_boundsCount, character_boundsList);
|
2016-10-28 18:11:24 +02:00
|
|
|
|
|
|
|
// Restore param:character_bounds; type: simple_vec_byref_const
|
2023-01-02 23:47:15 +01:00
|
|
|
if (character_boundsList) {
|
2017-05-17 11:29:28 +02:00
|
|
|
delete[] character_boundsList;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 18:11:24 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2018-04-09 19:48:23 +02:00
|
|
|
void CefRenderHandlerCToCpp::OnTextSelectionChanged(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
const CefString& selected_text,
|
|
|
|
const CefRange& selected_range) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2018-04-09 19:48:23 +02:00
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_text_selection_changed)) {
|
2018-04-09 19:48:23 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2018-04-09 19:48:23 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2018-04-09 19:48:23 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2018-04-09 19:48:23 +02:00
|
|
|
// Unverified params: selected_text, selected_range
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_text_selection_changed(_struct, CefBrowserCppToC::Wrap(browser),
|
|
|
|
selected_text.GetStruct(),
|
|
|
|
&selected_range);
|
|
|
|
}
|
|
|
|
|
2019-02-26 17:49:41 +01:00
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefRenderHandlerCToCpp::OnVirtualKeyboardRequested(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
TextInputMode input_mode) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_render_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_virtual_keyboard_requested)) {
|
2019-02-26 17:49:41 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2019-02-26 17:49:41 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!browser.get()) {
|
2019-02-26 17:49:41 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2019-02-26 17:49:41 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->on_virtual_keyboard_requested(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), input_mode);
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRenderHandlerCToCpp::CefRenderHandlerCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderHandlerCToCpp::~CefRenderHandlerCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_render_handler_t*
|
|
|
|
CefCToCppRefCounted<CefRenderHandlerCToCpp,
|
|
|
|
CefRenderHandler,
|
|
|
|
cef_render_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefRenderHandler* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-04-26 20:40:01 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefRenderHandlerCToCpp,
|
|
|
|
CefRenderHandler,
|
|
|
|
cef_render_handler_t>::kWrapperType =
|
|
|
|
WT_RENDER_HANDLER;
|