2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2022-03-22 19:31:30 +01: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-01-05 19:03:36 +01:00
|
|
|
// $hash=33ab5abc650f7d7397591247fc9db2a96437128b$
|
2022-03-22 19:31:30 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/command_handler_ctocpp.h"
|
|
|
|
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
bool CefCommandHandlerCToCpp::OnChromeCommand(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
int command_id,
|
|
|
|
cef_window_open_disposition_t disposition) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_command_handler_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, on_chrome_command)) {
|
2022-03-22 19:31:30 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-03-22 19:31:30 +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()) {
|
2022-03-22 19:31:30 +01:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-03-22 19:31:30 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->on_chrome_command(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), command_id, disposition);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
2023-03-07 00:21:57 +01:00
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
bool CefCommandHandlerCToCpp::IsChromeAppMenuItemVisible(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
int command_id) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_command_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_chrome_app_menu_item_visible)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->is_chrome_app_menu_item_visible(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), command_id);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
bool CefCommandHandlerCToCpp::IsChromeAppMenuItemEnabled(
|
|
|
|
CefRefPtr<CefBrowser> browser,
|
|
|
|
int command_id) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_command_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_chrome_app_menu_item_enabled)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser.get());
|
|
|
|
if (!browser.get()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->is_chrome_app_menu_item_enabled(
|
|
|
|
_struct, CefBrowserCppToC::Wrap(browser), command_id);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
bool CefCommandHandlerCToCpp::IsChromePageActionIconVisible(
|
|
|
|
cef_chrome_page_action_icon_type_t icon_type) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_command_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_chrome_page_action_icon_visible)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->is_chrome_page_action_icon_visible(_struct, icon_type);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
bool CefCommandHandlerCToCpp::IsChromeToolbarButtonVisible(
|
|
|
|
cef_chrome_toolbar_button_type_t button_type) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_command_handler_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_chrome_toolbar_button_visible)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = _struct->is_chrome_toolbar_button_visible(_struct, button_type);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval ? true : false;
|
|
|
|
}
|
|
|
|
|
2022-03-22 19:31:30 +01:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefCommandHandlerCToCpp::CefCommandHandlerCToCpp() {}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefCommandHandlerCToCpp::~CefCommandHandlerCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
cef_command_handler_t* CefCToCppRefCounted<
|
|
|
|
CefCommandHandlerCToCpp,
|
|
|
|
CefCommandHandler,
|
|
|
|
cef_command_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefCommandHandler* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2022-03-22 19:31:30 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefCommandHandlerCToCpp,
|
|
|
|
CefCommandHandler,
|
|
|
|
cef_command_handler_t>::kWrapperType =
|
|
|
|
WT_COMMAND_HANDLER;
|