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=fa04fba704658b02675380bd63d91005c6757d4e$
13 //
14
15 #include "include/capi/cef_app_capi.h"
16 #include "include/capi/cef_crash_util_capi.h"
17 #include "include/capi/cef_file_util_capi.h"
18 #include "include/capi/cef_i18n_util_capi.h"
19 #include "include/capi/cef_origin_whitelist_capi.h"
20 #include "include/capi/cef_parser_capi.h"
21 #include "include/capi/cef_path_util_capi.h"
22 #include "include/capi/cef_process_util_capi.h"
23 #include "include/capi/cef_scheme_capi.h"
24 #include "include/capi/cef_ssl_info_capi.h"
25 #include "include/capi/cef_task_capi.h"
26 #include "include/capi/cef_trace_capi.h"
27 #include "include/capi/cef_v8_capi.h"
28 #include "include/capi/cef_web_plugin_capi.h"
29 #include "include/capi/test/cef_test_helpers_capi.h"
30 #include "include/cef_app.h"
31 #include "include/cef_crash_util.h"
32 #include "include/cef_file_util.h"
33 #include "include/cef_i18n_util.h"
34 #include "include/cef_origin_whitelist.h"
35 #include "include/cef_parser.h"
36 #include "include/cef_path_util.h"
37 #include "include/cef_process_util.h"
38 #include "include/cef_scheme.h"
39 #include "include/cef_ssl_info.h"
40 #include "include/cef_task.h"
41 #include "include/cef_trace.h"
42 #include "include/cef_v8.h"
43 #include "include/cef_web_plugin.h"
44 #include "include/test/cef_test_helpers.h"
45 #include "libcef_dll/cpptoc/binary_value_cpptoc.h"
46 #include "libcef_dll/cpptoc/command_line_cpptoc.h"
47 #include "libcef_dll/cpptoc/frame_cpptoc.h"
48 #include "libcef_dll/cpptoc/value_cpptoc.h"
49 #include "libcef_dll/ctocpp/app_ctocpp.h"
50 #include "libcef_dll/ctocpp/completion_callback_ctocpp.h"
51 #include "libcef_dll/ctocpp/end_tracing_callback_ctocpp.h"
52 #include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h"
53 #include "libcef_dll/ctocpp/task_ctocpp.h"
54 #include "libcef_dll/ctocpp/v8handler_ctocpp.h"
55 #include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h"
56 #include "libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h"
57 #include "libcef_dll/shutdown_checker.h"
58 #include "libcef_dll/transfer_util.h"
59
60 // GLOBAL FUNCTIONS - Body may be edited by hand.
61
cef_execute_process(const struct _cef_main_args_t * args,struct _cef_app_t * application,void * windows_sandbox_info)62 CEF_EXPORT int cef_execute_process(const struct _cef_main_args_t* args,
63 struct _cef_app_t* application,
64 void* windows_sandbox_info) {
65 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
66
67 // Verify param: args; type: struct_byref_const
68 DCHECK(args);
69 if (!args)
70 return 0;
71 // Unverified params: application, windows_sandbox_info
72
73 // Translate param: args; type: struct_byref_const
74 CefMainArgs argsObj;
75 if (args)
76 argsObj.Set(*args, false);
77
78 // Execute
79 int _retval = CefExecuteProcess(argsObj, CefAppCToCpp::Wrap(application),
80 windows_sandbox_info);
81
82 // Return type: simple
83 return _retval;
84 }
85
cef_initialize(const struct _cef_main_args_t * args,const struct _cef_settings_t * settings,struct _cef_app_t * application,void * windows_sandbox_info)86 CEF_EXPORT int cef_initialize(const struct _cef_main_args_t* args,
87 const struct _cef_settings_t* settings,
88 struct _cef_app_t* application,
89 void* windows_sandbox_info) {
90 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
91
92 // Verify param: args; type: struct_byref_const
93 DCHECK(args);
94 if (!args)
95 return 0;
96 // Verify param: settings; type: struct_byref_const
97 DCHECK(settings);
98 if (!settings)
99 return 0;
100 // Unverified params: application, windows_sandbox_info
101
102 // Translate param: args; type: struct_byref_const
103 CefMainArgs argsObj;
104 if (args)
105 argsObj.Set(*args, false);
106 // Translate param: settings; type: struct_byref_const
107 CefSettings settingsObj;
108 if (settings)
109 settingsObj.Set(*settings, false);
110
111 // Execute
112 bool _retval =
113 CefInitialize(argsObj, settingsObj, CefAppCToCpp::Wrap(application),
114 windows_sandbox_info);
115
116 // Return type: bool
117 return _retval;
118 }
119
cef_shutdown()120 CEF_EXPORT void cef_shutdown() {
121 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
122
123 #if DCHECK_IS_ON()
124 shutdown_checker::SetIsShutdown();
125 #endif
126
127 // Execute
128 CefShutdown();
129 }
130
cef_do_message_loop_work()131 CEF_EXPORT void cef_do_message_loop_work() {
132 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
133
134 // Execute
135 CefDoMessageLoopWork();
136 }
137
cef_run_message_loop()138 CEF_EXPORT void cef_run_message_loop() {
139 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
140
141 // Execute
142 CefRunMessageLoop();
143 }
144
cef_quit_message_loop()145 CEF_EXPORT void cef_quit_message_loop() {
146 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
147
148 // Execute
149 CefQuitMessageLoop();
150 }
151
cef_set_osmodal_loop(int osModalLoop)152 CEF_EXPORT void cef_set_osmodal_loop(int osModalLoop) {
153 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
154
155 // Execute
156 CefSetOSModalLoop(osModalLoop ? true : false);
157 }
158
cef_enable_highdpi_support()159 CEF_EXPORT void cef_enable_highdpi_support() {
160 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
161
162 // Execute
163 CefEnableHighDPISupport();
164 }
165
cef_crash_reporting_enabled()166 CEF_EXPORT int cef_crash_reporting_enabled() {
167 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
168
169 // Execute
170 bool _retval = CefCrashReportingEnabled();
171
172 // Return type: bool
173 return _retval;
174 }
175
cef_set_crash_key_value(const cef_string_t * key,const cef_string_t * value)176 CEF_EXPORT void cef_set_crash_key_value(const cef_string_t* key,
177 const cef_string_t* value) {
178 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
179
180 // Verify param: key; type: string_byref_const
181 DCHECK(key);
182 if (!key)
183 return;
184 // Unverified params: value
185
186 // Execute
187 CefSetCrashKeyValue(CefString(key), CefString(value));
188 }
189
cef_create_directory(const cef_string_t * full_path)190 CEF_EXPORT int cef_create_directory(const cef_string_t* full_path) {
191 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
192
193 // Verify param: full_path; type: string_byref_const
194 DCHECK(full_path);
195 if (!full_path)
196 return 0;
197
198 // Execute
199 bool _retval = CefCreateDirectory(CefString(full_path));
200
201 // Return type: bool
202 return _retval;
203 }
204
cef_get_temp_directory(cef_string_t * temp_dir)205 CEF_EXPORT int cef_get_temp_directory(cef_string_t* temp_dir) {
206 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
207
208 // Verify param: temp_dir; type: string_byref
209 DCHECK(temp_dir);
210 if (!temp_dir)
211 return 0;
212
213 // Translate param: temp_dir; type: string_byref
214 CefString temp_dirStr(temp_dir);
215
216 // Execute
217 bool _retval = CefGetTempDirectory(temp_dirStr);
218
219 // Return type: bool
220 return _retval;
221 }
222
cef_create_new_temp_directory(const cef_string_t * prefix,cef_string_t * new_temp_path)223 CEF_EXPORT int cef_create_new_temp_directory(const cef_string_t* prefix,
224 cef_string_t* new_temp_path) {
225 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
226
227 // Verify param: new_temp_path; type: string_byref
228 DCHECK(new_temp_path);
229 if (!new_temp_path)
230 return 0;
231 // Unverified params: prefix
232
233 // Translate param: new_temp_path; type: string_byref
234 CefString new_temp_pathStr(new_temp_path);
235
236 // Execute
237 bool _retval = CefCreateNewTempDirectory(CefString(prefix), new_temp_pathStr);
238
239 // Return type: bool
240 return _retval;
241 }
242
cef_create_temp_directory_in_directory(const cef_string_t * base_dir,const cef_string_t * prefix,cef_string_t * new_dir)243 CEF_EXPORT int cef_create_temp_directory_in_directory(
244 const cef_string_t* base_dir,
245 const cef_string_t* prefix,
246 cef_string_t* new_dir) {
247 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
248
249 // Verify param: base_dir; type: string_byref_const
250 DCHECK(base_dir);
251 if (!base_dir)
252 return 0;
253 // Verify param: new_dir; type: string_byref
254 DCHECK(new_dir);
255 if (!new_dir)
256 return 0;
257 // Unverified params: prefix
258
259 // Translate param: new_dir; type: string_byref
260 CefString new_dirStr(new_dir);
261
262 // Execute
263 bool _retval = CefCreateTempDirectoryInDirectory(
264 CefString(base_dir), CefString(prefix), new_dirStr);
265
266 // Return type: bool
267 return _retval;
268 }
269
cef_directory_exists(const cef_string_t * path)270 CEF_EXPORT int cef_directory_exists(const cef_string_t* path) {
271 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
272
273 // Verify param: path; type: string_byref_const
274 DCHECK(path);
275 if (!path)
276 return 0;
277
278 // Execute
279 bool _retval = CefDirectoryExists(CefString(path));
280
281 // Return type: bool
282 return _retval;
283 }
284
cef_delete_file(const cef_string_t * path,int recursive)285 CEF_EXPORT int cef_delete_file(const cef_string_t* path, int recursive) {
286 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
287
288 // Verify param: path; type: string_byref_const
289 DCHECK(path);
290 if (!path)
291 return 0;
292
293 // Execute
294 bool _retval = CefDeleteFile(CefString(path), recursive ? true : false);
295
296 // Return type: bool
297 return _retval;
298 }
299
cef_zip_directory(const cef_string_t * src_dir,const cef_string_t * dest_file,int include_hidden_files)300 CEF_EXPORT int cef_zip_directory(const cef_string_t* src_dir,
301 const cef_string_t* dest_file,
302 int include_hidden_files) {
303 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
304
305 // Verify param: src_dir; type: string_byref_const
306 DCHECK(src_dir);
307 if (!src_dir)
308 return 0;
309 // Verify param: dest_file; type: string_byref_const
310 DCHECK(dest_file);
311 if (!dest_file)
312 return 0;
313
314 // Execute
315 bool _retval = CefZipDirectory(CefString(src_dir), CefString(dest_file),
316 include_hidden_files ? true : false);
317
318 // Return type: bool
319 return _retval;
320 }
321
cef_load_crlsets_file(const cef_string_t * path)322 CEF_EXPORT void cef_load_crlsets_file(const cef_string_t* path) {
323 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
324
325 // Verify param: path; type: string_byref_const
326 DCHECK(path);
327 if (!path)
328 return;
329
330 // Execute
331 CefLoadCRLSetsFile(CefString(path));
332 }
333
cef_is_rtl()334 CEF_EXPORT int cef_is_rtl() {
335 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
336
337 // Execute
338 bool _retval = CefIsRTL();
339
340 // Return type: bool
341 return _retval;
342 }
343
cef_add_cross_origin_whitelist_entry(const cef_string_t * source_origin,const cef_string_t * target_protocol,const cef_string_t * target_domain,int allow_target_subdomains)344 CEF_EXPORT int cef_add_cross_origin_whitelist_entry(
345 const cef_string_t* source_origin,
346 const cef_string_t* target_protocol,
347 const cef_string_t* target_domain,
348 int allow_target_subdomains) {
349 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
350
351 // Verify param: source_origin; type: string_byref_const
352 DCHECK(source_origin);
353 if (!source_origin)
354 return 0;
355 // Verify param: target_protocol; type: string_byref_const
356 DCHECK(target_protocol);
357 if (!target_protocol)
358 return 0;
359 // Unverified params: target_domain
360
361 // Execute
362 bool _retval = CefAddCrossOriginWhitelistEntry(
363 CefString(source_origin), CefString(target_protocol),
364 CefString(target_domain), allow_target_subdomains ? true : false);
365
366 // Return type: bool
367 return _retval;
368 }
369
cef_remove_cross_origin_whitelist_entry(const cef_string_t * source_origin,const cef_string_t * target_protocol,const cef_string_t * target_domain,int allow_target_subdomains)370 CEF_EXPORT int cef_remove_cross_origin_whitelist_entry(
371 const cef_string_t* source_origin,
372 const cef_string_t* target_protocol,
373 const cef_string_t* target_domain,
374 int allow_target_subdomains) {
375 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
376
377 // Verify param: source_origin; type: string_byref_const
378 DCHECK(source_origin);
379 if (!source_origin)
380 return 0;
381 // Verify param: target_protocol; type: string_byref_const
382 DCHECK(target_protocol);
383 if (!target_protocol)
384 return 0;
385 // Unverified params: target_domain
386
387 // Execute
388 bool _retval = CefRemoveCrossOriginWhitelistEntry(
389 CefString(source_origin), CefString(target_protocol),
390 CefString(target_domain), allow_target_subdomains ? true : false);
391
392 // Return type: bool
393 return _retval;
394 }
395
cef_clear_cross_origin_whitelist()396 CEF_EXPORT int cef_clear_cross_origin_whitelist() {
397 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
398
399 // Execute
400 bool _retval = CefClearCrossOriginWhitelist();
401
402 // Return type: bool
403 return _retval;
404 }
405
cef_parse_url(const cef_string_t * url,struct _cef_urlparts_t * parts)406 CEF_EXPORT int cef_parse_url(const cef_string_t* url,
407 struct _cef_urlparts_t* parts) {
408 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
409
410 // Verify param: url; type: string_byref_const
411 DCHECK(url);
412 if (!url)
413 return 0;
414 // Verify param: parts; type: struct_byref
415 DCHECK(parts);
416 if (!parts)
417 return 0;
418
419 // Translate param: parts; type: struct_byref
420 CefURLParts partsObj;
421 if (parts)
422 partsObj.AttachTo(*parts);
423
424 // Execute
425 bool _retval = CefParseURL(CefString(url), partsObj);
426
427 // Restore param: parts; type: struct_byref
428 if (parts)
429 partsObj.DetachTo(*parts);
430
431 // Return type: bool
432 return _retval;
433 }
434
cef_create_url(const struct _cef_urlparts_t * parts,cef_string_t * url)435 CEF_EXPORT int cef_create_url(const struct _cef_urlparts_t* parts,
436 cef_string_t* url) {
437 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
438
439 // Verify param: parts; type: struct_byref_const
440 DCHECK(parts);
441 if (!parts)
442 return 0;
443 // Verify param: url; type: string_byref
444 DCHECK(url);
445 if (!url)
446 return 0;
447
448 // Translate param: parts; type: struct_byref_const
449 CefURLParts partsObj;
450 if (parts)
451 partsObj.Set(*parts, false);
452 // Translate param: url; type: string_byref
453 CefString urlStr(url);
454
455 // Execute
456 bool _retval = CefCreateURL(partsObj, urlStr);
457
458 // Return type: bool
459 return _retval;
460 }
461
462 CEF_EXPORT cef_string_userfree_t
cef_format_url_for_security_display(const cef_string_t * origin_url)463 cef_format_url_for_security_display(const cef_string_t* origin_url) {
464 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
465
466 // Verify param: origin_url; type: string_byref_const
467 DCHECK(origin_url);
468 if (!origin_url)
469 return NULL;
470
471 // Execute
472 CefString _retval = CefFormatUrlForSecurityDisplay(CefString(origin_url));
473
474 // Return type: string
475 return _retval.DetachToUserFree();
476 }
477
478 CEF_EXPORT cef_string_userfree_t
cef_get_mime_type(const cef_string_t * extension)479 cef_get_mime_type(const cef_string_t* extension) {
480 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
481
482 // Verify param: extension; type: string_byref_const
483 DCHECK(extension);
484 if (!extension)
485 return NULL;
486
487 // Execute
488 CefString _retval = CefGetMimeType(CefString(extension));
489
490 // Return type: string
491 return _retval.DetachToUserFree();
492 }
493
cef_get_extensions_for_mime_type(const cef_string_t * mime_type,cef_string_list_t extensions)494 CEF_EXPORT void cef_get_extensions_for_mime_type(const cef_string_t* mime_type,
495 cef_string_list_t extensions) {
496 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
497
498 // Verify param: mime_type; type: string_byref_const
499 DCHECK(mime_type);
500 if (!mime_type)
501 return;
502 // Verify param: extensions; type: string_vec_byref
503 DCHECK(extensions);
504 if (!extensions)
505 return;
506
507 // Translate param: extensions; type: string_vec_byref
508 std::vector<CefString> extensionsList;
509 transfer_string_list_contents(extensions, extensionsList);
510
511 // Execute
512 CefGetExtensionsForMimeType(CefString(mime_type), extensionsList);
513
514 // Restore param: extensions; type: string_vec_byref
515 cef_string_list_clear(extensions);
516 transfer_string_list_contents(extensionsList, extensions);
517 }
518
cef_base64encode(const void * data,size_t data_size)519 CEF_EXPORT cef_string_userfree_t cef_base64encode(const void* data,
520 size_t data_size) {
521 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
522
523 // Verify param: data; type: simple_byaddr
524 DCHECK(data);
525 if (!data)
526 return NULL;
527
528 // Execute
529 CefString _retval = CefBase64Encode(data, data_size);
530
531 // Return type: string
532 return _retval.DetachToUserFree();
533 }
534
cef_base64decode(const cef_string_t * data)535 CEF_EXPORT struct _cef_binary_value_t* cef_base64decode(
536 const cef_string_t* data) {
537 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
538
539 // Verify param: data; type: string_byref_const
540 DCHECK(data);
541 if (!data)
542 return NULL;
543
544 // Execute
545 CefRefPtr<CefBinaryValue> _retval = CefBase64Decode(CefString(data));
546
547 // Return type: refptr_same
548 return CefBinaryValueCppToC::Wrap(_retval);
549 }
550
cef_uriencode(const cef_string_t * text,int use_plus)551 CEF_EXPORT cef_string_userfree_t cef_uriencode(const cef_string_t* text,
552 int use_plus) {
553 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
554
555 // Verify param: text; type: string_byref_const
556 DCHECK(text);
557 if (!text)
558 return NULL;
559
560 // Execute
561 CefString _retval = CefURIEncode(CefString(text), use_plus ? true : false);
562
563 // Return type: string
564 return _retval.DetachToUserFree();
565 }
566
567 CEF_EXPORT cef_string_userfree_t
cef_uridecode(const cef_string_t * text,int convert_to_utf8,cef_uri_unescape_rule_t unescape_rule)568 cef_uridecode(const cef_string_t* text,
569 int convert_to_utf8,
570 cef_uri_unescape_rule_t unescape_rule) {
571 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
572
573 // Verify param: text; type: string_byref_const
574 DCHECK(text);
575 if (!text)
576 return NULL;
577
578 // Execute
579 CefString _retval = CefURIDecode(
580 CefString(text), convert_to_utf8 ? true : false, unescape_rule);
581
582 // Return type: string
583 return _retval.DetachToUserFree();
584 }
585
cef_parse_json(const cef_string_t * json_string,cef_json_parser_options_t options)586 CEF_EXPORT struct _cef_value_t* cef_parse_json(
587 const cef_string_t* json_string,
588 cef_json_parser_options_t options) {
589 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
590
591 // Verify param: json_string; type: string_byref_const
592 DCHECK(json_string);
593 if (!json_string)
594 return NULL;
595
596 // Execute
597 CefRefPtr<CefValue> _retval = CefParseJSON(CefString(json_string), options);
598
599 // Return type: refptr_same
600 return CefValueCppToC::Wrap(_retval);
601 }
602
cef_parse_json_buffer(const void * json,size_t json_size,cef_json_parser_options_t options)603 CEF_EXPORT struct _cef_value_t* cef_parse_json_buffer(
604 const void* json,
605 size_t json_size,
606 cef_json_parser_options_t options) {
607 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
608
609 // Verify param: json; type: simple_byaddr
610 DCHECK(json);
611 if (!json)
612 return NULL;
613
614 // Execute
615 CefRefPtr<CefValue> _retval = CefParseJSON(json, json_size, options);
616
617 // Return type: refptr_same
618 return CefValueCppToC::Wrap(_retval);
619 }
620
cef_parse_jsonand_return_error(const cef_string_t * json_string,cef_json_parser_options_t options,cef_string_t * error_msg_out)621 CEF_EXPORT struct _cef_value_t* cef_parse_jsonand_return_error(
622 const cef_string_t* json_string,
623 cef_json_parser_options_t options,
624 cef_string_t* error_msg_out) {
625 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
626
627 // Verify param: json_string; type: string_byref_const
628 DCHECK(json_string);
629 if (!json_string)
630 return NULL;
631 // Verify param: error_msg_out; type: string_byref
632 DCHECK(error_msg_out);
633 if (!error_msg_out)
634 return NULL;
635
636 // Translate param: error_msg_out; type: string_byref
637 CefString error_msg_outStr(error_msg_out);
638
639 // Execute
640 CefRefPtr<CefValue> _retval = CefParseJSONAndReturnError(
641 CefString(json_string), options, error_msg_outStr);
642
643 // Return type: refptr_same
644 return CefValueCppToC::Wrap(_retval);
645 }
646
647 CEF_EXPORT cef_string_userfree_t
cef_write_json(struct _cef_value_t * node,cef_json_writer_options_t options)648 cef_write_json(struct _cef_value_t* node, cef_json_writer_options_t options) {
649 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
650
651 // Verify param: node; type: refptr_same
652 DCHECK(node);
653 if (!node)
654 return NULL;
655
656 // Execute
657 CefString _retval = CefWriteJSON(CefValueCppToC::Unwrap(node), options);
658
659 // Return type: string
660 return _retval.DetachToUserFree();
661 }
662
cef_get_path(cef_path_key_t key,cef_string_t * path)663 CEF_EXPORT int cef_get_path(cef_path_key_t key, cef_string_t* path) {
664 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
665
666 // Verify param: path; type: string_byref
667 DCHECK(path);
668 if (!path)
669 return 0;
670
671 // Translate param: path; type: string_byref
672 CefString pathStr(path);
673
674 // Execute
675 bool _retval = CefGetPath(key, pathStr);
676
677 // Return type: bool
678 return _retval;
679 }
680
cef_launch_process(struct _cef_command_line_t * command_line)681 CEF_EXPORT int cef_launch_process(struct _cef_command_line_t* command_line) {
682 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
683
684 // Verify param: command_line; type: refptr_same
685 DCHECK(command_line);
686 if (!command_line)
687 return 0;
688
689 // Execute
690 bool _retval = CefLaunchProcess(CefCommandLineCppToC::Unwrap(command_line));
691
692 // Return type: bool
693 return _retval;
694 }
695
cef_register_scheme_handler_factory(const cef_string_t * scheme_name,const cef_string_t * domain_name,struct _cef_scheme_handler_factory_t * factory)696 CEF_EXPORT int cef_register_scheme_handler_factory(
697 const cef_string_t* scheme_name,
698 const cef_string_t* domain_name,
699 struct _cef_scheme_handler_factory_t* factory) {
700 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
701
702 // Verify param: scheme_name; type: string_byref_const
703 DCHECK(scheme_name);
704 if (!scheme_name)
705 return 0;
706 // Unverified params: domain_name, factory
707
708 // Execute
709 bool _retval = CefRegisterSchemeHandlerFactory(
710 CefString(scheme_name), CefString(domain_name),
711 CefSchemeHandlerFactoryCToCpp::Wrap(factory));
712
713 // Return type: bool
714 return _retval;
715 }
716
cef_clear_scheme_handler_factories()717 CEF_EXPORT int cef_clear_scheme_handler_factories() {
718 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
719
720 // Execute
721 bool _retval = CefClearSchemeHandlerFactories();
722
723 // Return type: bool
724 return _retval;
725 }
726
cef_is_cert_status_error(cef_cert_status_t status)727 CEF_EXPORT int cef_is_cert_status_error(cef_cert_status_t status) {
728 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
729
730 // Execute
731 bool _retval = CefIsCertStatusError(status);
732
733 // Return type: bool
734 return _retval;
735 }
736
cef_currently_on(cef_thread_id_t threadId)737 CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId) {
738 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
739
740 // Execute
741 bool _retval = CefCurrentlyOn(threadId);
742
743 // Return type: bool
744 return _retval;
745 }
746
cef_post_task(cef_thread_id_t threadId,struct _cef_task_t * task)747 CEF_EXPORT int cef_post_task(cef_thread_id_t threadId,
748 struct _cef_task_t* task) {
749 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
750
751 // Verify param: task; type: refptr_diff
752 DCHECK(task);
753 if (!task)
754 return 0;
755
756 // Execute
757 bool _retval = CefPostTask(threadId, CefTaskCToCpp::Wrap(task));
758
759 // Return type: bool
760 return _retval;
761 }
762
cef_post_delayed_task(cef_thread_id_t threadId,struct _cef_task_t * task,int64 delay_ms)763 CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
764 struct _cef_task_t* task,
765 int64 delay_ms) {
766 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
767
768 // Verify param: task; type: refptr_diff
769 DCHECK(task);
770 if (!task)
771 return 0;
772
773 // Execute
774 bool _retval =
775 CefPostDelayedTask(threadId, CefTaskCToCpp::Wrap(task), delay_ms);
776
777 // Return type: bool
778 return _retval;
779 }
780
cef_begin_tracing(const cef_string_t * categories,struct _cef_completion_callback_t * callback)781 CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
782 struct _cef_completion_callback_t* callback) {
783 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
784
785 // Unverified params: categories, callback
786
787 // Execute
788 bool _retval = CefBeginTracing(CefString(categories),
789 CefCompletionCallbackCToCpp::Wrap(callback));
790
791 // Return type: bool
792 return _retval;
793 }
794
cef_end_tracing(const cef_string_t * tracing_file,struct _cef_end_tracing_callback_t * callback)795 CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
796 struct _cef_end_tracing_callback_t* callback) {
797 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
798
799 // Unverified params: tracing_file, callback
800
801 // Execute
802 bool _retval = CefEndTracing(CefString(tracing_file),
803 CefEndTracingCallbackCToCpp::Wrap(callback));
804
805 // Return type: bool
806 return _retval;
807 }
808
cef_now_from_system_trace_time()809 CEF_EXPORT int64 cef_now_from_system_trace_time() {
810 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
811
812 // Execute
813 int64 _retval = CefNowFromSystemTraceTime();
814
815 // Return type: simple
816 return _retval;
817 }
818
cef_register_extension(const cef_string_t * extension_name,const cef_string_t * javascript_code,struct _cef_v8handler_t * handler)819 CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
820 const cef_string_t* javascript_code,
821 struct _cef_v8handler_t* handler) {
822 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
823
824 // Verify param: extension_name; type: string_byref_const
825 DCHECK(extension_name);
826 if (!extension_name)
827 return 0;
828 // Verify param: javascript_code; type: string_byref_const
829 DCHECK(javascript_code);
830 if (!javascript_code)
831 return 0;
832 // Unverified params: handler
833
834 // Execute
835 bool _retval = CefRegisterExtension(CefString(extension_name),
836 CefString(javascript_code),
837 CefV8HandlerCToCpp::Wrap(handler));
838
839 // Return type: bool
840 return _retval;
841 }
842
cef_visit_web_plugin_info(struct _cef_web_plugin_info_visitor_t * visitor)843 CEF_EXPORT void cef_visit_web_plugin_info(
844 struct _cef_web_plugin_info_visitor_t* visitor) {
845 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
846
847 // Verify param: visitor; type: refptr_diff
848 DCHECK(visitor);
849 if (!visitor)
850 return;
851
852 // Execute
853 CefVisitWebPluginInfo(CefWebPluginInfoVisitorCToCpp::Wrap(visitor));
854 }
855
cef_refresh_web_plugins()856 CEF_EXPORT void cef_refresh_web_plugins() {
857 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
858
859 // Execute
860 CefRefreshWebPlugins();
861 }
862
cef_unregister_internal_web_plugin(const cef_string_t * path)863 CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path) {
864 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
865
866 // Verify param: path; type: string_byref_const
867 DCHECK(path);
868 if (!path)
869 return;
870
871 // Execute
872 CefUnregisterInternalWebPlugin(CefString(path));
873 }
874
cef_register_web_plugin_crash(const cef_string_t * path)875 CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path) {
876 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
877
878 // Verify param: path; type: string_byref_const
879 DCHECK(path);
880 if (!path)
881 return;
882
883 // Execute
884 CefRegisterWebPluginCrash(CefString(path));
885 }
886
cef_is_web_plugin_unstable(const cef_string_t * path,struct _cef_web_plugin_unstable_callback_t * callback)887 CEF_EXPORT void cef_is_web_plugin_unstable(
888 const cef_string_t* path,
889 struct _cef_web_plugin_unstable_callback_t* callback) {
890 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
891
892 // Verify param: path; type: string_byref_const
893 DCHECK(path);
894 if (!path)
895 return;
896 // Verify param: callback; type: refptr_diff
897 DCHECK(callback);
898 if (!callback)
899 return;
900
901 // Execute
902 CefIsWebPluginUnstable(CefString(path),
903 CefWebPluginUnstableCallbackCToCpp::Wrap(callback));
904 }
905
cef_execute_java_script_with_user_gesture_for_tests(struct _cef_frame_t * frame,const cef_string_t * javascript)906 CEF_EXPORT void cef_execute_java_script_with_user_gesture_for_tests(
907 struct _cef_frame_t* frame,
908 const cef_string_t* javascript) {
909 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
910
911 // Verify param: frame; type: refptr_same
912 DCHECK(frame);
913 if (!frame)
914 return;
915 // Unverified params: javascript
916
917 // Execute
918 CefExecuteJavaScriptWithUserGestureForTests(CefFrameCppToC::Unwrap(frame),
919 CefString(javascript));
920 }
921