2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 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.
|
|
|
|
//
|
2017-05-17 11:29:28 +02:00
|
|
|
// $hash=cad0f658e2f2c93fefbe5abd77135a94cf57f7d9$
|
|
|
|
//
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/resource_bundle_cpptoc.h"
|
|
|
|
|
|
|
|
// 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();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
resource_bundle_get_data_resource(struct _cef_resource_bundle_t* self,
|
|
|
|
int resource_id,
|
|
|
|
void** data,
|
|
|
|
size_t* data_size) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: data; type: simple_byref
|
|
|
|
DCHECK(data);
|
|
|
|
if (!data)
|
|
|
|
return 0;
|
|
|
|
// Verify param: data_size; type: simple_byref
|
|
|
|
DCHECK(data_size);
|
|
|
|
if (!data_size)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Translate param: data; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
void* dataVal = data ? *data : NULL;
|
2015-09-09 16:05:39 +02:00
|
|
|
// Translate param: data_size; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t data_sizeVal = data_size ? *data_size : 0;
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefResourceBundleCppToC::Get(self)->GetDataResource(
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_id, dataVal, data_sizeVal);
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Restore param: data; type: simple_byref
|
|
|
|
if (data)
|
|
|
|
*data = dataVal;
|
|
|
|
// Restore param: data_size; type: simple_byref
|
|
|
|
if (data_size)
|
|
|
|
*data_size = data_sizeVal;
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
resource_bundle_get_data_resource_for_scale(struct _cef_resource_bundle_t* self,
|
|
|
|
int resource_id,
|
|
|
|
cef_scale_factor_t scale_factor,
|
|
|
|
void** data,
|
|
|
|
size_t* data_size) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return 0;
|
|
|
|
// Verify param: data; type: simple_byref
|
|
|
|
DCHECK(data);
|
|
|
|
if (!data)
|
|
|
|
return 0;
|
|
|
|
// Verify param: data_size; type: simple_byref
|
|
|
|
DCHECK(data_size);
|
|
|
|
if (!data_size)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Translate param: data; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
void* dataVal = data ? *data : NULL;
|
2015-09-09 16:05:39 +02:00
|
|
|
// Translate param: data_size; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t data_sizeVal = data_size ? *data_size : 0;
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefResourceBundleCppToC::Get(self)->GetDataResourceForScale(
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_id, scale_factor, dataVal, data_sizeVal);
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Restore param: data; type: simple_byref
|
|
|
|
if (data)
|
|
|
|
*data = dataVal;
|
|
|
|
// Restore param: data_size; type: simple_byref
|
|
|
|
if (data_size)
|
|
|
|
*data_size = data_sizeVal;
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // 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;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
base::AtomicRefCount CefCppToCRefCounted<CefResourceBundleCppToC,
|
|
|
|
CefResourceBundle,
|
|
|
|
cef_resource_bundle_t>::DebugObjCt = 0;
|
2015-09-09 16:05:39 +02:00
|
|
|
#endif
|
|
|
|
|
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;
|