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