cef/libcef_dll/ctocpp/command_handler_ctocpp.cc

166 lines
4.6 KiB
C++
Raw Permalink Normal View History

// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights
// 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.
//
// $hash=f374fda38406905546bc5601c01764a9b437a7d0$
//
#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();
if (CEF_MEMBER_MISSING(_struct, on_chrome_command)) {
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->on_chrome_command(
_struct, CefBrowserCppToC::Wrap(browser), command_id, disposition);
// Return type: bool
return _retval ? true : false;
}
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;
}
// 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) {
NOTREACHED() << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefCommandHandlerCToCpp,
CefCommandHandler,
cef_command_handler_t>::kWrapperType =
WT_COMMAND_HANDLER;