-
Notifications
You must be signed in to change notification settings - Fork 468
/
cef_types.h
3916 lines (3383 loc) · 110 KB
/
cef_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
#pragma once
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "include/internal/cef_string.h"
#include "include/internal/cef_string_list.h"
#include "include/internal/cef_time.h"
#include "include/internal/cef_types_content_settings.h"
#include "include/internal/cef_types_geometry.h"
// Bring in platform-specific definitions.
#if defined(OS_WIN)
#include "include/internal/cef_types_win.h"
#elif defined(OS_MAC)
#include "include/internal/cef_types_mac.h"
#elif defined(OS_LINUX)
#include "include/internal/cef_types_linux.h"
#endif
// 32-bit ARGB color value, not premultiplied. The color components are always
// in a known order. Equivalent to the SkColor type.
typedef uint32_t cef_color_t;
// Return the alpha byte from a cef_color_t value.
#define CefColorGetA(color) (((color) >> 24) & 0xFF)
// Return the red byte from a cef_color_t value.
#define CefColorGetR(color) (((color) >> 16) & 0xFF)
// Return the green byte from a cef_color_t value.
#define CefColorGetG(color) (((color) >> 8) & 0xFF)
// Return the blue byte from a cef_color_t value.
#define CefColorGetB(color) (((color) >> 0) & 0xFF)
// Return an cef_color_t value with the specified byte component values.
#define CefColorSetARGB(a, r, g, b) \
static_cast<cef_color_t>( \
(static_cast<unsigned>(a) << 24) | (static_cast<unsigned>(r) << 16) | \
(static_cast<unsigned>(g) << 8) | (static_cast<unsigned>(b) << 0))
// Return an int64_t value with the specified low and high int32_t component
// values.
#define CefInt64Set(int32_low, int32_high) \
static_cast<int64_t>( \
(static_cast<uint32_t>(int32_low)) | \
(static_cast<int64_t>(static_cast<int32_t>(int32_high))) << 32)
// Return the low int32_t value from an int64_t value.
#define CefInt64GetLow(int64_val) static_cast<int32_t>(int64_val)
// Return the high int32_t value from an int64_t value.
#define CefInt64GetHigh(int64_val) \
static_cast<int32_t>((static_cast<int64_t>(int64_val) >> 32) & 0xFFFFFFFFL)
#ifdef __cplusplus
extern "C" {
#endif
///
/// Log severity levels.
///
typedef enum {
///
/// Default logging (currently INFO logging).
///
LOGSEVERITY_DEFAULT,
///
/// Verbose logging.
///
LOGSEVERITY_VERBOSE,
///
/// DEBUG logging.
///
LOGSEVERITY_DEBUG = LOGSEVERITY_VERBOSE,
///
/// INFO logging.
///
LOGSEVERITY_INFO,
///
/// WARNING logging.
///
LOGSEVERITY_WARNING,
///
/// ERROR logging.
///
LOGSEVERITY_ERROR,
///
/// FATAL logging.
///
LOGSEVERITY_FATAL,
///
/// Disable logging to file for all messages, and to stderr for messages with
/// severity less than FATAL.
///
LOGSEVERITY_DISABLE = 99
} cef_log_severity_t;
///
/// Log items prepended to each log line.
///
typedef enum {
///
/// Prepend the default list of items.
///
LOG_ITEMS_DEFAULT = 0,
///
/// Prepend no items.
///
LOG_ITEMS_NONE = 1,
///
/// Prepend the process ID.
///
LOG_ITEMS_FLAG_PROCESS_ID = 1 << 1,
///
/// Prepend the thread ID.
///
LOG_ITEMS_FLAG_THREAD_ID = 1 << 2,
///
/// Prepend the timestamp.
///
LOG_ITEMS_FLAG_TIME_STAMP = 1 << 3,
///
/// Prepend the tickcount.
///
LOG_ITEMS_FLAG_TICK_COUNT = 1 << 4,
} cef_log_items_t;
///
/// Represents the state of a setting.
///
typedef enum {
///
/// Use the default state for the setting.
///
STATE_DEFAULT = 0,
///
/// Enable or allow the setting.
///
STATE_ENABLED,
///
/// Disable or disallow the setting.
///
STATE_DISABLED,
} cef_state_t;
///
/// Initialization settings. Specify NULL or 0 to get the recommended default
/// values. Many of these and other settings can also configured using command-
/// line switches.
///
typedef struct _cef_settings_t {
///
/// Size of this structure.
///
size_t size;
///
/// Set to true (1) to disable the sandbox for sub-processes. See
/// cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also
/// configurable using the "no-sandbox" command-line switch.
///
int no_sandbox;
///
/// The path to a separate executable that will be launched for sub-processes.
/// If this value is empty on Windows or Linux then the main process
/// executable will be used. If this value is empty on macOS then a helper
/// executable must exist at "Contents/Frameworks/<app>
/// Helper.app/Contents/MacOS/<app> Helper" in the top-level app bundle. See
/// the comments on CefExecuteProcess() for details. If this value is
/// non-empty then it must be an absolute path. Also configurable using the
/// "browser-subprocess-path" command-line switch.
///
cef_string_t browser_subprocess_path;
///
/// The path to the CEF framework directory on macOS. If this value is empty
/// then the framework must exist at "Contents/Frameworks/Chromium Embedded
/// Framework.framework" in the top-level app bundle. If this value is
/// non-empty then it must be an absolute path. Also configurable using the
/// "framework-dir-path" command-line switch.
///
cef_string_t framework_dir_path;
///
/// The path to the main bundle on macOS. If this value is empty then it
/// defaults to the top-level app bundle. If this value is non-empty then it
/// must be an absolute path. Also configurable using the "main-bundle-path"
/// command-line switch.
///
cef_string_t main_bundle_path;
///
/// Set to true (1) to have the browser process message loop run in a separate
/// thread. If false (0) then the CefDoMessageLoopWork() function must be
/// called from your application message loop. This option is only supported
/// on Windows and Linux.
///
int multi_threaded_message_loop;
///
/// Set to true (1) to control browser process main (UI) thread message pump
/// scheduling via the CefBrowserProcessHandler::OnScheduleMessagePumpWork()
/// callback. This option is recommended for use in combination with the
/// CefDoMessageLoopWork() function in cases where the CEF message loop must
/// be integrated into an existing application message loop (see additional
/// comments and warnings on CefDoMessageLoopWork). Enabling this option is
/// not recommended for most users; leave this option disabled and use either
/// the CefRunMessageLoop() function or multi_threaded_message_loop if
/// possible.
///
int external_message_pump;
///
/// Set to true (1) to enable windowless (off-screen) rendering support. Do
/// not enable this value if the application does not use windowless rendering
/// as it may reduce rendering performance on some systems.
///
int windowless_rendering_enabled;
///
/// Set to true (1) to disable configuration of browser process features using
/// standard CEF and Chromium command-line arguments. Configuration can still
/// be specified using CEF data structures or via the
/// CefApp::OnBeforeCommandLineProcessing() method.
///
int command_line_args_disabled;
///
/// The directory where data for the global browser cache will be stored on
/// disk. If this value is non-empty then it must be an absolute path that is
/// either equal to or a child directory of CefSettings.root_cache_path. If
/// this value is empty then browsers will be created in "incognito mode"
/// where in-memory caches are used for storage and no profile-specific data
/// is persisted to disk (installation-specific data will still be persisted
/// in root_cache_path). HTML5 databases such as localStorage will only
/// persist across sessions if a cache path is specified. Can be overridden
/// for individual CefRequestContext instances via the
/// CefRequestContextSettings.cache_path value. Any child directory value will
/// be ignored and the "default" profile (also a child directory) will be used
/// instead.
///
cef_string_t cache_path;
///
/// The root directory for installation-specific data and the parent directory
/// for profile-specific data. All CefSettings.cache_path and
/// CefRequestContextSettings.cache_path values must have this parent
/// directory in common. If this value is empty and CefSettings.cache_path is
/// non-empty then it will default to the CefSettings.cache_path value. Any
/// non-empty value must be an absolute path. If both values are empty then
/// the default platform-specific directory will be used
/// ("~/.config/cef_user_data" directory on Linux, "~/Library/Application
/// Support/CEF/User Data" directory on MacOS, "AppData\Local\CEF\User Data"
/// directory under the user profile directory on Windows). Use of the default
/// directory is not recommended in production applications (see below).
///
/// Multiple application instances writing to the same root_cache_path
/// directory could result in data corruption. A process singleton lock based
/// on the root_cache_path value is therefore used to protect against this.
/// This singleton behavior applies to all CEF-based applications using
/// version 120 or newer. You should customize root_cache_path for your
/// application and implement CefBrowserProcessHandler::
/// OnAlreadyRunningAppRelaunch, which will then be called on any app relaunch
/// with the same root_cache_path value.
///
/// Failure to set the root_cache_path value correctly may result in startup
/// crashes or other unexpected behaviors (for example, the sandbox blocking
/// read/write access to certain files).
///
cef_string_t root_cache_path;
///
/// To persist session cookies (cookies without an expiry date or validity
/// interval) by default when using the global cookie manager set this value
/// to true (1). Session cookies are generally intended to be transient and
/// most Web browsers do not persist them. A |cache_path| value must also be
/// specified to enable this feature. Also configurable using the
/// "persist-session-cookies" command-line switch. Can be overridden for
/// individual CefRequestContext instances via the
/// CefRequestContextSettings.persist_session_cookies value.
///
int persist_session_cookies;
///
/// Value that will be returned as the User-Agent HTTP header. If empty the
/// default User-Agent string will be used. Also configurable using the
/// "user-agent" command-line switch.
///
cef_string_t user_agent;
///
/// Value that will be inserted as the product portion of the default
/// User-Agent string. If empty the Chromium product version will be used. If
/// |userAgent| is specified this value will be ignored. Also configurable
/// using the "user-agent-product" command-line switch.
///
cef_string_t user_agent_product;
///
/// The locale string that will be passed to WebKit. If empty the default
/// locale of "en-US" will be used. This value is ignored on Linux where
/// locale is determined using environment variable parsing with the
/// precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also
/// configurable using the "lang" command-line switch.
///
cef_string_t locale;
///
/// The directory and file name to use for the debug log. If empty a default
/// log file name and location will be used. On Windows and Linux a
/// "debug.log" file will be written in the main executable directory. On
/// MacOS a "~/Library/Logs/[app name]_debug.log" file will be written where
/// [app name] is the name of the main app executable. Also configurable using
/// the "log-file" command-line switch.
///
cef_string_t log_file;
///
/// The log severity. Only messages of this severity level or higher will be
/// logged. When set to DISABLE no messages will be written to the log file,
/// but FATAL messages will still be output to stderr. Also configurable using
/// the "log-severity" command-line switch with a value of "verbose", "info",
/// "warning", "error", "fatal" or "disable".
///
cef_log_severity_t log_severity;
///
/// The log items prepended to each log line. If not set the default log items
/// will be used. Also configurable using the "log-items" command-line switch
/// with a value of "none" for no log items, or a comma-delimited list of
/// values "pid", "tid", "timestamp" or "tickcount" for custom log items.
///
cef_log_items_t log_items;
///
/// Custom flags that will be used when initializing the V8 JavaScript engine.
/// The consequences of using custom flags may not be well tested. Also
/// configurable using the "js-flags" command-line switch.
///
cef_string_t javascript_flags;
///
/// The fully qualified path for the resources directory. If this value is
/// empty the *.pak files must be located in the module directory on
/// Windows/Linux or the app bundle Resources directory on MacOS. If this
/// value is non-empty then it must be an absolute path. Also configurable
/// using the "resources-dir-path" command-line switch.
///
cef_string_t resources_dir_path;
///
/// The fully qualified path for the locales directory. If this value is empty
/// the locales directory must be located in the module directory. If this
/// value is non-empty then it must be an absolute path. This value is ignored
/// on MacOS where pack files are always loaded from the app bundle Resources
/// directory. Also configurable using the "locales-dir-path" command-line
/// switch.
///
cef_string_t locales_dir_path;
///
/// Set to a value between 1024 and 65535 to enable remote debugging on the
/// specified port. Also configurable using the "remote-debugging-port"
/// command-line switch. Specifying 0 via the command-line switch will result
/// in the selection of an ephemeral port and the port number will be printed
/// as part of the WebSocket endpoint URL to stderr. If a cache directory path
/// is provided the port will also be written to the
/// <cache-dir>/DevToolsActivePort file. Remote debugging can be accessed by
/// loading the chrome://inspect page in Google Chrome. Port numbers 9222 and
/// 9229 are discoverable by default. Other port numbers may need to be
/// configured via "Discover network targets" on the Devices tab.
///
int remote_debugging_port;
///
/// The number of stack trace frames to capture for uncaught exceptions.
/// Specify a positive value to enable the
/// CefRenderProcessHandler::OnUncaughtException() callback. Specify 0
/// (default value) and OnUncaughtException() will not be called. Also
/// configurable using the "uncaught-exception-stack-size" command-line
/// switch.
///
int uncaught_exception_stack_size;
///
/// Background color used for the browser before a document is loaded and when
/// no document color is specified. The alpha component must be either fully
/// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
/// opaque then the RGB components will be used as the background color. If
/// the alpha component is fully transparent for a windowed browser then the
/// default value of opaque white be used. If the alpha component is fully
/// transparent for a windowless (off-screen) browser then transparent
/// painting will be enabled.
///
cef_color_t background_color;
///
/// Comma delimited ordered list of language codes without any whitespace that
/// will be used in the "Accept-Language" HTTP request header and
/// "navigator.language" JS attribute. Can be overridden for individual
/// CefRequestContext instances via the
/// CefRequestContextSettings.accept_language_list value.
///
cef_string_t accept_language_list;
///
/// Comma delimited list of schemes supported by the associated
/// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
/// the default schemes ("http", "https", "ws" and "wss") will also be
/// supported. Not specifying a |cookieable_schemes_list| value and setting
/// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
/// and saving of cookies. These settings will only impact the global
/// CefRequestContext. Individual CefRequestContext instances can be
/// configured via the CefRequestContextSettings.cookieable_schemes_list and
/// CefRequestContextSettings.cookieable_schemes_exclude_defaults values.
///
cef_string_t cookieable_schemes_list;
int cookieable_schemes_exclude_defaults;
///
/// Specify an ID to enable Chrome policy management via Platform and OS-user
/// policies. On Windows, this is a registry key like
/// "SOFTWARE\\Policies\\Google\\Chrome". On MacOS, this is a bundle ID like
/// "com.google.Chrome". On Linux, this is an absolute directory path like
/// "/etc/opt/chrome/policies". Only supported with Chrome style. See
/// https://support.google.com/chrome/a/answer/9037717 for details.
///
/// Chrome Browser Cloud Management integration, when enabled via the
/// "enable-chrome-browser-cloud-management" command-line flag, will also use
/// the specified ID. See https://support.google.com/chrome/a/answer/9116814
/// for details.
///
cef_string_t chrome_policy_id;
///
/// Specify an ID for an ICON resource that can be loaded from the main
/// executable and used when creating default Chrome windows such as DevTools
/// and Task Manager. If unspecified the default Chromium ICON (IDR_MAINFRAME
/// [101]) will be loaded from libcef.dll. Only supported with Chrome style on
/// Windows.
///
int chrome_app_icon_id;
#if defined(OS_POSIX) && !defined(OS_ANDROID)
///
/// Specify whether signal handlers must be disabled on POSIX systems.
///
int disable_signal_handlers;
#endif
} cef_settings_t;
///
/// Request context initialization settings. Specify NULL or 0 to get the
/// recommended default values.
///
typedef struct _cef_request_context_settings_t {
///
/// Size of this structure.
///
size_t size;
///
/// The directory where cache data for this request context will be stored on
/// disk. If this value is non-empty then it must be an absolute path that is
/// either equal to or a child directory of CefSettings.root_cache_path. If
/// this value is empty then browsers will be created in "incognito mode"
/// where in-memory caches are used for storage and no profile-specific data
/// is persisted to disk (installation-specific data will still be persisted
/// in root_cache_path). HTML5 databases such as localStorage will only
/// persist across sessions if a cache path is specified. To share the global
/// browser cache and related configuration set this value to match the
/// CefSettings.cache_path value.
///
cef_string_t cache_path;
///
/// To persist session cookies (cookies without an expiry date or validity
/// interval) by default when using the global cookie manager set this value
/// to true (1). Session cookies are generally intended to be transient and
/// most Web browsers do not persist them. Can be set globally using the
/// CefSettings.persist_session_cookies value. This value will be ignored if
/// |cache_path| is empty or if it matches the CefSettings.cache_path value.
///
int persist_session_cookies;
///
/// Comma delimited ordered list of language codes without any whitespace that
/// will be used in the "Accept-Language" HTTP request header and
/// "navigator.language" JS attribute. Can be set globally using the
/// CefSettings.accept_language_list value. If all values are empty then
/// "en-US,en" will be used. This value will be ignored if |cache_path|
/// matches the CefSettings.cache_path value.
///
cef_string_t accept_language_list;
///
/// Comma delimited list of schemes supported by the associated
/// CefCookieManager. If |cookieable_schemes_exclude_defaults| is false (0)
/// the default schemes ("http", "https", "ws" and "wss") will also be
/// supported. Not specifying a |cookieable_schemes_list| value and setting
/// |cookieable_schemes_exclude_defaults| to true (1) will disable all loading
/// and saving of cookies. These values will be ignored if |cache_path|
/// matches the CefSettings.cache_path value.
///
cef_string_t cookieable_schemes_list;
int cookieable_schemes_exclude_defaults;
} cef_request_context_settings_t;
///
/// Browser initialization settings. Specify NULL or 0 to get the recommended
/// default values. The consequences of using custom values may not be well
/// tested. Many of these and other settings can also configured using command-
/// line switches.
///
typedef struct _cef_browser_settings_t {
///
/// Size of this structure.
///
size_t size;
///
/// The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
/// will be called for a windowless browser. The actual fps may be lower if
/// the browser cannot generate frames at the requested rate. The minimum
/// value is 1 and the maximum value is 60 (default 30). This value can also
/// be changed dynamically via CefBrowserHost::SetWindowlessFrameRate.
///
int windowless_frame_rate;
/// BEGIN values that map to WebPreferences settings.
///
/// Font settings.
///
cef_string_t standard_font_family;
cef_string_t fixed_font_family;
cef_string_t serif_font_family;
cef_string_t sans_serif_font_family;
cef_string_t cursive_font_family;
cef_string_t fantasy_font_family;
int default_font_size;
int default_fixed_font_size;
int minimum_font_size;
int minimum_logical_font_size;
///
/// Default encoding for Web content. If empty "ISO-8859-1" will be used. Also
/// configurable using the "default-encoding" command-line switch.
///
cef_string_t default_encoding;
///
/// Controls the loading of fonts from remote sources. Also configurable using
/// the "disable-remote-fonts" command-line switch.
///
cef_state_t remote_fonts;
///
/// Controls whether JavaScript can be executed. Also configurable using the
/// "disable-javascript" command-line switch.
///
cef_state_t javascript;
///
/// Controls whether JavaScript can be used to close windows that were not
/// opened via JavaScript. JavaScript can still be used to close windows that
/// were opened via JavaScript or that have no back/forward history. Also
/// configurable using the "disable-javascript-close-windows" command-line
/// switch.
///
cef_state_t javascript_close_windows;
///
/// Controls whether JavaScript can access the clipboard. Also configurable
/// using the "disable-javascript-access-clipboard" command-line switch.
///
cef_state_t javascript_access_clipboard;
///
/// Controls whether DOM pasting is supported in the editor via
/// execCommand("paste"). The |javascript_access_clipboard| setting must also
/// be enabled. Also configurable using the "disable-javascript-dom-paste"
/// command-line switch.
///
cef_state_t javascript_dom_paste;
///
/// Controls whether image URLs will be loaded from the network. A cached
/// image will still be rendered if requested. Also configurable using the
/// "disable-image-loading" command-line switch.
///
cef_state_t image_loading;
///
/// Controls whether standalone images will be shrunk to fit the page. Also
/// configurable using the "image-shrink-standalone-to-fit" command-line
/// switch.
///
cef_state_t image_shrink_standalone_to_fit;
///
/// Controls whether text areas can be resized. Also configurable using the
/// "disable-text-area-resize" command-line switch.
///
cef_state_t text_area_resize;
///
/// Controls whether the tab key can advance focus to links. Also configurable
/// using the "disable-tab-to-links" command-line switch.
///
cef_state_t tab_to_links;
///
/// Controls whether local storage can be used. Also configurable using the
/// "disable-local-storage" command-line switch.
///
cef_state_t local_storage;
///
/// Controls whether databases can be used. Also configurable using the
/// "disable-databases" command-line switch.
///
cef_state_t databases;
///
/// Controls whether WebGL can be used. Note that WebGL requires hardware
/// support and may not work on all systems even when enabled. Also
/// configurable using the "disable-webgl" command-line switch.
///
cef_state_t webgl;
/// END values that map to WebPreferences settings.
///
/// Background color used for the browser before a document is loaded and when
/// no document color is specified. The alpha component must be either fully
/// opaque (0xFF) or fully transparent (0x00). If the alpha component is fully
/// opaque then the RGB components will be used as the background color. If
/// the alpha component is fully transparent for a windowed browser then the
/// CefSettings.background_color value will be used. If the alpha component is
/// fully transparent for a windowless (off-screen) browser then transparent
/// painting will be enabled.
///
cef_color_t background_color;
///
/// Controls whether the Chrome status bubble will be used. Only supported
/// with Chrome style. For details about the status bubble see
/// https://www.chromium.org/user-experience/status-bubble/
///
cef_state_t chrome_status_bubble;
///
/// Controls whether the Chrome zoom bubble will be shown when zooming. Only
/// supported with Chrome style.
///
cef_state_t chrome_zoom_bubble;
} cef_browser_settings_t;
///
/// Return value types.
///
typedef enum {
///
/// Cancel immediately.
///
RV_CANCEL = 0,
///
/// Continue immediately.
///
RV_CONTINUE,
///
/// Continue asynchronously (usually via a callback).
///
RV_CONTINUE_ASYNC,
} cef_return_value_t;
///
/// URL component parts.
///
typedef struct _cef_urlparts_t {
///
/// The complete URL specification.
///
cef_string_t spec;
///
/// Scheme component not including the colon (e.g., "http").
///
cef_string_t scheme;
///
/// User name component.
///
cef_string_t username;
///
/// Password component.
///
cef_string_t password;
///
/// Host component. This may be a hostname, an IPv4 address or an IPv6 literal
/// surrounded by square brackets (e.g., "[2001:db8::1]").
///
cef_string_t host;
///
/// Port number component.
///
cef_string_t port;
///
/// Origin contains just the scheme, host, and port from a URL. Equivalent to
/// clearing any username and password, replacing the path with a slash, and
/// clearing everything after that. This value will be empty for non-standard
/// URLs.
///
cef_string_t origin;
///
/// Path component including the first slash following the host.
///
cef_string_t path;
///
/// Query string component (i.e., everything following the '?').
///
cef_string_t query;
///
/// Fragment (hash) identifier component (i.e., the string following the '#').
///
cef_string_t fragment;
} cef_urlparts_t;
///
/// Cookie priority values.
///
typedef enum {
CEF_COOKIE_PRIORITY_LOW = -1,
CEF_COOKIE_PRIORITY_MEDIUM = 0,
CEF_COOKIE_PRIORITY_HIGH = 1,
} cef_cookie_priority_t;
///
/// Cookie same site values.
///
typedef enum {
CEF_COOKIE_SAME_SITE_UNSPECIFIED,
CEF_COOKIE_SAME_SITE_NO_RESTRICTION,
CEF_COOKIE_SAME_SITE_LAX_MODE,
CEF_COOKIE_SAME_SITE_STRICT_MODE,
} cef_cookie_same_site_t;
///
/// Cookie information.
///
typedef struct _cef_cookie_t {
///
/// The cookie name.
///
cef_string_t name;
///
/// The cookie value.
///
cef_string_t value;
///
/// If |domain| is empty a host cookie will be created instead of a domain
/// cookie. Domain cookies are stored with a leading "." and are visible to
/// sub-domains whereas host cookies are not.
///
cef_string_t domain;
///
/// If |path| is non-empty only URLs at or below the path will get the cookie
/// value.
///
cef_string_t path;
///
/// If |secure| is true the cookie will only be sent for HTTPS requests.
///
int secure;
///
/// If |httponly| is true the cookie will only be sent for HTTP requests.
///
int httponly;
///
/// The cookie creation date. This is automatically populated by the system on
/// cookie creation.
///
cef_basetime_t creation;
///
/// The cookie last access date. This is automatically populated by the system
/// on access.
///
cef_basetime_t last_access;
///
/// The cookie expiration date is only valid if |has_expires| is true.
///
int has_expires;
cef_basetime_t expires;
///
/// Same site.
///
cef_cookie_same_site_t same_site;
///
/// Priority.
///
cef_cookie_priority_t priority;
} cef_cookie_t;
///
/// Process termination status values.
///
typedef enum {
///
/// Non-zero exit status.
///
TS_ABNORMAL_TERMINATION,
///
/// SIGKILL or task manager kill.
///
TS_PROCESS_WAS_KILLED,
///
/// Segmentation fault.
///
TS_PROCESS_CRASHED,
///
/// Out of memory. Some platforms may use TS_PROCESS_CRASHED instead.
///
TS_PROCESS_OOM,
///
/// Child process never launched.
///
TS_LAUNCH_FAILED,
///
/// On Windows, the OS terminated the process due to code integrity failure.
///
TS_INTEGRITY_FAILURE,
} cef_termination_status_t;
///
/// Path key values.
///
typedef enum {
///
/// Current directory.
///
PK_DIR_CURRENT,
///
/// Directory containing PK_FILE_EXE.
///
PK_DIR_EXE,
///
/// Directory containing PK_FILE_MODULE.
///
PK_DIR_MODULE,
///
/// Temporary directory.
///
PK_DIR_TEMP,
///
/// Path and filename of the current executable.
///
PK_FILE_EXE,
///
/// Path and filename of the module containing the CEF code (usually the
/// libcef module).
///
PK_FILE_MODULE,
///
/// "Local Settings\Application Data" directory under the user profile
/// directory on Windows.
///
PK_LOCAL_APP_DATA,
///
/// "Application Data" directory under the user profile directory on Windows
/// and "~/Library/Application Support" directory on MacOS.
///
PK_USER_DATA,
///
/// Directory containing application resources. Can be configured via
/// CefSettings.resources_dir_path.
///
PK_DIR_RESOURCES,
} cef_path_key_t;
///
/// Storage types.
///
typedef enum {
ST_LOCALSTORAGE = 0,
ST_SESSIONSTORAGE,
} cef_storage_type_t;
///
/// Supported error code values. For the complete list of error values see
/// "include/base/internal/cef_net_error_list.h".
///
typedef enum {
// No error.
ERR_NONE = 0,
#define NET_ERROR(label, value) ERR_##label = value,
#include "include/base/internal/cef_net_error_list.h"
#undef NET_ERROR
} cef_errorcode_t;
///
/// Supported certificate status code values. See net\cert\cert_status_flags.h
/// for more information. CERT_STATUS_NONE is new in CEF because we use an
/// enum while cert_status_flags.h uses a typedef and static const variables.
///
typedef enum {
CERT_STATUS_NONE = 0,
CERT_STATUS_COMMON_NAME_INVALID = 1 << 0,
CERT_STATUS_DATE_INVALID = 1 << 1,
CERT_STATUS_AUTHORITY_INVALID = 1 << 2,
// 1 << 3 is reserved for ERR_CERT_CONTAINS_ERRORS (not useful with WinHTTP).
CERT_STATUS_NO_REVOCATION_MECHANISM = 1 << 4,
CERT_STATUS_UNABLE_TO_CHECK_REVOCATION = 1 << 5,
CERT_STATUS_REVOKED = 1 << 6,
CERT_STATUS_INVALID = 1 << 7,
CERT_STATUS_WEAK_SIGNATURE_ALGORITHM = 1 << 8,
// 1 << 9 was used for CERT_STATUS_NOT_IN_DNS
CERT_STATUS_NON_UNIQUE_NAME = 1 << 10,
CERT_STATUS_WEAK_KEY = 1 << 11,
// 1 << 12 was used for CERT_STATUS_WEAK_DH_KEY