cef/libcef_dll/ctocpp/command_handler_ctocpp.cc
Marshall Greenblatt 49a34d9160 Apply new Chromium style for #include sorting
Add "cef/" prefix for CEF #includes in libcef/ directory.

Sort #includes by following
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
2024-05-01 14:34:32 -04:00

167 lines
4.6 KiB
C++

// Copyright (c) 2024 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=33ab5abc650f7d7397591247fc9db2a96437128b$
//
#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) {
DCHECK(false) << "Unexpected class type: " << type;
return nullptr;
}
template <>
CefWrapperType CefCToCppRefCounted<CefCommandHandlerCToCpp,
CefCommandHandler,
cef_command_handler_t>::kWrapperType =
WT_COMMAND_HANDLER;