2023-01-02 23:47:15 +01:00
|
|
|
// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights
|
2016-01-19 21:09:01 +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.
|
|
|
|
//
|
2023-05-08 17:15:02 +02:00
|
|
|
// $hash=f734e948a17b74234c1b1bc294b8856ce58ff49e$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/menu_model_delegate_ctocpp.h"
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-01-19 21:09:01 +01:00
|
|
|
void CefMenuModelDelegateCToCpp::ExecuteCommand(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefMenuModel> menu_model,
|
|
|
|
int command_id,
|
2016-01-19 21:09:01 +01:00
|
|
|
cef_event_flags_t event_flags) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, execute_command)) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->execute_command(_struct, CefMenuModelCppToC::Wrap(menu_model),
|
|
|
|
command_id, event_flags);
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-02-22 19:05:27 +01:00
|
|
|
void CefMenuModelDelegateCToCpp::MouseOutsideMenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefMenuModel> menu_model,
|
|
|
|
const CefPoint& screen_point) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, mouse_outside_menu)) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->mouse_outside_menu(_struct, CefMenuModelCppToC::Wrap(menu_model),
|
|
|
|
&screen_point);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-02-22 19:05:27 +01:00
|
|
|
void CefMenuModelDelegateCToCpp::UnhandledOpenSubmenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefMenuModel> menu_model,
|
|
|
|
bool is_rtl) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, unhandled_open_submenu)) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->unhandled_open_submenu(_struct, CefMenuModelCppToC::Wrap(menu_model),
|
|
|
|
is_rtl);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2017-02-22 19:05:27 +01:00
|
|
|
void CefMenuModelDelegateCToCpp::UnhandledCloseSubmenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefMenuModel> menu_model,
|
|
|
|
bool is_rtl) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, unhandled_close_submenu)) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->unhandled_close_submenu(
|
|
|
|
_struct, CefMenuModelCppToC::Wrap(menu_model), is_rtl);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-01-19 21:09:01 +01:00
|
|
|
void CefMenuModelDelegateCToCpp::MenuWillShow(
|
|
|
|
CefRefPtr<CefMenuModel> menu_model) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, menu_will_show)) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->menu_will_show(_struct, CefMenuModelCppToC::Wrap(menu_model));
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-10-28 19:17:32 +02:00
|
|
|
void CefMenuModelDelegateCToCpp::MenuClosed(
|
|
|
|
CefRefPtr<CefMenuModel> menu_model) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 19:17:32 +02:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, menu_closed)) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->menu_closed(_struct, CefMenuModelCppToC::Wrap(menu_model));
|
2016-10-28 19:17:32 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2016-10-28 19:17:32 +02:00
|
|
|
bool CefMenuModelDelegateCToCpp::FormatLabel(CefRefPtr<CefMenuModel> menu_model,
|
2017-05-17 11:29:28 +02:00
|
|
|
CefString& label) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 19:17:32 +02:00
|
|
|
cef_menu_model_delegate_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, format_label)) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model.get()) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return false;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
int _retval = _struct->format_label(
|
|
|
|
_struct, CefMenuModelCppToC::Wrap(menu_model), label.GetWritableStruct());
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2016-10-28 19:17:32 +02:00
|
|
|
}
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelDelegateCToCpp::CefMenuModelDelegateCToCpp() {}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMenuModelDelegateCToCpp::~CefMenuModelDelegateCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_menu_model_delegate_t* CefCToCppRefCounted<
|
|
|
|
CefMenuModelDelegateCToCpp,
|
|
|
|
CefMenuModelDelegate,
|
|
|
|
cef_menu_model_delegate_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefMenuModelDelegate* 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;
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefMenuModelDelegateCToCpp,
|
|
|
|
CefMenuModelDelegate,
|
|
|
|
cef_menu_model_delegate_t>::kWrapperType =
|
2016-01-19 21:09:01 +01:00
|
|
|
WT_MENU_MODEL_DELEGATE;
|