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=304f5db25f7e2a1e4cf169f7cc205013bb06f861$ 13 // 14 15 #include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h" 16 #include "libcef_dll/cpptoc/views/box_layout_cpptoc.h" 17 #include "libcef_dll/shutdown_checker.h" 18 19 namespace { 20 21 // MEMBER FUNCTIONS - Body may be edited by hand. 22 23 cef_box_layout_t* CEF_CALLBACK fill_layout_as_box_layout(struct _cef_layout_t * self)24fill_layout_as_box_layout(struct _cef_layout_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 NULL; 32 33 // Execute 34 CefRefPtr<CefBoxLayout> _retval = 35 CefFillLayoutCppToC::Get(reinterpret_cast<cef_fill_layout_t*>(self)) 36 ->AsBoxLayout(); 37 38 // Return type: refptr_same 39 return CefBoxLayoutCppToC::Wrap(_retval); 40 } 41 42 cef_fill_layout_t* CEF_CALLBACK fill_layout_as_fill_layout(struct _cef_layout_t * self)43fill_layout_as_fill_layout(struct _cef_layout_t* self) { 44 shutdown_checker::AssertNotShutdown(); 45 46 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 47 48 DCHECK(self); 49 if (!self) 50 return NULL; 51 52 // Execute 53 CefRefPtr<CefFillLayout> _retval = 54 CefFillLayoutCppToC::Get(reinterpret_cast<cef_fill_layout_t*>(self)) 55 ->AsFillLayout(); 56 57 // Return type: refptr_same 58 return CefFillLayoutCppToC::Wrap(_retval); 59 } 60 fill_layout_is_valid(struct _cef_layout_t * self)61int CEF_CALLBACK fill_layout_is_valid(struct _cef_layout_t* self) { 62 shutdown_checker::AssertNotShutdown(); 63 64 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 65 66 DCHECK(self); 67 if (!self) 68 return 0; 69 70 // Execute 71 bool _retval = 72 CefFillLayoutCppToC::Get(reinterpret_cast<cef_fill_layout_t*>(self)) 73 ->IsValid(); 74 75 // Return type: bool 76 return _retval; 77 } 78 79 } // namespace 80 81 // CONSTRUCTOR - Do not edit by hand. 82 CefFillLayoutCppToC()83CefFillLayoutCppToC::CefFillLayoutCppToC() { 84 GetStruct()->base.as_box_layout = fill_layout_as_box_layout; 85 GetStruct()->base.as_fill_layout = fill_layout_as_fill_layout; 86 GetStruct()->base.is_valid = fill_layout_is_valid; 87 } 88 89 // DESTRUCTOR - Do not edit by hand. 90 ~CefFillLayoutCppToC()91CefFillLayoutCppToC::~CefFillLayoutCppToC() { 92 shutdown_checker::AssertNotShutdown(); 93 } 94 95 template <> 96 CefRefPtr<CefFillLayout> 97 CefCppToCRefCounted<CefFillLayoutCppToC, CefFillLayout, cef_fill_layout_t>:: UnwrapDerived(CefWrapperType type,cef_fill_layout_t * s)98 UnwrapDerived(CefWrapperType type, cef_fill_layout_t* s) { 99 NOTREACHED() << "Unexpected class type: " << type; 100 return nullptr; 101 } 102 103 template <> 104 CefWrapperType CefCppToCRefCounted<CefFillLayoutCppToC, 105 CefFillLayout, 106 cef_fill_layout_t>::kWrapperType = 107 WT_FILL_LAYOUT; 108