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=ca187683ddab3822fcf3d957c76ed27db6e8e433$ 13 // 14 15 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h" 16 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h" 17 #include "libcef_dll/shutdown_checker.h" 18 19 // VIRTUAL METHODS - Body may be edited by hand. 20 GetValue()21NO_SANITIZE("cfi-icall") int CefTranslatorTestRefPtrClientCToCpp::GetValue() { 22 shutdown_checker::AssertNotShutdown(); 23 24 cef_translator_test_ref_ptr_client_t* _struct = GetStruct(); 25 if (CEF_MEMBER_MISSING(_struct, get_value)) 26 return 0; 27 28 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 29 30 // Execute 31 int _retval = _struct->get_value(_struct); 32 33 // Return type: simple 34 return _retval; 35 } 36 37 // CONSTRUCTOR - Do not edit by hand. 38 CefTranslatorTestRefPtrClientCToCpp()39CefTranslatorTestRefPtrClientCToCpp::CefTranslatorTestRefPtrClientCToCpp() {} 40 41 // DESTRUCTOR - Do not edit by hand. 42 ~CefTranslatorTestRefPtrClientCToCpp()43CefTranslatorTestRefPtrClientCToCpp::~CefTranslatorTestRefPtrClientCToCpp() { 44 shutdown_checker::AssertNotShutdown(); 45 } 46 47 template <> 48 cef_translator_test_ref_ptr_client_t* 49 CefCToCppRefCounted<CefTranslatorTestRefPtrClientCToCpp, 50 CefTranslatorTestRefPtrClient, 51 cef_translator_test_ref_ptr_client_t>:: UnwrapDerived(CefWrapperType type,CefTranslatorTestRefPtrClient * c)52 UnwrapDerived(CefWrapperType type, CefTranslatorTestRefPtrClient* c) { 53 if (type == WT_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD) { 54 return reinterpret_cast<cef_translator_test_ref_ptr_client_t*>( 55 CefTranslatorTestRefPtrClientChildCToCpp::Unwrap( 56 reinterpret_cast<CefTranslatorTestRefPtrClientChild*>(c))); 57 } 58 NOTREACHED() << "Unexpected class type: " << type; 59 return nullptr; 60 } 61 62 template <> 63 CefWrapperType 64 CefCToCppRefCounted<CefTranslatorTestRefPtrClientCToCpp, 65 CefTranslatorTestRefPtrClient, 66 cef_translator_test_ref_ptr_client_t>::kWrapperType = 67 WT_TRANSLATOR_TEST_REF_PTR_CLIENT; 68