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