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=a45e96e634e88deb54637d0d570a827d49282150$
13 //
14
15 #include "libcef_dll/cpptoc/browser_host_cpptoc.h"
16 #include "libcef_dll/cpptoc/browser_cpptoc.h"
17 #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h"
18 #include "libcef_dll/cpptoc/drag_data_cpptoc.h"
19 #include "libcef_dll/cpptoc/extension_cpptoc.h"
20 #include "libcef_dll/cpptoc/navigation_entry_cpptoc.h"
21 #include "libcef_dll/cpptoc/registration_cpptoc.h"
22 #include "libcef_dll/cpptoc/request_context_cpptoc.h"
23 #include "libcef_dll/ctocpp/client_ctocpp.h"
24 #include "libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h"
25 #include "libcef_dll/ctocpp/download_image_callback_ctocpp.h"
26 #include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h"
27 #include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h"
28 #include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h"
29 #include "libcef_dll/shutdown_checker.h"
30 #include "libcef_dll/transfer_util.h"
31
32 // GLOBAL FUNCTIONS - Body may be edited by hand.
33
cef_browser_host_create_browser(const cef_window_info_t * windowInfo,struct _cef_client_t * client,const cef_string_t * url,const struct _cef_browser_settings_t * settings,struct _cef_dictionary_value_t * extra_info,struct _cef_request_context_t * request_context)34 CEF_EXPORT int cef_browser_host_create_browser(
35 const cef_window_info_t* windowInfo,
36 struct _cef_client_t* client,
37 const cef_string_t* url,
38 const struct _cef_browser_settings_t* settings,
39 struct _cef_dictionary_value_t* extra_info,
40 struct _cef_request_context_t* request_context) {
41 shutdown_checker::AssertNotShutdown();
42
43 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
44
45 // Verify param: windowInfo; type: struct_byref_const
46 DCHECK(windowInfo);
47 if (!windowInfo)
48 return 0;
49 // Verify param: settings; type: struct_byref_const
50 DCHECK(settings);
51 if (!settings)
52 return 0;
53 // Unverified params: client, url, extra_info, request_context
54
55 // Translate param: windowInfo; type: struct_byref_const
56 CefWindowInfo windowInfoObj;
57 if (windowInfo)
58 windowInfoObj.Set(*windowInfo, false);
59 // Translate param: settings; type: struct_byref_const
60 CefBrowserSettings settingsObj;
61 if (settings)
62 settingsObj.Set(*settings, false);
63
64 // Execute
65 bool _retval = CefBrowserHost::CreateBrowser(
66 windowInfoObj, CefClientCToCpp::Wrap(client), CefString(url), settingsObj,
67 CefDictionaryValueCppToC::Unwrap(extra_info),
68 CefRequestContextCppToC::Unwrap(request_context));
69
70 // Return type: bool
71 return _retval;
72 }
73
cef_browser_host_create_browser_sync(const cef_window_info_t * windowInfo,struct _cef_client_t * client,const cef_string_t * url,const struct _cef_browser_settings_t * settings,struct _cef_dictionary_value_t * extra_info,struct _cef_request_context_t * request_context)74 CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync(
75 const cef_window_info_t* windowInfo,
76 struct _cef_client_t* client,
77 const cef_string_t* url,
78 const struct _cef_browser_settings_t* settings,
79 struct _cef_dictionary_value_t* extra_info,
80 struct _cef_request_context_t* request_context) {
81 shutdown_checker::AssertNotShutdown();
82
83 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
84
85 // Verify param: windowInfo; type: struct_byref_const
86 DCHECK(windowInfo);
87 if (!windowInfo)
88 return NULL;
89 // Verify param: settings; type: struct_byref_const
90 DCHECK(settings);
91 if (!settings)
92 return NULL;
93 // Unverified params: client, url, extra_info, request_context
94
95 // Translate param: windowInfo; type: struct_byref_const
96 CefWindowInfo windowInfoObj;
97 if (windowInfo)
98 windowInfoObj.Set(*windowInfo, false);
99 // Translate param: settings; type: struct_byref_const
100 CefBrowserSettings settingsObj;
101 if (settings)
102 settingsObj.Set(*settings, false);
103
104 // Execute
105 CefRefPtr<CefBrowser> _retval = CefBrowserHost::CreateBrowserSync(
106 windowInfoObj, CefClientCToCpp::Wrap(client), CefString(url), settingsObj,
107 CefDictionaryValueCppToC::Unwrap(extra_info),
108 CefRequestContextCppToC::Unwrap(request_context));
109
110 // Return type: refptr_same
111 return CefBrowserCppToC::Wrap(_retval);
112 }
113
114 namespace {
115
116 // MEMBER FUNCTIONS - Body may be edited by hand.
117
118 cef_browser_t* CEF_CALLBACK
browser_host_get_browser(struct _cef_browser_host_t * self)119 browser_host_get_browser(struct _cef_browser_host_t* self) {
120 shutdown_checker::AssertNotShutdown();
121
122 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
123
124 DCHECK(self);
125 if (!self)
126 return NULL;
127
128 // Execute
129 CefRefPtr<CefBrowser> _retval = CefBrowserHostCppToC::Get(self)->GetBrowser();
130
131 // Return type: refptr_same
132 return CefBrowserCppToC::Wrap(_retval);
133 }
134
browser_host_close_browser(struct _cef_browser_host_t * self,int force_close)135 void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self,
136 int force_close) {
137 shutdown_checker::AssertNotShutdown();
138
139 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
140
141 DCHECK(self);
142 if (!self)
143 return;
144
145 // Execute
146 CefBrowserHostCppToC::Get(self)->CloseBrowser(force_close ? true : false);
147 }
148
149 int CEF_CALLBACK
browser_host_try_close_browser(struct _cef_browser_host_t * self)150 browser_host_try_close_browser(struct _cef_browser_host_t* self) {
151 shutdown_checker::AssertNotShutdown();
152
153 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
154
155 DCHECK(self);
156 if (!self)
157 return 0;
158
159 // Execute
160 bool _retval = CefBrowserHostCppToC::Get(self)->TryCloseBrowser();
161
162 // Return type: bool
163 return _retval;
164 }
165
browser_host_set_focus(struct _cef_browser_host_t * self,int focus)166 void CEF_CALLBACK browser_host_set_focus(struct _cef_browser_host_t* self,
167 int focus) {
168 shutdown_checker::AssertNotShutdown();
169
170 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
171
172 DCHECK(self);
173 if (!self)
174 return;
175
176 // Execute
177 CefBrowserHostCppToC::Get(self)->SetFocus(focus ? true : false);
178 }
179
180 cef_window_handle_t CEF_CALLBACK
browser_host_get_window_handle(struct _cef_browser_host_t * self)181 browser_host_get_window_handle(struct _cef_browser_host_t* self) {
182 shutdown_checker::AssertNotShutdown();
183
184 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
185
186 DCHECK(self);
187 if (!self)
188 return kNullWindowHandle;
189
190 // Execute
191 cef_window_handle_t _retval =
192 CefBrowserHostCppToC::Get(self)->GetWindowHandle();
193
194 // Return type: simple
195 return _retval;
196 }
197
198 cef_window_handle_t CEF_CALLBACK
browser_host_get_opener_window_handle(struct _cef_browser_host_t * self)199 browser_host_get_opener_window_handle(struct _cef_browser_host_t* self) {
200 shutdown_checker::AssertNotShutdown();
201
202 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
203
204 DCHECK(self);
205 if (!self)
206 return kNullWindowHandle;
207
208 // Execute
209 cef_window_handle_t _retval =
210 CefBrowserHostCppToC::Get(self)->GetOpenerWindowHandle();
211
212 // Return type: simple
213 return _retval;
214 }
215
browser_host_has_view(struct _cef_browser_host_t * self)216 int CEF_CALLBACK browser_host_has_view(struct _cef_browser_host_t* self) {
217 shutdown_checker::AssertNotShutdown();
218
219 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
220
221 DCHECK(self);
222 if (!self)
223 return 0;
224
225 // Execute
226 bool _retval = CefBrowserHostCppToC::Get(self)->HasView();
227
228 // Return type: bool
229 return _retval;
230 }
231
232 struct _cef_client_t* CEF_CALLBACK
browser_host_get_client(struct _cef_browser_host_t * self)233 browser_host_get_client(struct _cef_browser_host_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 CefRefPtr<CefClient> _retval = CefBrowserHostCppToC::Get(self)->GetClient();
244
245 // Return type: refptr_diff
246 return CefClientCToCpp::Unwrap(_retval);
247 }
248
249 struct _cef_request_context_t* CEF_CALLBACK
browser_host_get_request_context(struct _cef_browser_host_t * self)250 browser_host_get_request_context(struct _cef_browser_host_t* self) {
251 shutdown_checker::AssertNotShutdown();
252
253 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
254
255 DCHECK(self);
256 if (!self)
257 return NULL;
258
259 // Execute
260 CefRefPtr<CefRequestContext> _retval =
261 CefBrowserHostCppToC::Get(self)->GetRequestContext();
262
263 // Return type: refptr_same
264 return CefRequestContextCppToC::Wrap(_retval);
265 }
266
267 double CEF_CALLBACK
browser_host_get_zoom_level(struct _cef_browser_host_t * self)268 browser_host_get_zoom_level(struct _cef_browser_host_t* self) {
269 shutdown_checker::AssertNotShutdown();
270
271 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
272
273 DCHECK(self);
274 if (!self)
275 return 0;
276
277 // Execute
278 double _retval = CefBrowserHostCppToC::Get(self)->GetZoomLevel();
279
280 // Return type: simple
281 return _retval;
282 }
283
browser_host_set_zoom_level(struct _cef_browser_host_t * self,double zoomLevel)284 void CEF_CALLBACK browser_host_set_zoom_level(struct _cef_browser_host_t* self,
285 double zoomLevel) {
286 shutdown_checker::AssertNotShutdown();
287
288 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
289
290 DCHECK(self);
291 if (!self)
292 return;
293
294 // Execute
295 CefBrowserHostCppToC::Get(self)->SetZoomLevel(zoomLevel);
296 }
297
298 void CEF_CALLBACK
browser_host_run_file_dialog(struct _cef_browser_host_t * self,cef_file_dialog_mode_t mode,const cef_string_t * title,const cef_string_t * default_file_path,cef_string_list_t accept_filters,int selected_accept_filter,cef_run_file_dialog_callback_t * callback)299 browser_host_run_file_dialog(struct _cef_browser_host_t* self,
300 cef_file_dialog_mode_t mode,
301 const cef_string_t* title,
302 const cef_string_t* default_file_path,
303 cef_string_list_t accept_filters,
304 int selected_accept_filter,
305 cef_run_file_dialog_callback_t* callback) {
306 shutdown_checker::AssertNotShutdown();
307
308 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
309
310 DCHECK(self);
311 if (!self)
312 return;
313 // Verify param: selected_accept_filter; type: simple_byval
314 DCHECK_GE(selected_accept_filter, 0);
315 if (selected_accept_filter < 0)
316 return;
317 // Verify param: callback; type: refptr_diff
318 DCHECK(callback);
319 if (!callback)
320 return;
321 // Unverified params: title, default_file_path, accept_filters
322
323 // Translate param: accept_filters; type: string_vec_byref_const
324 std::vector<CefString> accept_filtersList;
325 transfer_string_list_contents(accept_filters, accept_filtersList);
326
327 // Execute
328 CefBrowserHostCppToC::Get(self)->RunFileDialog(
329 mode, CefString(title), CefString(default_file_path), accept_filtersList,
330 selected_accept_filter, CefRunFileDialogCallbackCToCpp::Wrap(callback));
331 }
332
browser_host_start_download(struct _cef_browser_host_t * self,const cef_string_t * url)333 void CEF_CALLBACK browser_host_start_download(struct _cef_browser_host_t* self,
334 const cef_string_t* url) {
335 shutdown_checker::AssertNotShutdown();
336
337 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
338
339 DCHECK(self);
340 if (!self)
341 return;
342 // Verify param: url; type: string_byref_const
343 DCHECK(url);
344 if (!url)
345 return;
346
347 // Execute
348 CefBrowserHostCppToC::Get(self)->StartDownload(CefString(url));
349 }
350
351 void CEF_CALLBACK
browser_host_download_image(struct _cef_browser_host_t * self,const cef_string_t * image_url,int is_favicon,uint32 max_image_size,int bypass_cache,cef_download_image_callback_t * callback)352 browser_host_download_image(struct _cef_browser_host_t* self,
353 const cef_string_t* image_url,
354 int is_favicon,
355 uint32 max_image_size,
356 int bypass_cache,
357 cef_download_image_callback_t* callback) {
358 shutdown_checker::AssertNotShutdown();
359
360 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
361
362 DCHECK(self);
363 if (!self)
364 return;
365 // Verify param: image_url; type: string_byref_const
366 DCHECK(image_url);
367 if (!image_url)
368 return;
369 // Verify param: callback; type: refptr_diff
370 DCHECK(callback);
371 if (!callback)
372 return;
373
374 // Execute
375 CefBrowserHostCppToC::Get(self)->DownloadImage(
376 CefString(image_url), is_favicon ? true : false, max_image_size,
377 bypass_cache ? true : false,
378 CefDownloadImageCallbackCToCpp::Wrap(callback));
379 }
380
browser_host_print(struct _cef_browser_host_t * self)381 void CEF_CALLBACK browser_host_print(struct _cef_browser_host_t* self) {
382 shutdown_checker::AssertNotShutdown();
383
384 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
385
386 DCHECK(self);
387 if (!self)
388 return;
389
390 // Execute
391 CefBrowserHostCppToC::Get(self)->Print();
392 }
393
394 void CEF_CALLBACK
browser_host_print_to_pdf(struct _cef_browser_host_t * self,const cef_string_t * path,const struct _cef_pdf_print_settings_t * settings,cef_pdf_print_callback_t * callback)395 browser_host_print_to_pdf(struct _cef_browser_host_t* self,
396 const cef_string_t* path,
397 const struct _cef_pdf_print_settings_t* settings,
398 cef_pdf_print_callback_t* callback) {
399 shutdown_checker::AssertNotShutdown();
400
401 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
402
403 DCHECK(self);
404 if (!self)
405 return;
406 // Verify param: path; type: string_byref_const
407 DCHECK(path);
408 if (!path)
409 return;
410 // Verify param: settings; type: struct_byref_const
411 DCHECK(settings);
412 if (!settings)
413 return;
414 // Unverified params: callback
415
416 // Translate param: settings; type: struct_byref_const
417 CefPdfPrintSettings settingsObj;
418 if (settings)
419 settingsObj.Set(*settings, false);
420
421 // Execute
422 CefBrowserHostCppToC::Get(self)->PrintToPDF(
423 CefString(path), settingsObj, CefPdfPrintCallbackCToCpp::Wrap(callback));
424 }
425
browser_host_find(struct _cef_browser_host_t * self,const cef_string_t * searchText,int forward,int matchCase,int findNext)426 void CEF_CALLBACK browser_host_find(struct _cef_browser_host_t* self,
427 const cef_string_t* searchText,
428 int forward,
429 int matchCase,
430 int findNext) {
431 shutdown_checker::AssertNotShutdown();
432
433 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
434
435 DCHECK(self);
436 if (!self)
437 return;
438 // Verify param: searchText; type: string_byref_const
439 DCHECK(searchText);
440 if (!searchText)
441 return;
442
443 // Execute
444 CefBrowserHostCppToC::Get(self)->Find(
445 CefString(searchText), forward ? true : false, matchCase ? true : false,
446 findNext ? true : false);
447 }
448
browser_host_stop_finding(struct _cef_browser_host_t * self,int clearSelection)449 void CEF_CALLBACK browser_host_stop_finding(struct _cef_browser_host_t* self,
450 int clearSelection) {
451 shutdown_checker::AssertNotShutdown();
452
453 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
454
455 DCHECK(self);
456 if (!self)
457 return;
458
459 // Execute
460 CefBrowserHostCppToC::Get(self)->StopFinding(clearSelection ? true : false);
461 }
462
463 void CEF_CALLBACK
browser_host_show_dev_tools(struct _cef_browser_host_t * self,const cef_window_info_t * windowInfo,struct _cef_client_t * client,const struct _cef_browser_settings_t * settings,const cef_point_t * inspect_element_at)464 browser_host_show_dev_tools(struct _cef_browser_host_t* self,
465 const cef_window_info_t* windowInfo,
466 struct _cef_client_t* client,
467 const struct _cef_browser_settings_t* settings,
468 const cef_point_t* inspect_element_at) {
469 shutdown_checker::AssertNotShutdown();
470
471 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
472
473 DCHECK(self);
474 if (!self)
475 return;
476 // Unverified params: windowInfo, client, settings, inspect_element_at
477
478 // Translate param: windowInfo; type: struct_byref_const
479 CefWindowInfo windowInfoObj;
480 if (windowInfo)
481 windowInfoObj.Set(*windowInfo, false);
482 // Translate param: settings; type: struct_byref_const
483 CefBrowserSettings settingsObj;
484 if (settings)
485 settingsObj.Set(*settings, false);
486 // Translate param: inspect_element_at; type: simple_byref_const
487 CefPoint inspect_element_atVal =
488 inspect_element_at ? *inspect_element_at : CefPoint();
489
490 // Execute
491 CefBrowserHostCppToC::Get(self)->ShowDevTools(
492 windowInfoObj, CefClientCToCpp::Wrap(client), settingsObj,
493 inspect_element_atVal);
494 }
495
496 void CEF_CALLBACK
browser_host_close_dev_tools(struct _cef_browser_host_t * self)497 browser_host_close_dev_tools(struct _cef_browser_host_t* self) {
498 shutdown_checker::AssertNotShutdown();
499
500 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
501
502 DCHECK(self);
503 if (!self)
504 return;
505
506 // Execute
507 CefBrowserHostCppToC::Get(self)->CloseDevTools();
508 }
509
browser_host_has_dev_tools(struct _cef_browser_host_t * self)510 int CEF_CALLBACK browser_host_has_dev_tools(struct _cef_browser_host_t* self) {
511 shutdown_checker::AssertNotShutdown();
512
513 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
514
515 DCHECK(self);
516 if (!self)
517 return 0;
518
519 // Execute
520 bool _retval = CefBrowserHostCppToC::Get(self)->HasDevTools();
521
522 // Return type: bool
523 return _retval;
524 }
525
526 int CEF_CALLBACK
browser_host_send_dev_tools_message(struct _cef_browser_host_t * self,const void * message,size_t message_size)527 browser_host_send_dev_tools_message(struct _cef_browser_host_t* self,
528 const void* message,
529 size_t message_size) {
530 shutdown_checker::AssertNotShutdown();
531
532 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
533
534 DCHECK(self);
535 if (!self)
536 return 0;
537 // Verify param: message; type: simple_byaddr
538 DCHECK(message);
539 if (!message)
540 return 0;
541
542 // Execute
543 bool _retval = CefBrowserHostCppToC::Get(self)->SendDevToolsMessage(
544 message, message_size);
545
546 // Return type: bool
547 return _retval;
548 }
549
550 int CEF_CALLBACK
browser_host_execute_dev_tools_method(struct _cef_browser_host_t * self,int message_id,const cef_string_t * method,struct _cef_dictionary_value_t * params)551 browser_host_execute_dev_tools_method(struct _cef_browser_host_t* self,
552 int message_id,
553 const cef_string_t* method,
554 struct _cef_dictionary_value_t* params) {
555 shutdown_checker::AssertNotShutdown();
556
557 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
558
559 DCHECK(self);
560 if (!self)
561 return 0;
562 // Verify param: method; type: string_byref_const
563 DCHECK(method);
564 if (!method)
565 return 0;
566 // Unverified params: params
567
568 // Execute
569 int _retval = CefBrowserHostCppToC::Get(self)->ExecuteDevToolsMethod(
570 message_id, CefString(method), CefDictionaryValueCppToC::Unwrap(params));
571
572 // Return type: simple
573 return _retval;
574 }
575
576 struct _cef_registration_t* CEF_CALLBACK
browser_host_add_dev_tools_message_observer(struct _cef_browser_host_t * self,struct _cef_dev_tools_message_observer_t * observer)577 browser_host_add_dev_tools_message_observer(
578 struct _cef_browser_host_t* self,
579 struct _cef_dev_tools_message_observer_t* observer) {
580 shutdown_checker::AssertNotShutdown();
581
582 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
583
584 DCHECK(self);
585 if (!self)
586 return NULL;
587 // Verify param: observer; type: refptr_diff
588 DCHECK(observer);
589 if (!observer)
590 return NULL;
591
592 // Execute
593 CefRefPtr<CefRegistration> _retval =
594 CefBrowserHostCppToC::Get(self)->AddDevToolsMessageObserver(
595 CefDevToolsMessageObserverCToCpp::Wrap(observer));
596
597 // Return type: refptr_same
598 return CefRegistrationCppToC::Wrap(_retval);
599 }
600
601 void CEF_CALLBACK
browser_host_get_navigation_entries(struct _cef_browser_host_t * self,cef_navigation_entry_visitor_t * visitor,int current_only)602 browser_host_get_navigation_entries(struct _cef_browser_host_t* self,
603 cef_navigation_entry_visitor_t* visitor,
604 int current_only) {
605 shutdown_checker::AssertNotShutdown();
606
607 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
608
609 DCHECK(self);
610 if (!self)
611 return;
612 // Verify param: visitor; type: refptr_diff
613 DCHECK(visitor);
614 if (!visitor)
615 return;
616
617 // Execute
618 CefBrowserHostCppToC::Get(self)->GetNavigationEntries(
619 CefNavigationEntryVisitorCToCpp::Wrap(visitor),
620 current_only ? true : false);
621 }
622
623 void CEF_CALLBACK
browser_host_replace_misspelling(struct _cef_browser_host_t * self,const cef_string_t * word)624 browser_host_replace_misspelling(struct _cef_browser_host_t* self,
625 const cef_string_t* word) {
626 shutdown_checker::AssertNotShutdown();
627
628 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
629
630 DCHECK(self);
631 if (!self)
632 return;
633 // Verify param: word; type: string_byref_const
634 DCHECK(word);
635 if (!word)
636 return;
637
638 // Execute
639 CefBrowserHostCppToC::Get(self)->ReplaceMisspelling(CefString(word));
640 }
641
642 void CEF_CALLBACK
browser_host_add_word_to_dictionary(struct _cef_browser_host_t * self,const cef_string_t * word)643 browser_host_add_word_to_dictionary(struct _cef_browser_host_t* self,
644 const cef_string_t* word) {
645 shutdown_checker::AssertNotShutdown();
646
647 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
648
649 DCHECK(self);
650 if (!self)
651 return;
652 // Verify param: word; type: string_byref_const
653 DCHECK(word);
654 if (!word)
655 return;
656
657 // Execute
658 CefBrowserHostCppToC::Get(self)->AddWordToDictionary(CefString(word));
659 }
660
661 int CEF_CALLBACK
browser_host_is_window_rendering_disabled(struct _cef_browser_host_t * self)662 browser_host_is_window_rendering_disabled(struct _cef_browser_host_t* self) {
663 shutdown_checker::AssertNotShutdown();
664
665 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
666
667 DCHECK(self);
668 if (!self)
669 return 0;
670
671 // Execute
672 bool _retval = CefBrowserHostCppToC::Get(self)->IsWindowRenderingDisabled();
673
674 // Return type: bool
675 return _retval;
676 }
677
browser_host_was_resized(struct _cef_browser_host_t * self)678 void CEF_CALLBACK browser_host_was_resized(struct _cef_browser_host_t* self) {
679 shutdown_checker::AssertNotShutdown();
680
681 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
682
683 DCHECK(self);
684 if (!self)
685 return;
686
687 // Execute
688 CefBrowserHostCppToC::Get(self)->WasResized();
689 }
690
browser_host_was_hidden(struct _cef_browser_host_t * self,int hidden)691 void CEF_CALLBACK browser_host_was_hidden(struct _cef_browser_host_t* self,
692 int hidden) {
693 shutdown_checker::AssertNotShutdown();
694
695 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
696
697 DCHECK(self);
698 if (!self)
699 return;
700
701 // Execute
702 CefBrowserHostCppToC::Get(self)->WasHidden(hidden ? true : false);
703 }
704
705 void CEF_CALLBACK
browser_host_notify_screen_info_changed(struct _cef_browser_host_t * self)706 browser_host_notify_screen_info_changed(struct _cef_browser_host_t* self) {
707 shutdown_checker::AssertNotShutdown();
708
709 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
710
711 DCHECK(self);
712 if (!self)
713 return;
714
715 // Execute
716 CefBrowserHostCppToC::Get(self)->NotifyScreenInfoChanged();
717 }
718
browser_host_invalidate(struct _cef_browser_host_t * self,cef_paint_element_type_t type)719 void CEF_CALLBACK browser_host_invalidate(struct _cef_browser_host_t* self,
720 cef_paint_element_type_t type) {
721 shutdown_checker::AssertNotShutdown();
722
723 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
724
725 DCHECK(self);
726 if (!self)
727 return;
728
729 // Execute
730 CefBrowserHostCppToC::Get(self)->Invalidate(type);
731 }
732
733 void CEF_CALLBACK
browser_host_send_external_begin_frame(struct _cef_browser_host_t * self)734 browser_host_send_external_begin_frame(struct _cef_browser_host_t* self) {
735 shutdown_checker::AssertNotShutdown();
736
737 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
738
739 DCHECK(self);
740 if (!self)
741 return;
742
743 // Execute
744 CefBrowserHostCppToC::Get(self)->SendExternalBeginFrame();
745 }
746
747 void CEF_CALLBACK
browser_host_send_key_event(struct _cef_browser_host_t * self,const struct _cef_key_event_t * event)748 browser_host_send_key_event(struct _cef_browser_host_t* self,
749 const struct _cef_key_event_t* event) {
750 shutdown_checker::AssertNotShutdown();
751
752 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
753
754 DCHECK(self);
755 if (!self)
756 return;
757 // Verify param: event; type: struct_byref_const
758 DCHECK(event);
759 if (!event)
760 return;
761
762 // Translate param: event; type: struct_byref_const
763 CefKeyEvent eventObj;
764 if (event)
765 eventObj.Set(*event, false);
766
767 // Execute
768 CefBrowserHostCppToC::Get(self)->SendKeyEvent(eventObj);
769 }
770
771 void CEF_CALLBACK
browser_host_send_mouse_click_event(struct _cef_browser_host_t * self,const struct _cef_mouse_event_t * event,cef_mouse_button_type_t type,int mouseUp,int clickCount)772 browser_host_send_mouse_click_event(struct _cef_browser_host_t* self,
773 const struct _cef_mouse_event_t* event,
774 cef_mouse_button_type_t type,
775 int mouseUp,
776 int clickCount) {
777 shutdown_checker::AssertNotShutdown();
778
779 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
780
781 DCHECK(self);
782 if (!self)
783 return;
784 // Verify param: event; type: struct_byref_const
785 DCHECK(event);
786 if (!event)
787 return;
788
789 // Translate param: event; type: struct_byref_const
790 CefMouseEvent eventObj;
791 if (event)
792 eventObj.Set(*event, false);
793
794 // Execute
795 CefBrowserHostCppToC::Get(self)->SendMouseClickEvent(
796 eventObj, type, mouseUp ? true : false, clickCount);
797 }
798
799 void CEF_CALLBACK
browser_host_send_mouse_move_event(struct _cef_browser_host_t * self,const struct _cef_mouse_event_t * event,int mouseLeave)800 browser_host_send_mouse_move_event(struct _cef_browser_host_t* self,
801 const struct _cef_mouse_event_t* event,
802 int mouseLeave) {
803 shutdown_checker::AssertNotShutdown();
804
805 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
806
807 DCHECK(self);
808 if (!self)
809 return;
810 // Verify param: event; type: struct_byref_const
811 DCHECK(event);
812 if (!event)
813 return;
814
815 // Translate param: event; type: struct_byref_const
816 CefMouseEvent eventObj;
817 if (event)
818 eventObj.Set(*event, false);
819
820 // Execute
821 CefBrowserHostCppToC::Get(self)->SendMouseMoveEvent(
822 eventObj, mouseLeave ? true : false);
823 }
824
825 void CEF_CALLBACK
browser_host_send_mouse_wheel_event(struct _cef_browser_host_t * self,const struct _cef_mouse_event_t * event,int deltaX,int deltaY)826 browser_host_send_mouse_wheel_event(struct _cef_browser_host_t* self,
827 const struct _cef_mouse_event_t* event,
828 int deltaX,
829 int deltaY) {
830 shutdown_checker::AssertNotShutdown();
831
832 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
833
834 DCHECK(self);
835 if (!self)
836 return;
837 // Verify param: event; type: struct_byref_const
838 DCHECK(event);
839 if (!event)
840 return;
841
842 // Translate param: event; type: struct_byref_const
843 CefMouseEvent eventObj;
844 if (event)
845 eventObj.Set(*event, false);
846
847 // Execute
848 CefBrowserHostCppToC::Get(self)->SendMouseWheelEvent(eventObj, deltaX,
849 deltaY);
850 }
851
852 void CEF_CALLBACK
browser_host_send_touch_event(struct _cef_browser_host_t * self,const struct _cef_touch_event_t * event)853 browser_host_send_touch_event(struct _cef_browser_host_t* self,
854 const struct _cef_touch_event_t* event) {
855 shutdown_checker::AssertNotShutdown();
856
857 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
858
859 DCHECK(self);
860 if (!self)
861 return;
862 // Verify param: event; type: struct_byref_const
863 DCHECK(event);
864 if (!event)
865 return;
866
867 // Translate param: event; type: struct_byref_const
868 CefTouchEvent eventObj;
869 if (event)
870 eventObj.Set(*event, false);
871
872 // Execute
873 CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventObj);
874 }
875
876 void CEF_CALLBACK
browser_host_send_capture_lost_event(struct _cef_browser_host_t * self)877 browser_host_send_capture_lost_event(struct _cef_browser_host_t* self) {
878 shutdown_checker::AssertNotShutdown();
879
880 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
881
882 DCHECK(self);
883 if (!self)
884 return;
885
886 // Execute
887 CefBrowserHostCppToC::Get(self)->SendCaptureLostEvent();
888 }
889
890 void CEF_CALLBACK
browser_host_notify_move_or_resize_started(struct _cef_browser_host_t * self)891 browser_host_notify_move_or_resize_started(struct _cef_browser_host_t* self) {
892 shutdown_checker::AssertNotShutdown();
893
894 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
895
896 DCHECK(self);
897 if (!self)
898 return;
899
900 // Execute
901 CefBrowserHostCppToC::Get(self)->NotifyMoveOrResizeStarted();
902 }
903
904 int CEF_CALLBACK
browser_host_get_windowless_frame_rate(struct _cef_browser_host_t * self)905 browser_host_get_windowless_frame_rate(struct _cef_browser_host_t* self) {
906 shutdown_checker::AssertNotShutdown();
907
908 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
909
910 DCHECK(self);
911 if (!self)
912 return 0;
913
914 // Execute
915 int _retval = CefBrowserHostCppToC::Get(self)->GetWindowlessFrameRate();
916
917 // Return type: simple
918 return _retval;
919 }
920
921 void CEF_CALLBACK
browser_host_set_windowless_frame_rate(struct _cef_browser_host_t * self,int frame_rate)922 browser_host_set_windowless_frame_rate(struct _cef_browser_host_t* self,
923 int frame_rate) {
924 shutdown_checker::AssertNotShutdown();
925
926 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
927
928 DCHECK(self);
929 if (!self)
930 return;
931
932 // Execute
933 CefBrowserHostCppToC::Get(self)->SetWindowlessFrameRate(frame_rate);
934 }
935
936 void CEF_CALLBACK
browser_host_ime_set_composition(struct _cef_browser_host_t * self,const cef_string_t * text,size_t underlinesCount,cef_composition_underline_t const * underlines,const cef_range_t * replacement_range,const cef_range_t * selection_range)937 browser_host_ime_set_composition(struct _cef_browser_host_t* self,
938 const cef_string_t* text,
939 size_t underlinesCount,
940 cef_composition_underline_t const* underlines,
941 const cef_range_t* replacement_range,
942 const cef_range_t* selection_range) {
943 shutdown_checker::AssertNotShutdown();
944
945 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
946
947 DCHECK(self);
948 if (!self)
949 return;
950 // Verify param: replacement_range; type: simple_byref_const
951 DCHECK(replacement_range);
952 if (!replacement_range)
953 return;
954 // Verify param: selection_range; type: simple_byref_const
955 DCHECK(selection_range);
956 if (!selection_range)
957 return;
958 // Unverified params: text, underlines
959
960 // Translate param: underlines; type: simple_vec_byref_const
961 std::vector<CefCompositionUnderline> underlinesList;
962 if (underlinesCount > 0) {
963 for (size_t i = 0; i < underlinesCount; ++i) {
964 CefCompositionUnderline underlinesVal = underlines[i];
965 underlinesList.push_back(underlinesVal);
966 }
967 }
968 // Translate param: replacement_range; type: simple_byref_const
969 CefRange replacement_rangeVal =
970 replacement_range ? *replacement_range : CefRange();
971 // Translate param: selection_range; type: simple_byref_const
972 CefRange selection_rangeVal = selection_range ? *selection_range : CefRange();
973
974 // Execute
975 CefBrowserHostCppToC::Get(self)->ImeSetComposition(
976 CefString(text), underlinesList, replacement_rangeVal,
977 selection_rangeVal);
978 }
979
980 void CEF_CALLBACK
browser_host_ime_commit_text(struct _cef_browser_host_t * self,const cef_string_t * text,const cef_range_t * replacement_range,int relative_cursor_pos)981 browser_host_ime_commit_text(struct _cef_browser_host_t* self,
982 const cef_string_t* text,
983 const cef_range_t* replacement_range,
984 int relative_cursor_pos) {
985 shutdown_checker::AssertNotShutdown();
986
987 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
988
989 DCHECK(self);
990 if (!self)
991 return;
992 // Verify param: replacement_range; type: simple_byref_const
993 DCHECK(replacement_range);
994 if (!replacement_range)
995 return;
996 // Unverified params: text
997
998 // Translate param: replacement_range; type: simple_byref_const
999 CefRange replacement_rangeVal =
1000 replacement_range ? *replacement_range : CefRange();
1001
1002 // Execute
1003 CefBrowserHostCppToC::Get(self)->ImeCommitText(
1004 CefString(text), replacement_rangeVal, relative_cursor_pos);
1005 }
1006
1007 void CEF_CALLBACK
browser_host_ime_finish_composing_text(struct _cef_browser_host_t * self,int keep_selection)1008 browser_host_ime_finish_composing_text(struct _cef_browser_host_t* self,
1009 int keep_selection) {
1010 shutdown_checker::AssertNotShutdown();
1011
1012 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1013
1014 DCHECK(self);
1015 if (!self)
1016 return;
1017
1018 // Execute
1019 CefBrowserHostCppToC::Get(self)->ImeFinishComposingText(
1020 keep_selection ? true : false);
1021 }
1022
1023 void CEF_CALLBACK
browser_host_ime_cancel_composition(struct _cef_browser_host_t * self)1024 browser_host_ime_cancel_composition(struct _cef_browser_host_t* self) {
1025 shutdown_checker::AssertNotShutdown();
1026
1027 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1028
1029 DCHECK(self);
1030 if (!self)
1031 return;
1032
1033 // Execute
1034 CefBrowserHostCppToC::Get(self)->ImeCancelComposition();
1035 }
1036
1037 void CEF_CALLBACK
browser_host_drag_target_drag_enter(struct _cef_browser_host_t * self,struct _cef_drag_data_t * drag_data,const struct _cef_mouse_event_t * event,cef_drag_operations_mask_t allowed_ops)1038 browser_host_drag_target_drag_enter(struct _cef_browser_host_t* self,
1039 struct _cef_drag_data_t* drag_data,
1040 const struct _cef_mouse_event_t* event,
1041 cef_drag_operations_mask_t allowed_ops) {
1042 shutdown_checker::AssertNotShutdown();
1043
1044 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1045
1046 DCHECK(self);
1047 if (!self)
1048 return;
1049 // Verify param: drag_data; type: refptr_same
1050 DCHECK(drag_data);
1051 if (!drag_data)
1052 return;
1053 // Verify param: event; type: struct_byref_const
1054 DCHECK(event);
1055 if (!event)
1056 return;
1057
1058 // Translate param: event; type: struct_byref_const
1059 CefMouseEvent eventObj;
1060 if (event)
1061 eventObj.Set(*event, false);
1062
1063 // Execute
1064 CefBrowserHostCppToC::Get(self)->DragTargetDragEnter(
1065 CefDragDataCppToC::Unwrap(drag_data), eventObj, allowed_ops);
1066 }
1067
1068 void CEF_CALLBACK
browser_host_drag_target_drag_over(struct _cef_browser_host_t * self,const struct _cef_mouse_event_t * event,cef_drag_operations_mask_t allowed_ops)1069 browser_host_drag_target_drag_over(struct _cef_browser_host_t* self,
1070 const struct _cef_mouse_event_t* event,
1071 cef_drag_operations_mask_t allowed_ops) {
1072 shutdown_checker::AssertNotShutdown();
1073
1074 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1075
1076 DCHECK(self);
1077 if (!self)
1078 return;
1079 // Verify param: event; type: struct_byref_const
1080 DCHECK(event);
1081 if (!event)
1082 return;
1083
1084 // Translate param: event; type: struct_byref_const
1085 CefMouseEvent eventObj;
1086 if (event)
1087 eventObj.Set(*event, false);
1088
1089 // Execute
1090 CefBrowserHostCppToC::Get(self)->DragTargetDragOver(eventObj, allowed_ops);
1091 }
1092
1093 void CEF_CALLBACK
browser_host_drag_target_drag_leave(struct _cef_browser_host_t * self)1094 browser_host_drag_target_drag_leave(struct _cef_browser_host_t* self) {
1095 shutdown_checker::AssertNotShutdown();
1096
1097 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1098
1099 DCHECK(self);
1100 if (!self)
1101 return;
1102
1103 // Execute
1104 CefBrowserHostCppToC::Get(self)->DragTargetDragLeave();
1105 }
1106
1107 void CEF_CALLBACK
browser_host_drag_target_drop(struct _cef_browser_host_t * self,const struct _cef_mouse_event_t * event)1108 browser_host_drag_target_drop(struct _cef_browser_host_t* self,
1109 const struct _cef_mouse_event_t* event) {
1110 shutdown_checker::AssertNotShutdown();
1111
1112 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1113
1114 DCHECK(self);
1115 if (!self)
1116 return;
1117 // Verify param: event; type: struct_byref_const
1118 DCHECK(event);
1119 if (!event)
1120 return;
1121
1122 // Translate param: event; type: struct_byref_const
1123 CefMouseEvent eventObj;
1124 if (event)
1125 eventObj.Set(*event, false);
1126
1127 // Execute
1128 CefBrowserHostCppToC::Get(self)->DragTargetDrop(eventObj);
1129 }
1130
1131 void CEF_CALLBACK
browser_host_drag_source_ended_at(struct _cef_browser_host_t * self,int x,int y,cef_drag_operations_mask_t op)1132 browser_host_drag_source_ended_at(struct _cef_browser_host_t* self,
1133 int x,
1134 int y,
1135 cef_drag_operations_mask_t op) {
1136 shutdown_checker::AssertNotShutdown();
1137
1138 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1139
1140 DCHECK(self);
1141 if (!self)
1142 return;
1143
1144 // Execute
1145 CefBrowserHostCppToC::Get(self)->DragSourceEndedAt(x, y, op);
1146 }
1147
1148 void CEF_CALLBACK
browser_host_drag_source_system_drag_ended(struct _cef_browser_host_t * self)1149 browser_host_drag_source_system_drag_ended(struct _cef_browser_host_t* self) {
1150 shutdown_checker::AssertNotShutdown();
1151
1152 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1153
1154 DCHECK(self);
1155 if (!self)
1156 return;
1157
1158 // Execute
1159 CefBrowserHostCppToC::Get(self)->DragSourceSystemDragEnded();
1160 }
1161
1162 struct _cef_navigation_entry_t* CEF_CALLBACK
browser_host_get_visible_navigation_entry(struct _cef_browser_host_t * self)1163 browser_host_get_visible_navigation_entry(struct _cef_browser_host_t* self) {
1164 shutdown_checker::AssertNotShutdown();
1165
1166 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1167
1168 DCHECK(self);
1169 if (!self)
1170 return NULL;
1171
1172 // Execute
1173 CefRefPtr<CefNavigationEntry> _retval =
1174 CefBrowserHostCppToC::Get(self)->GetVisibleNavigationEntry();
1175
1176 // Return type: refptr_same
1177 return CefNavigationEntryCppToC::Wrap(_retval);
1178 }
1179
1180 void CEF_CALLBACK
browser_host_set_accessibility_state(struct _cef_browser_host_t * self,cef_state_t accessibility_state)1181 browser_host_set_accessibility_state(struct _cef_browser_host_t* self,
1182 cef_state_t accessibility_state) {
1183 shutdown_checker::AssertNotShutdown();
1184
1185 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1186
1187 DCHECK(self);
1188 if (!self)
1189 return;
1190
1191 // Execute
1192 CefBrowserHostCppToC::Get(self)->SetAccessibilityState(accessibility_state);
1193 }
1194
1195 void CEF_CALLBACK
browser_host_set_auto_resize_enabled(struct _cef_browser_host_t * self,int enabled,const cef_size_t * min_size,const cef_size_t * max_size)1196 browser_host_set_auto_resize_enabled(struct _cef_browser_host_t* self,
1197 int enabled,
1198 const cef_size_t* min_size,
1199 const cef_size_t* max_size) {
1200 shutdown_checker::AssertNotShutdown();
1201
1202 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1203
1204 DCHECK(self);
1205 if (!self)
1206 return;
1207 // Verify param: min_size; type: simple_byref_const
1208 DCHECK(min_size);
1209 if (!min_size)
1210 return;
1211 // Verify param: max_size; type: simple_byref_const
1212 DCHECK(max_size);
1213 if (!max_size)
1214 return;
1215
1216 // Translate param: min_size; type: simple_byref_const
1217 CefSize min_sizeVal = min_size ? *min_size : CefSize();
1218 // Translate param: max_size; type: simple_byref_const
1219 CefSize max_sizeVal = max_size ? *max_size : CefSize();
1220
1221 // Execute
1222 CefBrowserHostCppToC::Get(self)->SetAutoResizeEnabled(
1223 enabled ? true : false, min_sizeVal, max_sizeVal);
1224 }
1225
1226 struct _cef_extension_t* CEF_CALLBACK
browser_host_get_extension(struct _cef_browser_host_t * self)1227 browser_host_get_extension(struct _cef_browser_host_t* self) {
1228 shutdown_checker::AssertNotShutdown();
1229
1230 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1231
1232 DCHECK(self);
1233 if (!self)
1234 return NULL;
1235
1236 // Execute
1237 CefRefPtr<CefExtension> _retval =
1238 CefBrowserHostCppToC::Get(self)->GetExtension();
1239
1240 // Return type: refptr_same
1241 return CefExtensionCppToC::Wrap(_retval);
1242 }
1243
1244 int CEF_CALLBACK
browser_host_is_background_host(struct _cef_browser_host_t * self)1245 browser_host_is_background_host(struct _cef_browser_host_t* self) {
1246 shutdown_checker::AssertNotShutdown();
1247
1248 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1249
1250 DCHECK(self);
1251 if (!self)
1252 return 0;
1253
1254 // Execute
1255 bool _retval = CefBrowserHostCppToC::Get(self)->IsBackgroundHost();
1256
1257 // Return type: bool
1258 return _retval;
1259 }
1260
browser_host_set_audio_muted(struct _cef_browser_host_t * self,int mute)1261 void CEF_CALLBACK browser_host_set_audio_muted(struct _cef_browser_host_t* self,
1262 int mute) {
1263 shutdown_checker::AssertNotShutdown();
1264
1265 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1266
1267 DCHECK(self);
1268 if (!self)
1269 return;
1270
1271 // Execute
1272 CefBrowserHostCppToC::Get(self)->SetAudioMuted(mute ? true : false);
1273 }
1274
browser_host_is_audio_muted(struct _cef_browser_host_t * self)1275 int CEF_CALLBACK browser_host_is_audio_muted(struct _cef_browser_host_t* self) {
1276 shutdown_checker::AssertNotShutdown();
1277
1278 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1279
1280 DCHECK(self);
1281 if (!self)
1282 return 0;
1283
1284 // Execute
1285 bool _retval = CefBrowserHostCppToC::Get(self)->IsAudioMuted();
1286
1287 // Return type: bool
1288 return _retval;
1289 }
1290
1291 } // namespace
1292
1293 // CONSTRUCTOR - Do not edit by hand.
1294
CefBrowserHostCppToC()1295 CefBrowserHostCppToC::CefBrowserHostCppToC() {
1296 GetStruct()->get_browser = browser_host_get_browser;
1297 GetStruct()->close_browser = browser_host_close_browser;
1298 GetStruct()->try_close_browser = browser_host_try_close_browser;
1299 GetStruct()->set_focus = browser_host_set_focus;
1300 GetStruct()->get_window_handle = browser_host_get_window_handle;
1301 GetStruct()->get_opener_window_handle = browser_host_get_opener_window_handle;
1302 GetStruct()->has_view = browser_host_has_view;
1303 GetStruct()->get_client = browser_host_get_client;
1304 GetStruct()->get_request_context = browser_host_get_request_context;
1305 GetStruct()->get_zoom_level = browser_host_get_zoom_level;
1306 GetStruct()->set_zoom_level = browser_host_set_zoom_level;
1307 GetStruct()->run_file_dialog = browser_host_run_file_dialog;
1308 GetStruct()->start_download = browser_host_start_download;
1309 GetStruct()->download_image = browser_host_download_image;
1310 GetStruct()->print = browser_host_print;
1311 GetStruct()->print_to_pdf = browser_host_print_to_pdf;
1312 GetStruct()->find = browser_host_find;
1313 GetStruct()->stop_finding = browser_host_stop_finding;
1314 GetStruct()->show_dev_tools = browser_host_show_dev_tools;
1315 GetStruct()->close_dev_tools = browser_host_close_dev_tools;
1316 GetStruct()->has_dev_tools = browser_host_has_dev_tools;
1317 GetStruct()->send_dev_tools_message = browser_host_send_dev_tools_message;
1318 GetStruct()->execute_dev_tools_method = browser_host_execute_dev_tools_method;
1319 GetStruct()->add_dev_tools_message_observer =
1320 browser_host_add_dev_tools_message_observer;
1321 GetStruct()->get_navigation_entries = browser_host_get_navigation_entries;
1322 GetStruct()->replace_misspelling = browser_host_replace_misspelling;
1323 GetStruct()->add_word_to_dictionary = browser_host_add_word_to_dictionary;
1324 GetStruct()->is_window_rendering_disabled =
1325 browser_host_is_window_rendering_disabled;
1326 GetStruct()->was_resized = browser_host_was_resized;
1327 GetStruct()->was_hidden = browser_host_was_hidden;
1328 GetStruct()->notify_screen_info_changed =
1329 browser_host_notify_screen_info_changed;
1330 GetStruct()->invalidate = browser_host_invalidate;
1331 GetStruct()->send_external_begin_frame =
1332 browser_host_send_external_begin_frame;
1333 GetStruct()->send_key_event = browser_host_send_key_event;
1334 GetStruct()->send_mouse_click_event = browser_host_send_mouse_click_event;
1335 GetStruct()->send_mouse_move_event = browser_host_send_mouse_move_event;
1336 GetStruct()->send_mouse_wheel_event = browser_host_send_mouse_wheel_event;
1337 GetStruct()->send_touch_event = browser_host_send_touch_event;
1338 GetStruct()->send_capture_lost_event = browser_host_send_capture_lost_event;
1339 GetStruct()->notify_move_or_resize_started =
1340 browser_host_notify_move_or_resize_started;
1341 GetStruct()->get_windowless_frame_rate =
1342 browser_host_get_windowless_frame_rate;
1343 GetStruct()->set_windowless_frame_rate =
1344 browser_host_set_windowless_frame_rate;
1345 GetStruct()->ime_set_composition = browser_host_ime_set_composition;
1346 GetStruct()->ime_commit_text = browser_host_ime_commit_text;
1347 GetStruct()->ime_finish_composing_text =
1348 browser_host_ime_finish_composing_text;
1349 GetStruct()->ime_cancel_composition = browser_host_ime_cancel_composition;
1350 GetStruct()->drag_target_drag_enter = browser_host_drag_target_drag_enter;
1351 GetStruct()->drag_target_drag_over = browser_host_drag_target_drag_over;
1352 GetStruct()->drag_target_drag_leave = browser_host_drag_target_drag_leave;
1353 GetStruct()->drag_target_drop = browser_host_drag_target_drop;
1354 GetStruct()->drag_source_ended_at = browser_host_drag_source_ended_at;
1355 GetStruct()->drag_source_system_drag_ended =
1356 browser_host_drag_source_system_drag_ended;
1357 GetStruct()->get_visible_navigation_entry =
1358 browser_host_get_visible_navigation_entry;
1359 GetStruct()->set_accessibility_state = browser_host_set_accessibility_state;
1360 GetStruct()->set_auto_resize_enabled = browser_host_set_auto_resize_enabled;
1361 GetStruct()->get_extension = browser_host_get_extension;
1362 GetStruct()->is_background_host = browser_host_is_background_host;
1363 GetStruct()->set_audio_muted = browser_host_set_audio_muted;
1364 GetStruct()->is_audio_muted = browser_host_is_audio_muted;
1365 }
1366
1367 // DESTRUCTOR - Do not edit by hand.
1368
~CefBrowserHostCppToC()1369 CefBrowserHostCppToC::~CefBrowserHostCppToC() {
1370 shutdown_checker::AssertNotShutdown();
1371 }
1372
1373 template <>
1374 CefRefPtr<CefBrowserHost>
1375 CefCppToCRefCounted<CefBrowserHostCppToC, CefBrowserHost, cef_browser_host_t>::
UnwrapDerived(CefWrapperType type,cef_browser_host_t * s)1376 UnwrapDerived(CefWrapperType type, cef_browser_host_t* s) {
1377 NOTREACHED() << "Unexpected class type: " << type;
1378 return nullptr;
1379 }
1380
1381 template <>
1382 CefWrapperType CefCppToCRefCounted<CefBrowserHostCppToC,
1383 CefBrowserHost,
1384 cef_browser_host_t>::kWrapperType =
1385 WT_BROWSER_HOST;
1386