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=40ce0ebcedcd5995a5a3147049e5b34c016b8519$
13 //
14
15 #include "libcef_dll/ctocpp/views/box_layout_ctocpp.h"
16 #include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h"
17 #include "libcef_dll/ctocpp/views/view_ctocpp.h"
18 #include "libcef_dll/shutdown_checker.h"
19
20 // VIRTUAL METHODS - Body may be edited by hand.
21
22 NO_SANITIZE("cfi-icall")
SetFlexForView(CefRefPtr<CefView> view,int flex)23 void CefBoxLayoutCToCpp::SetFlexForView(CefRefPtr<CefView> view, int flex) {
24 shutdown_checker::AssertNotShutdown();
25
26 cef_box_layout_t* _struct = GetStruct();
27 if (CEF_MEMBER_MISSING(_struct, set_flex_for_view))
28 return;
29
30 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
31
32 // Verify param: view; type: refptr_same
33 DCHECK(view.get());
34 if (!view.get())
35 return;
36
37 // Execute
38 _struct->set_flex_for_view(_struct, CefViewCToCpp::Unwrap(view), flex);
39 }
40
41 NO_SANITIZE("cfi-icall")
ClearFlexForView(CefRefPtr<CefView> view)42 void CefBoxLayoutCToCpp::ClearFlexForView(CefRefPtr<CefView> view) {
43 shutdown_checker::AssertNotShutdown();
44
45 cef_box_layout_t* _struct = GetStruct();
46 if (CEF_MEMBER_MISSING(_struct, clear_flex_for_view))
47 return;
48
49 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
50
51 // Verify param: view; type: refptr_same
52 DCHECK(view.get());
53 if (!view.get())
54 return;
55
56 // Execute
57 _struct->clear_flex_for_view(_struct, CefViewCToCpp::Unwrap(view));
58 }
59
60 NO_SANITIZE("cfi-icall")
AsBoxLayout()61 CefRefPtr<CefBoxLayout> CefBoxLayoutCToCpp::AsBoxLayout() {
62 shutdown_checker::AssertNotShutdown();
63
64 cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
65 if (CEF_MEMBER_MISSING(_struct, as_box_layout))
66 return nullptr;
67
68 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
69
70 // Execute
71 cef_box_layout_t* _retval = _struct->as_box_layout(_struct);
72
73 // Return type: refptr_same
74 return CefBoxLayoutCToCpp::Wrap(_retval);
75 }
76
77 NO_SANITIZE("cfi-icall")
AsFillLayout()78 CefRefPtr<CefFillLayout> CefBoxLayoutCToCpp::AsFillLayout() {
79 shutdown_checker::AssertNotShutdown();
80
81 cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
82 if (CEF_MEMBER_MISSING(_struct, as_fill_layout))
83 return nullptr;
84
85 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
86
87 // Execute
88 cef_fill_layout_t* _retval = _struct->as_fill_layout(_struct);
89
90 // Return type: refptr_same
91 return CefFillLayoutCToCpp::Wrap(_retval);
92 }
93
IsValid()94 NO_SANITIZE("cfi-icall") bool CefBoxLayoutCToCpp::IsValid() {
95 shutdown_checker::AssertNotShutdown();
96
97 cef_layout_t* _struct = reinterpret_cast<cef_layout_t*>(GetStruct());
98 if (CEF_MEMBER_MISSING(_struct, is_valid))
99 return false;
100
101 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
102
103 // Execute
104 int _retval = _struct->is_valid(_struct);
105
106 // Return type: bool
107 return _retval ? true : false;
108 }
109
110 // CONSTRUCTOR - Do not edit by hand.
111
CefBoxLayoutCToCpp()112 CefBoxLayoutCToCpp::CefBoxLayoutCToCpp() {}
113
114 // DESTRUCTOR - Do not edit by hand.
115
~CefBoxLayoutCToCpp()116 CefBoxLayoutCToCpp::~CefBoxLayoutCToCpp() {
117 shutdown_checker::AssertNotShutdown();
118 }
119
120 template <>
121 cef_box_layout_t*
122 CefCToCppRefCounted<CefBoxLayoutCToCpp, CefBoxLayout, cef_box_layout_t>::
UnwrapDerived(CefWrapperType type,CefBoxLayout * c)123 UnwrapDerived(CefWrapperType type, CefBoxLayout* c) {
124 NOTREACHED() << "Unexpected class type: " << type;
125 return nullptr;
126 }
127
128 template <>
129 CefWrapperType CefCToCppRefCounted<CefBoxLayoutCToCpp,
130 CefBoxLayout,
131 cef_box_layout_t>::kWrapperType =
132 WT_BOX_LAYOUT;
133