2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2022-10-26 00:50: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-01-05 19:03:36 +01:00
|
|
|
// $hash=f41c3e1766a3ac8694ee2bebc94e6e31b8a2c624$
|
2022-10-26 00:50:29 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/preference_registrar_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2022-10-26 00:50:29 +02:00
|
|
|
#include "libcef_dll/cpptoc/value_cpptoc.h"
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
int CEF_CALLBACK
|
|
|
|
preference_registrar_add_preference(struct _cef_preference_registrar_t* self,
|
|
|
|
const cef_string_t* name,
|
|
|
|
struct _cef_value_t* default_value) {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2022-10-26 00:50:29 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-10-26 00:50:29 +02:00
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!name) {
|
2022-10-26 00:50:29 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-10-26 00:50:29 +02:00
|
|
|
// Verify param: default_value; type: refptr_same
|
|
|
|
DCHECK(default_value);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!default_value) {
|
2022-10-26 00:50:29 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2022-10-26 00:50:29 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefPreferenceRegistrarCppToC::Get(self)->AddPreference(
|
|
|
|
CefString(name), CefValueCppToC::Unwrap(default_value));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefPreferenceRegistrarCppToC::CefPreferenceRegistrarCppToC() {
|
|
|
|
GetStruct()->add_preference = preference_registrar_add_preference;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefPreferenceRegistrarCppToC::~CefPreferenceRegistrarCppToC() {}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefOwnPtr<CefPreferenceRegistrar> CefCppToCScoped<CefPreferenceRegistrarCppToC,
|
|
|
|
CefPreferenceRegistrar,
|
|
|
|
cef_preference_registrar_t>::
|
|
|
|
UnwrapDerivedOwn(CefWrapperType type, cef_preference_registrar_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2022-10-26 00:50:29 +02:00
|
|
|
return CefOwnPtr<CefPreferenceRegistrar>();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefRawPtr<CefPreferenceRegistrar> CefCppToCScoped<CefPreferenceRegistrarCppToC,
|
|
|
|
CefPreferenceRegistrar,
|
|
|
|
cef_preference_registrar_t>::
|
|
|
|
UnwrapDerivedRaw(CefWrapperType type, cef_preference_registrar_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2022-10-26 00:50:29 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCScoped<CefPreferenceRegistrarCppToC,
|
|
|
|
CefPreferenceRegistrar,
|
|
|
|
cef_preference_registrar_t>::kWrapperType =
|
|
|
|
WT_PREFERENCE_REGISTRAR;
|