2021-01-27 19:36:54 +01:00
|
|
|
// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights
|
2015-09-09 16:05:39 +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.
|
|
|
|
//
|
2021-01-27 19:36:54 +01:00
|
|
|
// $hash=5512a41467d67fd269e9486f48b83febc2700feb$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/resource_bundle_cpptoc.h"
|
2020-07-21 17:55:54 +02:00
|
|
|
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefResourceBundle> _retval = CefResourceBundle::GetGlobal();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefResourceBundleCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
resource_bundle_get_localized_string(struct _cef_resource_bundle_t* self,
|
|
|
|
int string_id) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefString _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetLocalizedString(string_id);
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
2020-07-21 17:55:54 +02:00
|
|
|
struct _cef_binary_value_t* CEF_CALLBACK
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_bundle_get_data_resource(struct _cef_resource_bundle_t* self,
|
2020-07-21 17:55:54 +02:00
|
|
|
int resource_id) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
2020-07-21 17:55:54 +02:00
|
|
|
return NULL;
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
2020-07-21 17:55:54 +02:00
|
|
|
CefRefPtr<CefBinaryValue> _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetDataResource(resource_id);
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
2020-07-21 17:55:54 +02:00
|
|
|
struct _cef_binary_value_t* CEF_CALLBACK
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_bundle_get_data_resource_for_scale(struct _cef_resource_bundle_t* self,
|
|
|
|
int resource_id,
|
2020-07-21 17:55:54 +02:00
|
|
|
cef_scale_factor_t scale_factor) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
2020-07-21 17:55:54 +02:00
|
|
|
return NULL;
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
2020-07-21 17:55:54 +02:00
|
|
|
CefRefPtr<CefBinaryValue> _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetDataResourceForScale(resource_id,
|
|
|
|
scale_factor);
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefResourceBundleCppToC::CefResourceBundleCppToC() {
|
|
|
|
GetStruct()->get_localized_string = resource_bundle_get_localized_string;
|
|
|
|
GetStruct()->get_data_resource = resource_bundle_get_data_resource;
|
|
|
|
GetStruct()->get_data_resource_for_scale =
|
|
|
|
resource_bundle_get_data_resource_for_scale;
|
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefResourceBundleCppToC::~CefResourceBundleCppToC() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefResourceBundle> CefCppToCRefCounted<
|
|
|
|
CefResourceBundleCppToC,
|
|
|
|
CefResourceBundle,
|
|
|
|
cef_resource_bundle_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_resource_bundle_t* s) {
|
2015-09-09 16:05:39 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefResourceBundleCppToC,
|
|
|
|
CefResourceBundle,
|
|
|
|
cef_resource_bundle_t>::kWrapperType =
|
2017-02-09 23:07:43 +01:00
|
|
|
WT_RESOURCE_BUNDLE;
|