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=60978f71bb9089d32a89bed17af584bd83a4678d$
13 //
14
15 #include "libcef_dll/ctocpp/views/overlay_controller_ctocpp.h"
16 #include "libcef_dll/ctocpp/views/view_ctocpp.h"
17 #include "libcef_dll/ctocpp/views/window_ctocpp.h"
18 #include "libcef_dll/shutdown_checker.h"
19
20 // VIRTUAL METHODS - Body may be edited by hand.
21
IsValid()22 NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsValid() {
23 shutdown_checker::AssertNotShutdown();
24
25 cef_overlay_controller_t* _struct = GetStruct();
26 if (CEF_MEMBER_MISSING(_struct, is_valid))
27 return false;
28
29 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
30
31 // Execute
32 int _retval = _struct->is_valid(_struct);
33
34 // Return type: bool
35 return _retval ? true : false;
36 }
37
38 NO_SANITIZE("cfi-icall")
IsSame(CefRefPtr<CefOverlayController> that)39 bool CefOverlayControllerCToCpp::IsSame(CefRefPtr<CefOverlayController> that) {
40 shutdown_checker::AssertNotShutdown();
41
42 cef_overlay_controller_t* _struct = GetStruct();
43 if (CEF_MEMBER_MISSING(_struct, is_same))
44 return false;
45
46 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
47
48 // Verify param: that; type: refptr_same
49 DCHECK(that.get());
50 if (!that.get())
51 return false;
52
53 // Execute
54 int _retval =
55 _struct->is_same(_struct, CefOverlayControllerCToCpp::Unwrap(that));
56
57 // Return type: bool
58 return _retval ? true : false;
59 }
60
61 NO_SANITIZE("cfi-icall")
GetContentsView()62 CefRefPtr<CefView> CefOverlayControllerCToCpp::GetContentsView() {
63 shutdown_checker::AssertNotShutdown();
64
65 cef_overlay_controller_t* _struct = GetStruct();
66 if (CEF_MEMBER_MISSING(_struct, get_contents_view))
67 return nullptr;
68
69 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
70
71 // Execute
72 cef_view_t* _retval = _struct->get_contents_view(_struct);
73
74 // Return type: refptr_same
75 return CefViewCToCpp::Wrap(_retval);
76 }
77
78 NO_SANITIZE("cfi-icall")
GetWindow()79 CefRefPtr<CefWindow> CefOverlayControllerCToCpp::GetWindow() {
80 shutdown_checker::AssertNotShutdown();
81
82 cef_overlay_controller_t* _struct = GetStruct();
83 if (CEF_MEMBER_MISSING(_struct, get_window))
84 return nullptr;
85
86 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
87
88 // Execute
89 cef_window_t* _retval = _struct->get_window(_struct);
90
91 // Return type: refptr_same
92 return CefWindowCToCpp::Wrap(_retval);
93 }
94
95 NO_SANITIZE("cfi-icall")
GetDockingMode()96 cef_docking_mode_t CefOverlayControllerCToCpp::GetDockingMode() {
97 shutdown_checker::AssertNotShutdown();
98
99 cef_overlay_controller_t* _struct = GetStruct();
100 if (CEF_MEMBER_MISSING(_struct, get_docking_mode))
101 return CEF_DOCKING_MODE_TOP_LEFT;
102
103 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
104
105 // Execute
106 cef_docking_mode_t _retval = _struct->get_docking_mode(_struct);
107
108 // Return type: simple
109 return _retval;
110 }
111
Destroy()112 NO_SANITIZE("cfi-icall") void CefOverlayControllerCToCpp::Destroy() {
113 shutdown_checker::AssertNotShutdown();
114
115 cef_overlay_controller_t* _struct = GetStruct();
116 if (CEF_MEMBER_MISSING(_struct, destroy))
117 return;
118
119 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
120
121 // Execute
122 _struct->destroy(_struct);
123 }
124
125 NO_SANITIZE("cfi-icall")
SetBounds(const CefRect & bounds)126 void CefOverlayControllerCToCpp::SetBounds(const CefRect& bounds) {
127 shutdown_checker::AssertNotShutdown();
128
129 cef_overlay_controller_t* _struct = GetStruct();
130 if (CEF_MEMBER_MISSING(_struct, set_bounds))
131 return;
132
133 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
134
135 // Execute
136 _struct->set_bounds(_struct, &bounds);
137 }
138
GetBounds()139 NO_SANITIZE("cfi-icall") CefRect CefOverlayControllerCToCpp::GetBounds() {
140 shutdown_checker::AssertNotShutdown();
141
142 cef_overlay_controller_t* _struct = GetStruct();
143 if (CEF_MEMBER_MISSING(_struct, get_bounds))
144 return CefRect();
145
146 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
147
148 // Execute
149 cef_rect_t _retval = _struct->get_bounds(_struct);
150
151 // Return type: simple
152 return _retval;
153 }
154
155 NO_SANITIZE("cfi-icall")
GetBoundsInScreen()156 CefRect CefOverlayControllerCToCpp::GetBoundsInScreen() {
157 shutdown_checker::AssertNotShutdown();
158
159 cef_overlay_controller_t* _struct = GetStruct();
160 if (CEF_MEMBER_MISSING(_struct, get_bounds_in_screen))
161 return CefRect();
162
163 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
164
165 // Execute
166 cef_rect_t _retval = _struct->get_bounds_in_screen(_struct);
167
168 // Return type: simple
169 return _retval;
170 }
171
172 NO_SANITIZE("cfi-icall")
SetSize(const CefSize & size)173 void CefOverlayControllerCToCpp::SetSize(const CefSize& size) {
174 shutdown_checker::AssertNotShutdown();
175
176 cef_overlay_controller_t* _struct = GetStruct();
177 if (CEF_MEMBER_MISSING(_struct, set_size))
178 return;
179
180 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
181
182 // Execute
183 _struct->set_size(_struct, &size);
184 }
185
GetSize()186 NO_SANITIZE("cfi-icall") CefSize CefOverlayControllerCToCpp::GetSize() {
187 shutdown_checker::AssertNotShutdown();
188
189 cef_overlay_controller_t* _struct = GetStruct();
190 if (CEF_MEMBER_MISSING(_struct, get_size))
191 return CefSize();
192
193 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
194
195 // Execute
196 cef_size_t _retval = _struct->get_size(_struct);
197
198 // Return type: simple
199 return _retval;
200 }
201
202 NO_SANITIZE("cfi-icall")
SetPosition(const CefPoint & position)203 void CefOverlayControllerCToCpp::SetPosition(const CefPoint& position) {
204 shutdown_checker::AssertNotShutdown();
205
206 cef_overlay_controller_t* _struct = GetStruct();
207 if (CEF_MEMBER_MISSING(_struct, set_position))
208 return;
209
210 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
211
212 // Execute
213 _struct->set_position(_struct, &position);
214 }
215
GetPosition()216 NO_SANITIZE("cfi-icall") CefPoint CefOverlayControllerCToCpp::GetPosition() {
217 shutdown_checker::AssertNotShutdown();
218
219 cef_overlay_controller_t* _struct = GetStruct();
220 if (CEF_MEMBER_MISSING(_struct, get_position))
221 return CefPoint();
222
223 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
224
225 // Execute
226 cef_point_t _retval = _struct->get_position(_struct);
227
228 // Return type: simple
229 return _retval;
230 }
231
232 NO_SANITIZE("cfi-icall")
SetInsets(const CefInsets & insets)233 void CefOverlayControllerCToCpp::SetInsets(const CefInsets& insets) {
234 shutdown_checker::AssertNotShutdown();
235
236 cef_overlay_controller_t* _struct = GetStruct();
237 if (CEF_MEMBER_MISSING(_struct, set_insets))
238 return;
239
240 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
241
242 // Execute
243 _struct->set_insets(_struct, &insets);
244 }
245
GetInsets()246 NO_SANITIZE("cfi-icall") CefInsets CefOverlayControllerCToCpp::GetInsets() {
247 shutdown_checker::AssertNotShutdown();
248
249 cef_overlay_controller_t* _struct = GetStruct();
250 if (CEF_MEMBER_MISSING(_struct, get_insets))
251 return CefInsets();
252
253 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
254
255 // Execute
256 cef_insets_t _retval = _struct->get_insets(_struct);
257
258 // Return type: simple
259 return _retval;
260 }
261
262 NO_SANITIZE("cfi-icall")
SizeToPreferredSize()263 void CefOverlayControllerCToCpp::SizeToPreferredSize() {
264 shutdown_checker::AssertNotShutdown();
265
266 cef_overlay_controller_t* _struct = GetStruct();
267 if (CEF_MEMBER_MISSING(_struct, size_to_preferred_size))
268 return;
269
270 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
271
272 // Execute
273 _struct->size_to_preferred_size(_struct);
274 }
275
276 NO_SANITIZE("cfi-icall")
SetVisible(bool visible)277 void CefOverlayControllerCToCpp::SetVisible(bool visible) {
278 shutdown_checker::AssertNotShutdown();
279
280 cef_overlay_controller_t* _struct = GetStruct();
281 if (CEF_MEMBER_MISSING(_struct, set_visible))
282 return;
283
284 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
285
286 // Execute
287 _struct->set_visible(_struct, visible);
288 }
289
IsVisible()290 NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsVisible() {
291 shutdown_checker::AssertNotShutdown();
292
293 cef_overlay_controller_t* _struct = GetStruct();
294 if (CEF_MEMBER_MISSING(_struct, is_visible))
295 return false;
296
297 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
298
299 // Execute
300 int _retval = _struct->is_visible(_struct);
301
302 // Return type: bool
303 return _retval ? true : false;
304 }
305
IsDrawn()306 NO_SANITIZE("cfi-icall") bool CefOverlayControllerCToCpp::IsDrawn() {
307 shutdown_checker::AssertNotShutdown();
308
309 cef_overlay_controller_t* _struct = GetStruct();
310 if (CEF_MEMBER_MISSING(_struct, is_drawn))
311 return false;
312
313 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
314
315 // Execute
316 int _retval = _struct->is_drawn(_struct);
317
318 // Return type: bool
319 return _retval ? true : false;
320 }
321
322 // CONSTRUCTOR - Do not edit by hand.
323
CefOverlayControllerCToCpp()324 CefOverlayControllerCToCpp::CefOverlayControllerCToCpp() {}
325
326 // DESTRUCTOR - Do not edit by hand.
327
~CefOverlayControllerCToCpp()328 CefOverlayControllerCToCpp::~CefOverlayControllerCToCpp() {
329 shutdown_checker::AssertNotShutdown();
330 }
331
332 template <>
333 cef_overlay_controller_t* CefCToCppRefCounted<
334 CefOverlayControllerCToCpp,
335 CefOverlayController,
UnwrapDerived(CefWrapperType type,CefOverlayController * c)336 cef_overlay_controller_t>::UnwrapDerived(CefWrapperType type,
337 CefOverlayController* c) {
338 NOTREACHED() << "Unexpected class type: " << type;
339 return nullptr;
340 }
341
342 template <>
343 CefWrapperType CefCToCppRefCounted<CefOverlayControllerCToCpp,
344 CefOverlayController,
345 cef_overlay_controller_t>::kWrapperType =
346 WT_OVERLAY_CONTROLLER;
347