• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=f331b4d8e20683281cee5cf873950c236fc6cffd$
13 //
14 
15 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h"
16 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 namespace {
20 
21 // MEMBER FUNCTIONS - Body may be edited by hand.
22 
translator_test_ref_ptr_client_get_value(struct _cef_translator_test_ref_ptr_client_t * self)23 int CEF_CALLBACK translator_test_ref_ptr_client_get_value(
24     struct _cef_translator_test_ref_ptr_client_t* self) {
25   shutdown_checker::AssertNotShutdown();
26 
27   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
28 
29   DCHECK(self);
30   if (!self)
31     return 0;
32 
33   // Execute
34   int _retval = CefTranslatorTestRefPtrClientCppToC::Get(self)->GetValue();
35 
36   // Return type: simple
37   return _retval;
38 }
39 
40 }  // namespace
41 
42 // CONSTRUCTOR - Do not edit by hand.
43 
CefTranslatorTestRefPtrClientCppToC()44 CefTranslatorTestRefPtrClientCppToC::CefTranslatorTestRefPtrClientCppToC() {
45   GetStruct()->get_value = translator_test_ref_ptr_client_get_value;
46 }
47 
48 // DESTRUCTOR - Do not edit by hand.
49 
~CefTranslatorTestRefPtrClientCppToC()50 CefTranslatorTestRefPtrClientCppToC::~CefTranslatorTestRefPtrClientCppToC() {
51   shutdown_checker::AssertNotShutdown();
52 }
53 
54 template <>
55 CefRefPtr<CefTranslatorTestRefPtrClient>
56 CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
57                     CefTranslatorTestRefPtrClient,
58                     cef_translator_test_ref_ptr_client_t>::
UnwrapDerived(CefWrapperType type,cef_translator_test_ref_ptr_client_t * s)59     UnwrapDerived(CefWrapperType type,
60                   cef_translator_test_ref_ptr_client_t* s) {
61   if (type == WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD) {
62     return CefTranslatorTestRefPtrClientChildCppToC::Unwrap(
63         reinterpret_cast<cef_translator_test_ref_ptr_client_child_t*>(s));
64   }
65   NOTREACHED() << "Unexpected class type: " << type;
66   return nullptr;
67 }
68 
69 template <>
70 CefWrapperType
71     CefCppToCRefCounted<CefTranslatorTestRefPtrClientCppToC,
72                         CefTranslatorTestRefPtrClient,
73                         cef_translator_test_ref_ptr_client_t>::kWrapperType =
74         WT_TRANSLATOR_TEST_REF_PTR_CLIENT;
75