• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2021 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=312985bb5cc971d1fe9d77af1f985f6a544e9db5$
13 //
14 
15 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
16 #include "libcef_dll/cpptoc/browser_cpptoc.h"
17 #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
18 #include "libcef_dll/cpptoc/request_context_cpptoc.h"
19 #include "libcef_dll/cpptoc/views/button_cpptoc.h"
20 #include "libcef_dll/cpptoc/views/panel_cpptoc.h"
21 #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
22 #include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
23 #include "libcef_dll/cpptoc/views/view_cpptoc.h"
24 #include "libcef_dll/cpptoc/views/window_cpptoc.h"
25 #include "libcef_dll/ctocpp/client_ctocpp.h"
26 #include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
27 #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
28 #include "libcef_dll/shutdown_checker.h"
29 
30 // GLOBAL FUNCTIONS - Body may be edited by hand.
31 
cef_browser_view_create(cef_client_t * client,const cef_string_t * url,const struct _cef_browser_settings_t * settings,cef_dictionary_value_t * extra_info,cef_request_context_t * request_context,cef_browser_view_delegate_t * delegate)32 CEF_EXPORT cef_browser_view_t* cef_browser_view_create(
33     cef_client_t* client,
34     const cef_string_t* url,
35     const struct _cef_browser_settings_t* settings,
36     cef_dictionary_value_t* extra_info,
37     cef_request_context_t* request_context,
38     cef_browser_view_delegate_t* delegate) {
39   shutdown_checker::AssertNotShutdown();
40 
41   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
42 
43   // Verify param: settings; type: struct_byref_const
44   DCHECK(settings);
45   if (!settings)
46     return NULL;
47   // Unverified params: client, url, extra_info, request_context, delegate
48 
49   // Translate param: settings; type: struct_byref_const
50   CefBrowserSettings settingsObj;
51   if (settings)
52     settingsObj.Set(*settings, false);
53 
54   // Execute
55   CefRefPtr<CefBrowserView> _retval = CefBrowserView::CreateBrowserView(
56       CefClientCToCpp::Wrap(client), CefString(url), settingsObj,
57       CefDictionaryValueCppToC::Unwrap(extra_info),
58       CefRequestContextCppToC::Unwrap(request_context),
59       CefBrowserViewDelegateCToCpp::Wrap(delegate));
60 
61   // Return type: refptr_same
62   return CefBrowserViewCppToC::Wrap(_retval);
63 }
64 
cef_browser_view_get_for_browser(cef_browser_t * browser)65 CEF_EXPORT cef_browser_view_t* cef_browser_view_get_for_browser(
66     cef_browser_t* browser) {
67   shutdown_checker::AssertNotShutdown();
68 
69   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
70 
71   // Verify param: browser; type: refptr_same
72   DCHECK(browser);
73   if (!browser)
74     return NULL;
75 
76   // Execute
77   CefRefPtr<CefBrowserView> _retval =
78       CefBrowserView::GetForBrowser(CefBrowserCppToC::Unwrap(browser));
79 
80   // Return type: refptr_same
81   return CefBrowserViewCppToC::Wrap(_retval);
82 }
83 
84 namespace {
85 
86 // MEMBER FUNCTIONS - Body may be edited by hand.
87 
88 cef_browser_t* CEF_CALLBACK
browser_view_get_browser(struct _cef_browser_view_t * self)89 browser_view_get_browser(struct _cef_browser_view_t* self) {
90   shutdown_checker::AssertNotShutdown();
91 
92   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
93 
94   DCHECK(self);
95   if (!self)
96     return NULL;
97 
98   // Execute
99   CefRefPtr<CefBrowser> _retval = CefBrowserViewCppToC::Get(self)->GetBrowser();
100 
101   // Return type: refptr_same
102   return CefBrowserCppToC::Wrap(_retval);
103 }
104 
105 struct _cef_view_t* CEF_CALLBACK
browser_view_get_chrome_toolbar(struct _cef_browser_view_t * self)106 browser_view_get_chrome_toolbar(struct _cef_browser_view_t* self) {
107   shutdown_checker::AssertNotShutdown();
108 
109   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
110 
111   DCHECK(self);
112   if (!self)
113     return NULL;
114 
115   // Execute
116   CefRefPtr<CefView> _retval =
117       CefBrowserViewCppToC::Get(self)->GetChromeToolbar();
118 
119   // Return type: refptr_same
120   return CefViewCppToC::Wrap(_retval);
121 }
122 
123 void CEF_CALLBACK
browser_view_set_prefer_accelerators(struct _cef_browser_view_t * self,int prefer_accelerators)124 browser_view_set_prefer_accelerators(struct _cef_browser_view_t* self,
125                                      int prefer_accelerators) {
126   shutdown_checker::AssertNotShutdown();
127 
128   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
129 
130   DCHECK(self);
131   if (!self)
132     return;
133 
134   // Execute
135   CefBrowserViewCppToC::Get(self)->SetPreferAccelerators(
136       prefer_accelerators ? true : false);
137 }
138 
139 cef_browser_view_t* CEF_CALLBACK
browser_view_as_browser_view(struct _cef_view_t * self)140 browser_view_as_browser_view(struct _cef_view_t* self) {
141   shutdown_checker::AssertNotShutdown();
142 
143   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
144 
145   DCHECK(self);
146   if (!self)
147     return NULL;
148 
149   // Execute
150   CefRefPtr<CefBrowserView> _retval =
151       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
152           ->AsBrowserView();
153 
154   // Return type: refptr_same
155   return CefBrowserViewCppToC::Wrap(_retval);
156 }
157 
browser_view_as_button(struct _cef_view_t * self)158 cef_button_t* CEF_CALLBACK browser_view_as_button(struct _cef_view_t* self) {
159   shutdown_checker::AssertNotShutdown();
160 
161   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
162 
163   DCHECK(self);
164   if (!self)
165     return NULL;
166 
167   // Execute
168   CefRefPtr<CefButton> _retval =
169       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
170           ->AsButton();
171 
172   // Return type: refptr_same
173   return CefButtonCppToC::Wrap(_retval);
174 }
175 
browser_view_as_panel(struct _cef_view_t * self)176 cef_panel_t* CEF_CALLBACK browser_view_as_panel(struct _cef_view_t* self) {
177   shutdown_checker::AssertNotShutdown();
178 
179   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
180 
181   DCHECK(self);
182   if (!self)
183     return NULL;
184 
185   // Execute
186   CefRefPtr<CefPanel> _retval =
187       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
188           ->AsPanel();
189 
190   // Return type: refptr_same
191   return CefPanelCppToC::Wrap(_retval);
192 }
193 
194 cef_scroll_view_t* CEF_CALLBACK
browser_view_as_scroll_view(struct _cef_view_t * self)195 browser_view_as_scroll_view(struct _cef_view_t* self) {
196   shutdown_checker::AssertNotShutdown();
197 
198   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
199 
200   DCHECK(self);
201   if (!self)
202     return NULL;
203 
204   // Execute
205   CefRefPtr<CefScrollView> _retval =
206       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
207           ->AsScrollView();
208 
209   // Return type: refptr_same
210   return CefScrollViewCppToC::Wrap(_retval);
211 }
212 
213 cef_textfield_t* CEF_CALLBACK
browser_view_as_textfield(struct _cef_view_t * self)214 browser_view_as_textfield(struct _cef_view_t* self) {
215   shutdown_checker::AssertNotShutdown();
216 
217   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
218 
219   DCHECK(self);
220   if (!self)
221     return NULL;
222 
223   // Execute
224   CefRefPtr<CefTextfield> _retval =
225       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
226           ->AsTextfield();
227 
228   // Return type: refptr_same
229   return CefTextfieldCppToC::Wrap(_retval);
230 }
231 
232 cef_string_userfree_t CEF_CALLBACK
browser_view_get_type_string(struct _cef_view_t * self)233 browser_view_get_type_string(struct _cef_view_t* self) {
234   shutdown_checker::AssertNotShutdown();
235 
236   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
237 
238   DCHECK(self);
239   if (!self)
240     return NULL;
241 
242   // Execute
243   CefString _retval =
244       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
245           ->GetTypeString();
246 
247   // Return type: string
248   return _retval.DetachToUserFree();
249 }
250 
251 cef_string_userfree_t CEF_CALLBACK
browser_view_to_string(struct _cef_view_t * self,int include_children)252 browser_view_to_string(struct _cef_view_t* self, int include_children) {
253   shutdown_checker::AssertNotShutdown();
254 
255   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
256 
257   DCHECK(self);
258   if (!self)
259     return NULL;
260 
261   // Execute
262   CefString _retval =
263       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
264           ->ToString(include_children ? true : false);
265 
266   // Return type: string
267   return _retval.DetachToUserFree();
268 }
269 
browser_view_is_valid(struct _cef_view_t * self)270 int CEF_CALLBACK browser_view_is_valid(struct _cef_view_t* self) {
271   shutdown_checker::AssertNotShutdown();
272 
273   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
274 
275   DCHECK(self);
276   if (!self)
277     return 0;
278 
279   // Execute
280   bool _retval =
281       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
282           ->IsValid();
283 
284   // Return type: bool
285   return _retval;
286 }
287 
browser_view_is_attached(struct _cef_view_t * self)288 int CEF_CALLBACK browser_view_is_attached(struct _cef_view_t* self) {
289   shutdown_checker::AssertNotShutdown();
290 
291   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
292 
293   DCHECK(self);
294   if (!self)
295     return 0;
296 
297   // Execute
298   bool _retval =
299       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
300           ->IsAttached();
301 
302   // Return type: bool
303   return _retval;
304 }
305 
browser_view_is_same(struct _cef_view_t * self,struct _cef_view_t * that)306 int CEF_CALLBACK browser_view_is_same(struct _cef_view_t* self,
307                                       struct _cef_view_t* that) {
308   shutdown_checker::AssertNotShutdown();
309 
310   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
311 
312   DCHECK(self);
313   if (!self)
314     return 0;
315   // Verify param: that; type: refptr_same
316   DCHECK(that);
317   if (!that)
318     return 0;
319 
320   // Execute
321   bool _retval =
322       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
323           ->IsSame(CefViewCppToC::Unwrap(that));
324 
325   // Return type: bool
326   return _retval;
327 }
328 
329 struct _cef_view_delegate_t* CEF_CALLBACK
browser_view_get_delegate(struct _cef_view_t * self)330 browser_view_get_delegate(struct _cef_view_t* self) {
331   shutdown_checker::AssertNotShutdown();
332 
333   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
334 
335   DCHECK(self);
336   if (!self)
337     return NULL;
338 
339   // Execute
340   CefRefPtr<CefViewDelegate> _retval =
341       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
342           ->GetDelegate();
343 
344   // Return type: refptr_diff
345   return CefViewDelegateCToCpp::Unwrap(_retval);
346 }
347 
348 struct _cef_window_t* CEF_CALLBACK
browser_view_get_window(struct _cef_view_t * self)349 browser_view_get_window(struct _cef_view_t* self) {
350   shutdown_checker::AssertNotShutdown();
351 
352   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
353 
354   DCHECK(self);
355   if (!self)
356     return NULL;
357 
358   // Execute
359   CefRefPtr<CefWindow> _retval =
360       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
361           ->GetWindow();
362 
363   // Return type: refptr_same
364   return CefWindowCppToC::Wrap(_retval);
365 }
366 
browser_view_get_id(struct _cef_view_t * self)367 int CEF_CALLBACK browser_view_get_id(struct _cef_view_t* self) {
368   shutdown_checker::AssertNotShutdown();
369 
370   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
371 
372   DCHECK(self);
373   if (!self)
374     return 0;
375 
376   // Execute
377   int _retval =
378       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
379           ->GetID();
380 
381   // Return type: simple
382   return _retval;
383 }
384 
browser_view_set_id(struct _cef_view_t * self,int id)385 void CEF_CALLBACK browser_view_set_id(struct _cef_view_t* self, int id) {
386   shutdown_checker::AssertNotShutdown();
387 
388   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
389 
390   DCHECK(self);
391   if (!self)
392     return;
393 
394   // Execute
395   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
396       ->SetID(id);
397 }
398 
browser_view_get_group_id(struct _cef_view_t * self)399 int CEF_CALLBACK browser_view_get_group_id(struct _cef_view_t* self) {
400   shutdown_checker::AssertNotShutdown();
401 
402   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
403 
404   DCHECK(self);
405   if (!self)
406     return 0;
407 
408   // Execute
409   int _retval =
410       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
411           ->GetGroupID();
412 
413   // Return type: simple
414   return _retval;
415 }
416 
browser_view_set_group_id(struct _cef_view_t * self,int group_id)417 void CEF_CALLBACK browser_view_set_group_id(struct _cef_view_t* self,
418                                             int group_id) {
419   shutdown_checker::AssertNotShutdown();
420 
421   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
422 
423   DCHECK(self);
424   if (!self)
425     return;
426 
427   // Execute
428   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
429       ->SetGroupID(group_id);
430 }
431 
432 struct _cef_view_t* CEF_CALLBACK
browser_view_get_parent_view(struct _cef_view_t * self)433 browser_view_get_parent_view(struct _cef_view_t* self) {
434   shutdown_checker::AssertNotShutdown();
435 
436   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
437 
438   DCHECK(self);
439   if (!self)
440     return NULL;
441 
442   // Execute
443   CefRefPtr<CefView> _retval =
444       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
445           ->GetParentView();
446 
447   // Return type: refptr_same
448   return CefViewCppToC::Wrap(_retval);
449 }
450 
451 struct _cef_view_t* CEF_CALLBACK
browser_view_get_view_for_id(struct _cef_view_t * self,int id)452 browser_view_get_view_for_id(struct _cef_view_t* self, int id) {
453   shutdown_checker::AssertNotShutdown();
454 
455   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
456 
457   DCHECK(self);
458   if (!self)
459     return NULL;
460 
461   // Execute
462   CefRefPtr<CefView> _retval =
463       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
464           ->GetViewForID(id);
465 
466   // Return type: refptr_same
467   return CefViewCppToC::Wrap(_retval);
468 }
469 
browser_view_set_bounds(struct _cef_view_t * self,const cef_rect_t * bounds)470 void CEF_CALLBACK browser_view_set_bounds(struct _cef_view_t* self,
471                                           const cef_rect_t* bounds) {
472   shutdown_checker::AssertNotShutdown();
473 
474   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
475 
476   DCHECK(self);
477   if (!self)
478     return;
479   // Verify param: bounds; type: simple_byref_const
480   DCHECK(bounds);
481   if (!bounds)
482     return;
483 
484   // Translate param: bounds; type: simple_byref_const
485   CefRect boundsVal = bounds ? *bounds : CefRect();
486 
487   // Execute
488   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
489       ->SetBounds(boundsVal);
490 }
491 
browser_view_get_bounds(struct _cef_view_t * self)492 cef_rect_t CEF_CALLBACK browser_view_get_bounds(struct _cef_view_t* self) {
493   shutdown_checker::AssertNotShutdown();
494 
495   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
496 
497   DCHECK(self);
498   if (!self)
499     return CefRect();
500 
501   // Execute
502   cef_rect_t _retval =
503       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
504           ->GetBounds();
505 
506   // Return type: simple
507   return _retval;
508 }
509 
510 cef_rect_t CEF_CALLBACK
browser_view_get_bounds_in_screen(struct _cef_view_t * self)511 browser_view_get_bounds_in_screen(struct _cef_view_t* self) {
512   shutdown_checker::AssertNotShutdown();
513 
514   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
515 
516   DCHECK(self);
517   if (!self)
518     return CefRect();
519 
520   // Execute
521   cef_rect_t _retval =
522       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
523           ->GetBoundsInScreen();
524 
525   // Return type: simple
526   return _retval;
527 }
528 
browser_view_set_size(struct _cef_view_t * self,const cef_size_t * size)529 void CEF_CALLBACK browser_view_set_size(struct _cef_view_t* self,
530                                         const cef_size_t* size) {
531   shutdown_checker::AssertNotShutdown();
532 
533   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
534 
535   DCHECK(self);
536   if (!self)
537     return;
538   // Verify param: size; type: simple_byref_const
539   DCHECK(size);
540   if (!size)
541     return;
542 
543   // Translate param: size; type: simple_byref_const
544   CefSize sizeVal = size ? *size : CefSize();
545 
546   // Execute
547   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
548       ->SetSize(sizeVal);
549 }
550 
browser_view_get_size(struct _cef_view_t * self)551 cef_size_t CEF_CALLBACK browser_view_get_size(struct _cef_view_t* self) {
552   shutdown_checker::AssertNotShutdown();
553 
554   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
555 
556   DCHECK(self);
557   if (!self)
558     return CefSize();
559 
560   // Execute
561   cef_size_t _retval =
562       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
563           ->GetSize();
564 
565   // Return type: simple
566   return _retval;
567 }
568 
browser_view_set_position(struct _cef_view_t * self,const cef_point_t * position)569 void CEF_CALLBACK browser_view_set_position(struct _cef_view_t* self,
570                                             const cef_point_t* position) {
571   shutdown_checker::AssertNotShutdown();
572 
573   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
574 
575   DCHECK(self);
576   if (!self)
577     return;
578   // Verify param: position; type: simple_byref_const
579   DCHECK(position);
580   if (!position)
581     return;
582 
583   // Translate param: position; type: simple_byref_const
584   CefPoint positionVal = position ? *position : CefPoint();
585 
586   // Execute
587   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
588       ->SetPosition(positionVal);
589 }
590 
browser_view_get_position(struct _cef_view_t * self)591 cef_point_t CEF_CALLBACK browser_view_get_position(struct _cef_view_t* self) {
592   shutdown_checker::AssertNotShutdown();
593 
594   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
595 
596   DCHECK(self);
597   if (!self)
598     return CefPoint();
599 
600   // Execute
601   cef_point_t _retval =
602       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
603           ->GetPosition();
604 
605   // Return type: simple
606   return _retval;
607 }
608 
609 cef_size_t CEF_CALLBACK
browser_view_get_preferred_size(struct _cef_view_t * self)610 browser_view_get_preferred_size(struct _cef_view_t* self) {
611   shutdown_checker::AssertNotShutdown();
612 
613   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
614 
615   DCHECK(self);
616   if (!self)
617     return CefSize();
618 
619   // Execute
620   cef_size_t _retval =
621       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
622           ->GetPreferredSize();
623 
624   // Return type: simple
625   return _retval;
626 }
627 
628 void CEF_CALLBACK
browser_view_size_to_preferred_size(struct _cef_view_t * self)629 browser_view_size_to_preferred_size(struct _cef_view_t* self) {
630   shutdown_checker::AssertNotShutdown();
631 
632   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
633 
634   DCHECK(self);
635   if (!self)
636     return;
637 
638   // Execute
639   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
640       ->SizeToPreferredSize();
641 }
642 
643 cef_size_t CEF_CALLBACK
browser_view_get_minimum_size(struct _cef_view_t * self)644 browser_view_get_minimum_size(struct _cef_view_t* self) {
645   shutdown_checker::AssertNotShutdown();
646 
647   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
648 
649   DCHECK(self);
650   if (!self)
651     return CefSize();
652 
653   // Execute
654   cef_size_t _retval =
655       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
656           ->GetMinimumSize();
657 
658   // Return type: simple
659   return _retval;
660 }
661 
662 cef_size_t CEF_CALLBACK
browser_view_get_maximum_size(struct _cef_view_t * self)663 browser_view_get_maximum_size(struct _cef_view_t* self) {
664   shutdown_checker::AssertNotShutdown();
665 
666   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
667 
668   DCHECK(self);
669   if (!self)
670     return CefSize();
671 
672   // Execute
673   cef_size_t _retval =
674       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
675           ->GetMaximumSize();
676 
677   // Return type: simple
678   return _retval;
679 }
680 
browser_view_get_height_for_width(struct _cef_view_t * self,int width)681 int CEF_CALLBACK browser_view_get_height_for_width(struct _cef_view_t* self,
682                                                    int width) {
683   shutdown_checker::AssertNotShutdown();
684 
685   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
686 
687   DCHECK(self);
688   if (!self)
689     return 0;
690 
691   // Execute
692   int _retval =
693       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
694           ->GetHeightForWidth(width);
695 
696   // Return type: simple
697   return _retval;
698 }
699 
browser_view_invalidate_layout(struct _cef_view_t * self)700 void CEF_CALLBACK browser_view_invalidate_layout(struct _cef_view_t* self) {
701   shutdown_checker::AssertNotShutdown();
702 
703   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
704 
705   DCHECK(self);
706   if (!self)
707     return;
708 
709   // Execute
710   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
711       ->InvalidateLayout();
712 }
713 
browser_view_set_visible(struct _cef_view_t * self,int visible)714 void CEF_CALLBACK browser_view_set_visible(struct _cef_view_t* self,
715                                            int visible) {
716   shutdown_checker::AssertNotShutdown();
717 
718   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
719 
720   DCHECK(self);
721   if (!self)
722     return;
723 
724   // Execute
725   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
726       ->SetVisible(visible ? true : false);
727 }
728 
browser_view_is_visible(struct _cef_view_t * self)729 int CEF_CALLBACK browser_view_is_visible(struct _cef_view_t* self) {
730   shutdown_checker::AssertNotShutdown();
731 
732   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
733 
734   DCHECK(self);
735   if (!self)
736     return 0;
737 
738   // Execute
739   bool _retval =
740       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
741           ->IsVisible();
742 
743   // Return type: bool
744   return _retval;
745 }
746 
browser_view_is_drawn(struct _cef_view_t * self)747 int CEF_CALLBACK browser_view_is_drawn(struct _cef_view_t* self) {
748   shutdown_checker::AssertNotShutdown();
749 
750   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
751 
752   DCHECK(self);
753   if (!self)
754     return 0;
755 
756   // Execute
757   bool _retval =
758       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
759           ->IsDrawn();
760 
761   // Return type: bool
762   return _retval;
763 }
764 
browser_view_set_enabled(struct _cef_view_t * self,int enabled)765 void CEF_CALLBACK browser_view_set_enabled(struct _cef_view_t* self,
766                                            int enabled) {
767   shutdown_checker::AssertNotShutdown();
768 
769   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
770 
771   DCHECK(self);
772   if (!self)
773     return;
774 
775   // Execute
776   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
777       ->SetEnabled(enabled ? true : false);
778 }
779 
browser_view_is_enabled(struct _cef_view_t * self)780 int CEF_CALLBACK browser_view_is_enabled(struct _cef_view_t* self) {
781   shutdown_checker::AssertNotShutdown();
782 
783   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
784 
785   DCHECK(self);
786   if (!self)
787     return 0;
788 
789   // Execute
790   bool _retval =
791       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
792           ->IsEnabled();
793 
794   // Return type: bool
795   return _retval;
796 }
797 
browser_view_set_focusable(struct _cef_view_t * self,int focusable)798 void CEF_CALLBACK browser_view_set_focusable(struct _cef_view_t* self,
799                                              int focusable) {
800   shutdown_checker::AssertNotShutdown();
801 
802   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
803 
804   DCHECK(self);
805   if (!self)
806     return;
807 
808   // Execute
809   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
810       ->SetFocusable(focusable ? true : false);
811 }
812 
browser_view_is_focusable(struct _cef_view_t * self)813 int CEF_CALLBACK browser_view_is_focusable(struct _cef_view_t* self) {
814   shutdown_checker::AssertNotShutdown();
815 
816   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
817 
818   DCHECK(self);
819   if (!self)
820     return 0;
821 
822   // Execute
823   bool _retval =
824       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
825           ->IsFocusable();
826 
827   // Return type: bool
828   return _retval;
829 }
830 
831 int CEF_CALLBACK
browser_view_is_accessibility_focusable(struct _cef_view_t * self)832 browser_view_is_accessibility_focusable(struct _cef_view_t* self) {
833   shutdown_checker::AssertNotShutdown();
834 
835   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
836 
837   DCHECK(self);
838   if (!self)
839     return 0;
840 
841   // Execute
842   bool _retval =
843       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
844           ->IsAccessibilityFocusable();
845 
846   // Return type: bool
847   return _retval;
848 }
849 
browser_view_request_focus(struct _cef_view_t * self)850 void CEF_CALLBACK browser_view_request_focus(struct _cef_view_t* self) {
851   shutdown_checker::AssertNotShutdown();
852 
853   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
854 
855   DCHECK(self);
856   if (!self)
857     return;
858 
859   // Execute
860   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
861       ->RequestFocus();
862 }
863 
browser_view_set_background_color(struct _cef_view_t * self,cef_color_t color)864 void CEF_CALLBACK browser_view_set_background_color(struct _cef_view_t* self,
865                                                     cef_color_t color) {
866   shutdown_checker::AssertNotShutdown();
867 
868   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
869 
870   DCHECK(self);
871   if (!self)
872     return;
873 
874   // Execute
875   CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
876       ->SetBackgroundColor(color);
877 }
878 
879 cef_color_t CEF_CALLBACK
browser_view_get_background_color(struct _cef_view_t * self)880 browser_view_get_background_color(struct _cef_view_t* self) {
881   shutdown_checker::AssertNotShutdown();
882 
883   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
884 
885   DCHECK(self);
886   if (!self)
887     return 0;
888 
889   // Execute
890   cef_color_t _retval =
891       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
892           ->GetBackgroundColor();
893 
894   // Return type: simple
895   return _retval;
896 }
897 
browser_view_convert_point_to_screen(struct _cef_view_t * self,cef_point_t * point)898 int CEF_CALLBACK browser_view_convert_point_to_screen(struct _cef_view_t* self,
899                                                       cef_point_t* point) {
900   shutdown_checker::AssertNotShutdown();
901 
902   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
903 
904   DCHECK(self);
905   if (!self)
906     return 0;
907   // Verify param: point; type: simple_byref
908   DCHECK(point);
909   if (!point)
910     return 0;
911 
912   // Translate param: point; type: simple_byref
913   CefPoint pointVal = point ? *point : CefPoint();
914 
915   // Execute
916   bool _retval =
917       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
918           ->ConvertPointToScreen(pointVal);
919 
920   // Restore param: point; type: simple_byref
921   if (point)
922     *point = pointVal;
923 
924   // Return type: bool
925   return _retval;
926 }
927 
928 int CEF_CALLBACK
browser_view_convert_point_from_screen(struct _cef_view_t * self,cef_point_t * point)929 browser_view_convert_point_from_screen(struct _cef_view_t* self,
930                                        cef_point_t* point) {
931   shutdown_checker::AssertNotShutdown();
932 
933   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
934 
935   DCHECK(self);
936   if (!self)
937     return 0;
938   // Verify param: point; type: simple_byref
939   DCHECK(point);
940   if (!point)
941     return 0;
942 
943   // Translate param: point; type: simple_byref
944   CefPoint pointVal = point ? *point : CefPoint();
945 
946   // Execute
947   bool _retval =
948       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
949           ->ConvertPointFromScreen(pointVal);
950 
951   // Restore param: point; type: simple_byref
952   if (point)
953     *point = pointVal;
954 
955   // Return type: bool
956   return _retval;
957 }
958 
browser_view_convert_point_to_window(struct _cef_view_t * self,cef_point_t * point)959 int CEF_CALLBACK browser_view_convert_point_to_window(struct _cef_view_t* self,
960                                                       cef_point_t* point) {
961   shutdown_checker::AssertNotShutdown();
962 
963   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
964 
965   DCHECK(self);
966   if (!self)
967     return 0;
968   // Verify param: point; type: simple_byref
969   DCHECK(point);
970   if (!point)
971     return 0;
972 
973   // Translate param: point; type: simple_byref
974   CefPoint pointVal = point ? *point : CefPoint();
975 
976   // Execute
977   bool _retval =
978       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
979           ->ConvertPointToWindow(pointVal);
980 
981   // Restore param: point; type: simple_byref
982   if (point)
983     *point = pointVal;
984 
985   // Return type: bool
986   return _retval;
987 }
988 
989 int CEF_CALLBACK
browser_view_convert_point_from_window(struct _cef_view_t * self,cef_point_t * point)990 browser_view_convert_point_from_window(struct _cef_view_t* self,
991                                        cef_point_t* point) {
992   shutdown_checker::AssertNotShutdown();
993 
994   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
995 
996   DCHECK(self);
997   if (!self)
998     return 0;
999   // Verify param: point; type: simple_byref
1000   DCHECK(point);
1001   if (!point)
1002     return 0;
1003 
1004   // Translate param: point; type: simple_byref
1005   CefPoint pointVal = point ? *point : CefPoint();
1006 
1007   // Execute
1008   bool _retval =
1009       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
1010           ->ConvertPointFromWindow(pointVal);
1011 
1012   // Restore param: point; type: simple_byref
1013   if (point)
1014     *point = pointVal;
1015 
1016   // Return type: bool
1017   return _retval;
1018 }
1019 
browser_view_convert_point_to_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)1020 int CEF_CALLBACK browser_view_convert_point_to_view(struct _cef_view_t* self,
1021                                                     struct _cef_view_t* view,
1022                                                     cef_point_t* point) {
1023   shutdown_checker::AssertNotShutdown();
1024 
1025   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1026 
1027   DCHECK(self);
1028   if (!self)
1029     return 0;
1030   // Verify param: view; type: refptr_same
1031   DCHECK(view);
1032   if (!view)
1033     return 0;
1034   // Verify param: point; type: simple_byref
1035   DCHECK(point);
1036   if (!point)
1037     return 0;
1038 
1039   // Translate param: point; type: simple_byref
1040   CefPoint pointVal = point ? *point : CefPoint();
1041 
1042   // Execute
1043   bool _retval =
1044       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
1045           ->ConvertPointToView(CefViewCppToC::Unwrap(view), pointVal);
1046 
1047   // Restore param: point; type: simple_byref
1048   if (point)
1049     *point = pointVal;
1050 
1051   // Return type: bool
1052   return _retval;
1053 }
1054 
browser_view_convert_point_from_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)1055 int CEF_CALLBACK browser_view_convert_point_from_view(struct _cef_view_t* self,
1056                                                       struct _cef_view_t* view,
1057                                                       cef_point_t* point) {
1058   shutdown_checker::AssertNotShutdown();
1059 
1060   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1061 
1062   DCHECK(self);
1063   if (!self)
1064     return 0;
1065   // Verify param: view; type: refptr_same
1066   DCHECK(view);
1067   if (!view)
1068     return 0;
1069   // Verify param: point; type: simple_byref
1070   DCHECK(point);
1071   if (!point)
1072     return 0;
1073 
1074   // Translate param: point; type: simple_byref
1075   CefPoint pointVal = point ? *point : CefPoint();
1076 
1077   // Execute
1078   bool _retval =
1079       CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))
1080           ->ConvertPointFromView(CefViewCppToC::Unwrap(view), pointVal);
1081 
1082   // Restore param: point; type: simple_byref
1083   if (point)
1084     *point = pointVal;
1085 
1086   // Return type: bool
1087   return _retval;
1088 }
1089 
1090 }  // namespace
1091 
1092 // CONSTRUCTOR - Do not edit by hand.
1093 
CefBrowserViewCppToC()1094 CefBrowserViewCppToC::CefBrowserViewCppToC() {
1095   GetStruct()->get_browser = browser_view_get_browser;
1096   GetStruct()->get_chrome_toolbar = browser_view_get_chrome_toolbar;
1097   GetStruct()->set_prefer_accelerators = browser_view_set_prefer_accelerators;
1098   GetStruct()->base.as_browser_view = browser_view_as_browser_view;
1099   GetStruct()->base.as_button = browser_view_as_button;
1100   GetStruct()->base.as_panel = browser_view_as_panel;
1101   GetStruct()->base.as_scroll_view = browser_view_as_scroll_view;
1102   GetStruct()->base.as_textfield = browser_view_as_textfield;
1103   GetStruct()->base.get_type_string = browser_view_get_type_string;
1104   GetStruct()->base.to_string = browser_view_to_string;
1105   GetStruct()->base.is_valid = browser_view_is_valid;
1106   GetStruct()->base.is_attached = browser_view_is_attached;
1107   GetStruct()->base.is_same = browser_view_is_same;
1108   GetStruct()->base.get_delegate = browser_view_get_delegate;
1109   GetStruct()->base.get_window = browser_view_get_window;
1110   GetStruct()->base.get_id = browser_view_get_id;
1111   GetStruct()->base.set_id = browser_view_set_id;
1112   GetStruct()->base.get_group_id = browser_view_get_group_id;
1113   GetStruct()->base.set_group_id = browser_view_set_group_id;
1114   GetStruct()->base.get_parent_view = browser_view_get_parent_view;
1115   GetStruct()->base.get_view_for_id = browser_view_get_view_for_id;
1116   GetStruct()->base.set_bounds = browser_view_set_bounds;
1117   GetStruct()->base.get_bounds = browser_view_get_bounds;
1118   GetStruct()->base.get_bounds_in_screen = browser_view_get_bounds_in_screen;
1119   GetStruct()->base.set_size = browser_view_set_size;
1120   GetStruct()->base.get_size = browser_view_get_size;
1121   GetStruct()->base.set_position = browser_view_set_position;
1122   GetStruct()->base.get_position = browser_view_get_position;
1123   GetStruct()->base.get_preferred_size = browser_view_get_preferred_size;
1124   GetStruct()->base.size_to_preferred_size =
1125       browser_view_size_to_preferred_size;
1126   GetStruct()->base.get_minimum_size = browser_view_get_minimum_size;
1127   GetStruct()->base.get_maximum_size = browser_view_get_maximum_size;
1128   GetStruct()->base.get_height_for_width = browser_view_get_height_for_width;
1129   GetStruct()->base.invalidate_layout = browser_view_invalidate_layout;
1130   GetStruct()->base.set_visible = browser_view_set_visible;
1131   GetStruct()->base.is_visible = browser_view_is_visible;
1132   GetStruct()->base.is_drawn = browser_view_is_drawn;
1133   GetStruct()->base.set_enabled = browser_view_set_enabled;
1134   GetStruct()->base.is_enabled = browser_view_is_enabled;
1135   GetStruct()->base.set_focusable = browser_view_set_focusable;
1136   GetStruct()->base.is_focusable = browser_view_is_focusable;
1137   GetStruct()->base.is_accessibility_focusable =
1138       browser_view_is_accessibility_focusable;
1139   GetStruct()->base.request_focus = browser_view_request_focus;
1140   GetStruct()->base.set_background_color = browser_view_set_background_color;
1141   GetStruct()->base.get_background_color = browser_view_get_background_color;
1142   GetStruct()->base.convert_point_to_screen =
1143       browser_view_convert_point_to_screen;
1144   GetStruct()->base.convert_point_from_screen =
1145       browser_view_convert_point_from_screen;
1146   GetStruct()->base.convert_point_to_window =
1147       browser_view_convert_point_to_window;
1148   GetStruct()->base.convert_point_from_window =
1149       browser_view_convert_point_from_window;
1150   GetStruct()->base.convert_point_to_view = browser_view_convert_point_to_view;
1151   GetStruct()->base.convert_point_from_view =
1152       browser_view_convert_point_from_view;
1153 }
1154 
1155 // DESTRUCTOR - Do not edit by hand.
1156 
~CefBrowserViewCppToC()1157 CefBrowserViewCppToC::~CefBrowserViewCppToC() {
1158   shutdown_checker::AssertNotShutdown();
1159 }
1160 
1161 template <>
1162 CefRefPtr<CefBrowserView>
1163 CefCppToCRefCounted<CefBrowserViewCppToC, CefBrowserView, cef_browser_view_t>::
UnwrapDerived(CefWrapperType type,cef_browser_view_t * s)1164     UnwrapDerived(CefWrapperType type, cef_browser_view_t* s) {
1165   NOTREACHED() << "Unexpected class type: " << type;
1166   return nullptr;
1167 }
1168 
1169 template <>
1170 CefWrapperType CefCppToCRefCounted<CefBrowserViewCppToC,
1171                                    CefBrowserView,
1172                                    cef_browser_view_t>::kWrapperType =
1173     WT_BROWSER_VIEW;
1174