1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=da43c88a9d20786247371fa3a69230862f8619a6$
13 //
14
15 #include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h"
16 #include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h"
17
18 namespace {
19
20 // MEMBER FUNCTIONS - Body may be edited by hand.
21
translator_test_scoped_client_get_value(struct _cef_translator_test_scoped_client_t * self)22 int CEF_CALLBACK translator_test_scoped_client_get_value(
23 struct _cef_translator_test_scoped_client_t* self) {
24 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
25
26 DCHECK(self);
27 if (!self)
28 return 0;
29
30 // Execute
31 int _retval = CefTranslatorTestScopedClientCppToC::Get(self)->GetValue();
32
33 // Return type: simple
34 return _retval;
35 }
36
37 } // namespace
38
39 // CONSTRUCTOR - Do not edit by hand.
40
CefTranslatorTestScopedClientCppToC()41 CefTranslatorTestScopedClientCppToC::CefTranslatorTestScopedClientCppToC() {
42 GetStruct()->get_value = translator_test_scoped_client_get_value;
43 }
44
45 // DESTRUCTOR - Do not edit by hand.
46
~CefTranslatorTestScopedClientCppToC()47 CefTranslatorTestScopedClientCppToC::~CefTranslatorTestScopedClientCppToC() {}
48
49 template <>
50 CefOwnPtr<CefTranslatorTestScopedClient>
51 CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
52 CefTranslatorTestScopedClient,
53 cef_translator_test_scoped_client_t>::
UnwrapDerivedOwn(CefWrapperType type,cef_translator_test_scoped_client_t * s)54 UnwrapDerivedOwn(CefWrapperType type,
55 cef_translator_test_scoped_client_t* s) {
56 if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
57 return CefTranslatorTestScopedClientChildCppToC::UnwrapOwn(
58 reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s));
59 }
60 NOTREACHED() << "Unexpected class type: " << type;
61 return CefOwnPtr<CefTranslatorTestScopedClient>();
62 }
63
64 template <>
65 CefRawPtr<CefTranslatorTestScopedClient>
66 CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
67 CefTranslatorTestScopedClient,
68 cef_translator_test_scoped_client_t>::
UnwrapDerivedRaw(CefWrapperType type,cef_translator_test_scoped_client_t * s)69 UnwrapDerivedRaw(CefWrapperType type,
70 cef_translator_test_scoped_client_t* s) {
71 if (type == WT_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD) {
72 return CefTranslatorTestScopedClientChildCppToC::UnwrapRaw(
73 reinterpret_cast<cef_translator_test_scoped_client_child_t*>(s));
74 }
75 NOTREACHED() << "Unexpected class type: " << type;
76 return nullptr;
77 }
78
79 template <>
80 CefWrapperType
81 CefCppToCScoped<CefTranslatorTestScopedClientCppToC,
82 CefTranslatorTestScopedClient,
83 cef_translator_test_scoped_client_t>::kWrapperType =
84 WT_TRANSLATOR_TEST_SCOPED_CLIENT;
85