1 // Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved.
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
13 // * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
32 #define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
35 #include "include/base/cef_build.h"
36 #include "include/internal/cef_string.h"
37 #include "include/internal/cef_string_list.h"
38 #include "include/internal/cef_time.h"
40 // Bring in platform-specific definitions.
42 #include "include/internal/cef_types_win.h"
43 #elif defined(OS_MACOSX)
44 #include "include/internal/cef_types_mac.h"
45 #elif defined(OS_LINUX)
46 #include "include/internal/cef_types_linux.h"
49 #include <limits.h> // For UINT_MAX
50 #include <stddef.h> // For size_t
52 // The NSPR system headers define 64-bit as |long| when possible, except on
53 // Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
55 // On Mac OS X, |long long| is used for 64-bit types for compatibility with
56 // <inttypes.h> format macros even in the LP64 model.
57 #if defined(__LP64__) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
58 typedef long int64; // NOLINT(runtime/int)
59 typedef unsigned long uint64; // NOLINT(runtime/int)
61 typedef long long int64; // NOLINT(runtime/int)
62 typedef unsigned long long uint64; // NOLINT(runtime/int)
65 // TODO: Remove these type guards. These are to avoid conflicts with
66 // obsolete/protypes.h in the Gecko SDK.
72 // TODO: Remove these type guards. These are to avoid conflicts with
73 // obsolete/protypes.h in the Gecko SDK.
76 typedef unsigned int uint32;
79 // UTF-16 character type
82 typedef wchar_t char16;
84 typedef unsigned short char16;
88 // 32-bit ARGB color value, not premultiplied. The color components are always
89 // in a known order. Equivalent to the SkColor type.
90 typedef uint32 cef_color_t;
92 // Return the alpha byte from a cef_color_t value.
93 #define CefColorGetA(color) (((color) >> 24) & 0xFF)
94 // Return the red byte from a cef_color_t value.
95 #define CefColorGetR(color) (((color) >> 16) & 0xFF)
96 // Return the green byte from a cef_color_t value.
97 #define CefColorGetG(color) (((color) >> 8) & 0xFF)
98 // Return the blue byte from a cef_color_t value.
99 #define CefColorGetB(color) (((color) >> 0) & 0xFF)
101 // Return an cef_color_t value with the specified byte component values.
102 #define CefColorSetARGB(a, r, g, b) \
103 static_cast<cef_color_t>( \
104 (static_cast<unsigned>(a) << 24) | \
105 (static_cast<unsigned>(r) << 16) | \
106 (static_cast<unsigned>(g) << 8) | \
107 (static_cast<unsigned>(b) << 0))
109 // Return an int64 value with the specified low and high int32 component values.
110 #define CefInt64Set(int32_low, int32_high) \
111 static_cast<int64>((static_cast<uint32>(int32_low)) | \
112 (static_cast<int64>(static_cast<int32>(int32_high))) << 32)
114 // Return the low int32 value from an int64 value.
115 #define CefInt64GetLow(int64_val) static_cast<int32>(int64_val)
116 // Return the high int32 value from an int64 value.
117 #define CefInt64GetHigh(int64_val) \
118 static_cast<int32>((static_cast<int64>(int64_val) >> 32) & 0xFFFFFFFFL)
126 // Log severity levels.
130 // Default logging (currently INFO logging).
155 // Completely disable logging.
157 LOGSEVERITY_DISABLE = 99
158 } cef_log_severity_t;
161 // Represents the state of a setting.
165 // Use the default state for the setting.
170 // Enable or allow the setting.
175 // Disable or disallow the setting.
181 // Initialization settings. Specify NULL or 0 to get the recommended default
182 // values. Many of these and other settings can also configured using command-
185 typedef struct _cef_settings_t {
187 // Size of this structure.
192 // Set to true (1) to use a single process for the browser and renderer. This
193 // run mode is not officially supported by Chromium and is less stable than
194 // the multi-process default. Also configurable using the "single-process"
195 // command-line switch.
200 // Set to true (1) to disable the sandbox for sub-processes. See
201 // cef_sandbox_win.h for requirements to enable the sandbox on Windows. Also
202 // configurable using the "no-sandbox" command-line switch.
207 // The path to a separate executable that will be launched for sub-processes.
208 // By default the browser process executable is used. See the comments on
209 // CefExecuteProcess() for details. Also configurable using the
210 // "browser-subprocess-path" command-line switch.
212 cef_string_t browser_subprocess_path;
215 // Set to true (1) to have the browser process message loop run in a separate
216 // thread. If false (0) than the CefDoMessageLoopWork() function must be
217 // called from your application message loop. This option is only supported on
220 int multi_threaded_message_loop;
223 // Set to true (1) to enable windowless (off-screen) rendering support. Do not
224 // enable this value if the application does not use windowless rendering as
225 // it may reduce rendering performance on some systems.
227 int windowless_rendering_enabled;
230 // Set to true (1) to disable configuration of browser process features using
231 // standard CEF and Chromium command-line arguments. Configuration can still
232 // be specified using CEF data structures or via the
233 // CefApp::OnBeforeCommandLineProcessing() method.
235 int command_line_args_disabled;
238 // The location where cache data will be stored on disk. If empty then
239 // browsers will be created in "incognito mode" where in-memory caches are
240 // used for storage and no data is persisted to disk. HTML5 databases such as
241 // localStorage will only persist across sessions if a cache path is
242 // specified. Can be overridden for individual CefRequestContext instances via
243 // the CefRequestContextSettings.cache_path value.
245 cef_string_t cache_path;
248 // The location where user data such as spell checking dictionary files will
249 // be stored on disk. If empty then the default platform-specific user data
250 // directory will be used ("~/.cef_user_data" directory on Linux,
251 // "~/Library/Application Support/CEF/User Data" directory on Mac OS X,
252 // "Local Settings\Application Data\CEF\User Data" directory under the user
253 // profile directory on Windows).
255 cef_string_t user_data_path;
258 // To persist session cookies (cookies without an expiry date or validity
259 // interval) by default when using the global cookie manager set this value to
260 // true. Session cookies are generally intended to be transient and most Web
261 // browsers do not persist them. A |cache_path| value must also be specified
262 // to enable this feature. Also configurable using the
263 // "persist-session-cookies" command-line switch. Can be overridden for
264 // individual CefRequestContext instances via the
265 // CefRequestContextSettings.persist_session_cookies value.
267 int persist_session_cookies;
270 // Value that will be returned as the User-Agent HTTP header. If empty the
271 // default User-Agent string will be used. Also configurable using the
272 // "user-agent" command-line switch.
274 cef_string_t user_agent;
277 // Value that will be inserted as the product portion of the default
278 // User-Agent string. If empty the Chromium product version will be used. If
279 // |userAgent| is specified this value will be ignored. Also configurable
280 // using the "product-version" command-line switch.
282 cef_string_t product_version;
285 // The locale string that will be passed to WebKit. If empty the default
286 // locale of "en-US" will be used. This value is ignored on Linux where locale
287 // is determined using environment variable parsing with the precedence order:
288 // LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang"
289 // command-line switch.
294 // The directory and file name to use for the debug log. If empty, the
295 // default name of "debug.log" will be used and the file will be written
296 // to the application directory. Also configurable using the "log-file"
297 // command-line switch.
299 cef_string_t log_file;
302 // The log severity. Only messages of this severity level or higher will be
303 // logged. Also configurable using the "log-severity" command-line switch with
304 // a value of "verbose", "info", "warning", "error", "error-report" or
307 cef_log_severity_t log_severity;
310 // Custom flags that will be used when initializing the V8 JavaScript engine.
311 // The consequences of using custom flags may not be well tested. Also
312 // configurable using the "js-flags" command-line switch.
314 cef_string_t javascript_flags;
317 // The fully qualified path for the resources directory. If this value is
318 // empty the cef.pak and/or devtools_resources.pak files must be located in
319 // the module directory on Windows/Linux or the app bundle Resources directory
320 // on Mac OS X. Also configurable using the "resources-dir-path" command-line
323 cef_string_t resources_dir_path;
326 // The fully qualified path for the locales directory. If this value is empty
327 // the locales directory must be located in the module directory. This value
328 // is ignored on Mac OS X where pack files are always loaded from the app
329 // bundle Resources directory. Also configurable using the "locales-dir-path"
330 // command-line switch.
332 cef_string_t locales_dir_path;
335 // Set to true (1) to disable loading of pack files for resources and locales.
336 // A resource bundle handler must be provided for the browser and render
337 // processes via CefApp::GetResourceBundleHandler() if loading of pack files
338 // is disabled. Also configurable using the "disable-pack-loading" command-
341 int pack_loading_disabled;
344 // Set to a value between 1024 and 65535 to enable remote debugging on the
345 // specified port. For example, if 8080 is specified the remote debugging URL
346 // will be http://localhost:8080. CEF can be remotely debugged from any CEF or
347 // Chrome browser window. Also configurable using the "remote-debugging-port"
348 // command-line switch.
350 int remote_debugging_port;
353 // The number of stack trace frames to capture for uncaught exceptions.
354 // Specify a positive value to enable the CefRenderProcessHandler::
355 // OnUncaughtException() callback. Specify 0 (default value) and
356 // OnUncaughtException() will not be called. Also configurable using the
357 // "uncaught-exception-stack-size" command-line switch.
359 int uncaught_exception_stack_size;
362 // By default CEF V8 references will be invalidated (the IsValid() method will
363 // return false) after the owning context has been released. This reduces the
364 // need for external record keeping and avoids crashes due to the use of V8
365 // references after the associated context has been released.
367 // CEF currently offers two context safety implementations with different
368 // performance characteristics. The default implementation (value of 0) uses a
369 // map of hash values and should provide better performance in situations with
370 // a small number contexts. The alternate implementation (value of 1) uses a
371 // hidden value attached to each context and should provide better performance
372 // in situations with a large number of contexts.
374 // If you need better performance in the creation of V8 references and you
375 // plan to manually track context lifespan you can disable context safety by
376 // specifying a value of -1.
378 // Also configurable using the "context-safety-implementation" command-line
381 int context_safety_implementation;
384 // Set to true (1) to ignore errors related to invalid SSL certificates.
385 // Enabling this setting can lead to potential security vulnerabilities like
386 // "man in the middle" attacks. Applications that load content from the
387 // internet should not enable this setting. Also configurable using the
388 // "ignore-certificate-errors" command-line switch. Can be overridden for
389 // individual CefRequestContext instances via the
390 // CefRequestContextSettings.ignore_certificate_errors value.
392 int ignore_certificate_errors;
395 // Opaque background color used for accelerated content. By default the
396 // background color will be white. Only the RGB compontents of the specified
397 // value will be used. The alpha component must greater than 0 to enable use
398 // of the background color but will be otherwise ignored.
400 cef_color_t background_color;
403 // Comma delimited ordered list of language codes without any whitespace that
404 // will be used in the "Accept-Language" HTTP header. May be overridden on a
405 // per-browser basis using the CefBrowserSettings.accept_language_list value.
406 // If both values are empty then "en-US,en" will be used. Can be overridden
407 // for individual CefRequestContext instances via the
408 // CefRequestContextSettings.accept_language_list value.
410 cef_string_t accept_language_list;
414 // Request context initialization settings. Specify NULL or 0 to get the
415 // recommended default values.
417 typedef struct _cef_request_context_settings_t {
419 // Size of this structure.
424 // The location where cache data will be stored on disk. If empty then
425 // browsers will be created in "incognito mode" where in-memory caches are
426 // used for storage and no data is persisted to disk. HTML5 databases such as
427 // localStorage will only persist across sessions if a cache path is
428 // specified. To share the global browser cache and related configuration set
429 // this value to match the CefSettings.cache_path value.
431 cef_string_t cache_path;
434 // To persist session cookies (cookies without an expiry date or validity
435 // interval) by default when using the global cookie manager set this value to
436 // true. Session cookies are generally intended to be transient and most Web
437 // browsers do not persist them. Can be set globally using the
438 // CefSettings.persist_session_cookies value. This value will be ignored if
439 // |cache_path| is empty or if it matches the CefSettings.cache_path value.
441 int persist_session_cookies;
444 // Set to true (1) to ignore errors related to invalid SSL certificates.
445 // Enabling this setting can lead to potential security vulnerabilities like
446 // "man in the middle" attacks. Applications that load content from the
447 // internet should not enable this setting. Can be set globally using the
448 // CefSettings.ignore_certificate_errors value. This value will be ignored if
449 // |cache_path| matches the CefSettings.cache_path value.
451 int ignore_certificate_errors;
454 // Comma delimited ordered list of language codes without any whitespace that
455 // will be used in the "Accept-Language" HTTP header. Can be set globally
456 // using the CefSettings.accept_language_list value or overridden on a per-
457 // browser basis using the CefBrowserSettings.accept_language_list value. If
458 // all values are empty then "en-US,en" will be used. This value will be
459 // ignored if |cache_path| matches the CefSettings.cache_path value.
461 cef_string_t accept_language_list;
462 } cef_request_context_settings_t;
465 // Browser initialization settings. Specify NULL or 0 to get the recommended
466 // default values. The consequences of using custom values may not be well
467 // tested. Many of these and other settings can also configured using command-
470 typedef struct _cef_browser_settings_t {
472 // Size of this structure.
477 // The maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
478 // will be called for a windowless browser. The actual fps may be lower if
479 // the browser cannot generate frames at the requested rate. The minimum
480 // value is 1 and the maximum value is 60 (default 30).
482 int windowless_frame_rate;
484 // The below values map to WebPreferences settings.
489 cef_string_t standard_font_family;
490 cef_string_t fixed_font_family;
491 cef_string_t serif_font_family;
492 cef_string_t sans_serif_font_family;
493 cef_string_t cursive_font_family;
494 cef_string_t fantasy_font_family;
495 int default_font_size;
496 int default_fixed_font_size;
497 int minimum_font_size;
498 int minimum_logical_font_size;
501 // Default encoding for Web content. If empty "ISO-8859-1" will be used. Also
502 // configurable using the "default-encoding" command-line switch.
504 cef_string_t default_encoding;
507 // Controls the loading of fonts from remote sources. Also configurable using
508 // the "disable-remote-fonts" command-line switch.
510 cef_state_t remote_fonts;
513 // Controls whether JavaScript can be executed. Also configurable using the
514 // "disable-javascript" command-line switch.
516 cef_state_t javascript;
519 // Controls whether JavaScript can be used for opening windows. Also
520 // configurable using the "disable-javascript-open-windows" command-line
523 cef_state_t javascript_open_windows;
526 // Controls whether JavaScript can be used to close windows that were not
527 // opened via JavaScript. JavaScript can still be used to close windows that
528 // were opened via JavaScript or that have no back/forward history. Also
529 // configurable using the "disable-javascript-close-windows" command-line
532 cef_state_t javascript_close_windows;
535 // Controls whether JavaScript can access the clipboard. Also configurable
536 // using the "disable-javascript-access-clipboard" command-line switch.
538 cef_state_t javascript_access_clipboard;
541 // Controls whether DOM pasting is supported in the editor via
542 // execCommand("paste"). The |javascript_access_clipboard| setting must also
543 // be enabled. Also configurable using the "disable-javascript-dom-paste"
544 // command-line switch.
546 cef_state_t javascript_dom_paste;
549 // Controls whether the caret position will be drawn. Also configurable using
550 // the "enable-caret-browsing" command-line switch.
552 cef_state_t caret_browsing;
555 // Controls whether the Java plugin will be loaded. Also configurable using
556 // the "disable-java" command-line switch.
561 // Controls whether any plugins will be loaded. Also configurable using the
562 // "disable-plugins" command-line switch.
567 // Controls whether file URLs will have access to all URLs. Also configurable
568 // using the "allow-universal-access-from-files" command-line switch.
570 cef_state_t universal_access_from_file_urls;
573 // Controls whether file URLs will have access to other file URLs. Also
574 // configurable using the "allow-access-from-files" command-line switch.
576 cef_state_t file_access_from_file_urls;
579 // Controls whether web security restrictions (same-origin policy) will be
580 // enforced. Disabling this setting is not recommend as it will allow risky
581 // security behavior such as cross-site scripting (XSS). Also configurable
582 // using the "disable-web-security" command-line switch.
584 cef_state_t web_security;
587 // Controls whether image URLs will be loaded from the network. A cached image
588 // will still be rendered if requested. Also configurable using the
589 // "disable-image-loading" command-line switch.
591 cef_state_t image_loading;
594 // Controls whether standalone images will be shrunk to fit the page. Also
595 // configurable using the "image-shrink-standalone-to-fit" command-line
598 cef_state_t image_shrink_standalone_to_fit;
601 // Controls whether text areas can be resized. Also configurable using the
602 // "disable-text-area-resize" command-line switch.
604 cef_state_t text_area_resize;
607 // Controls whether the tab key can advance focus to links. Also configurable
608 // using the "disable-tab-to-links" command-line switch.
610 cef_state_t tab_to_links;
613 // Controls whether local storage can be used. Also configurable using the
614 // "disable-local-storage" command-line switch.
616 cef_state_t local_storage;
619 // Controls whether databases can be used. Also configurable using the
620 // "disable-databases" command-line switch.
622 cef_state_t databases;
625 // Controls whether the application cache can be used. Also configurable using
626 // the "disable-application-cache" command-line switch.
628 cef_state_t application_cache;
631 // Controls whether WebGL can be used. Note that WebGL requires hardware
632 // support and may not work on all systems even when enabled. Also
633 // configurable using the "disable-webgl" command-line switch.
638 // Opaque background color used for the browser before a document is loaded
639 // and when no document color is specified. By default the background color
640 // will be the same as CefSettings.background_color. Only the RGB compontents
641 // of the specified value will be used. The alpha component must greater than
642 // 0 to enable use of the background color but will be otherwise ignored.
644 cef_color_t background_color;
647 // Comma delimited ordered list of language codes without any whitespace that
648 // will be used in the "Accept-Language" HTTP header. May be set globally
649 // using the CefBrowserSettings.accept_language_list value. If both values are
650 // empty then "en-US,en" will be used.
652 cef_string_t accept_language_list;
653 } cef_browser_settings_t;
656 // Return value types.
660 // Cancel immediately.
665 // Continue immediately.
670 // Continue asynchronously (usually via a callback).
673 } cef_return_value_t;
676 // URL component parts.
678 typedef struct _cef_urlparts_t {
680 // The complete URL specification.
685 // Scheme component not including the colon (e.g., "http").
690 // User name component.
692 cef_string_t username;
695 // Password component.
697 cef_string_t password;
700 // Host component. This may be a hostname, an IPv4 address or an IPv6 literal
701 // surrounded by square brackets (e.g., "[2001:db8::1]").
706 // Port number component.
711 // Origin contains just the scheme, host, and port from a URL. Equivalent to
712 // clearing any username and password, replacing the path with a slash, and
713 // clearing everything after that. This value will be empty for non-standard
719 // Path component including the first slash following the host.
724 // Query string component (i.e., everything following the '?').
730 // Cookie information.
732 typedef struct _cef_cookie_t {
744 // If |domain| is empty a host cookie will be created instead of a domain
745 // cookie. Domain cookies are stored with a leading "." and are visible to
746 // sub-domains whereas host cookies are not.
751 // If |path| is non-empty only URLs at or below the path will get the cookie
757 // If |secure| is true the cookie will only be sent for HTTPS requests.
762 // If |httponly| is true the cookie will only be sent for HTTP requests.
767 // The cookie creation date. This is automatically populated by the system on
773 // The cookie last access date. This is automatically populated by the system
776 cef_time_t last_access;
779 // The cookie expiration date is only valid if |has_expires| is true.
786 // Process termination status values.
790 // Non-zero exit status.
792 TS_ABNORMAL_TERMINATION,
795 // SIGKILL or task manager kill.
797 TS_PROCESS_WAS_KILLED,
800 // Segmentation fault.
803 } cef_termination_status_t;
810 // Current directory.
815 // Directory containing PK_FILE_EXE.
820 // Directory containing PK_FILE_MODULE.
825 // Temporary directory.
830 // Path and filename of the current executable.
835 // Path and filename of the module containing the CEF code (usually the libcef
841 // "Local Settings\Application Data" directory under the user profile
842 // directory on Windows.
847 // "Application Data" directory under the user profile directory on Windows
848 // and "~/Library/Application Support" directory on Mac OS X.
859 } cef_storage_type_t;
862 // Supported error code values. See net\base\net_error_list.h for complete
863 // descriptions of the error codes.
869 ERR_INVALID_ARGUMENT = -4,
870 ERR_INVALID_HANDLE = -5,
871 ERR_FILE_NOT_FOUND = -6,
873 ERR_FILE_TOO_BIG = -8,
875 ERR_ACCESS_DENIED = -10,
876 ERR_NOT_IMPLEMENTED = -11,
877 ERR_CONNECTION_CLOSED = -100,
878 ERR_CONNECTION_RESET = -101,
879 ERR_CONNECTION_REFUSED = -102,
880 ERR_CONNECTION_ABORTED = -103,
881 ERR_CONNECTION_FAILED = -104,
882 ERR_NAME_NOT_RESOLVED = -105,
883 ERR_INTERNET_DISCONNECTED = -106,
884 ERR_SSL_PROTOCOL_ERROR = -107,
885 ERR_ADDRESS_INVALID = -108,
886 ERR_ADDRESS_UNREACHABLE = -109,
887 ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
888 ERR_TUNNEL_CONNECTION_FAILED = -111,
889 ERR_NO_SSL_VERSIONS_ENABLED = -112,
890 ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
891 ERR_SSL_RENEGOTIATION_REQUESTED = -114,
892 ERR_CERT_COMMON_NAME_INVALID = -200,
893 ERR_CERT_DATE_INVALID = -201,
894 ERR_CERT_AUTHORITY_INVALID = -202,
895 ERR_CERT_CONTAINS_ERRORS = -203,
896 ERR_CERT_NO_REVOCATION_MECHANISM = -204,
897 ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
898 ERR_CERT_REVOKED = -206,
899 ERR_CERT_INVALID = -207,
901 ERR_INVALID_URL = -300,
902 ERR_DISALLOWED_URL_SCHEME = -301,
903 ERR_UNKNOWN_URL_SCHEME = -302,
904 ERR_TOO_MANY_REDIRECTS = -310,
905 ERR_UNSAFE_REDIRECT = -311,
906 ERR_UNSAFE_PORT = -312,
907 ERR_INVALID_RESPONSE = -320,
908 ERR_INVALID_CHUNKED_ENCODING = -321,
909 ERR_METHOD_NOT_SUPPORTED = -322,
910 ERR_UNEXPECTED_PROXY_AUTH = -323,
911 ERR_EMPTY_RESPONSE = -324,
912 ERR_RESPONSE_HEADERS_TOO_BIG = -325,
913 ERR_CACHE_MISS = -400,
914 ERR_INSECURE_RESPONSE = -501,
918 // The manner in which a link click should be opened.
925 WOD_NEW_FOREGROUND_TAB,
926 WOD_NEW_BACKGROUND_TAB,
932 } cef_window_open_disposition_t;
935 // "Verb" of a drag-and-drop operation as negotiated between the source and
936 // destination. These constants match their equivalents in WebCore's
937 // DragActions.h and should not be renumbered.
940 DRAG_OPERATION_NONE = 0,
941 DRAG_OPERATION_COPY = 1,
942 DRAG_OPERATION_LINK = 2,
943 DRAG_OPERATION_GENERIC = 4,
944 DRAG_OPERATION_PRIVATE = 8,
945 DRAG_OPERATION_MOVE = 16,
946 DRAG_OPERATION_DELETE = 32,
947 DRAG_OPERATION_EVERY = UINT_MAX
948 } cef_drag_operations_mask_t;
951 // V8 access control values.
954 V8_ACCESS_CONTROL_DEFAULT = 0,
955 V8_ACCESS_CONTROL_ALL_CAN_READ = 1,
956 V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1,
957 V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2
958 } cef_v8_accesscontrol_t;
961 // V8 property attribute values.
964 V8_PROPERTY_ATTRIBUTE_NONE = 0, // Writeable, Enumerable,
966 V8_PROPERTY_ATTRIBUTE_READONLY = 1 << 0, // Not writeable
967 V8_PROPERTY_ATTRIBUTE_DONTENUM = 1 << 1, // Not enumerable
968 V8_PROPERTY_ATTRIBUTE_DONTDELETE = 1 << 2 // Not configurable
969 } cef_v8_propertyattribute_t;
972 // Post data elements may represent either bytes or files.
978 } cef_postdataelement_type_t;
981 // Resource type for a request.
1005 // Image (jpg/gif/png/etc).
1015 // Some other subresource. This is the default type if the actual type is
1021 // Object (or embed) tag for a plugin, or a resource that a plugin requested.
1031 // Main resource of a dedicated worker.
1036 // Main resource of a shared worker.
1041 // Explicitly requested prefetch.
1056 // A request for a <ping>
1061 // Main resource of a service worker.
1064 } cef_resource_type_t;
1067 // Transition type for a request. Made up of one source value and 0 or more
1072 // Source is a link click or the JavaScript window.open function. This is
1073 // also the default value for requests like sub-resource loads that are not
1079 // Source is some other "explicit" navigation action such as creating a new
1080 // browser or using the LoadURL function. This is also the default value
1081 // for navigations where the actual type is unknown.
1086 // Source is a subframe navigation. This is any content that is automatically
1087 // loaded in a non-toplevel frame. For example, if a page consists of several
1088 // frames containing ads, those ad URLs will have this transition type.
1089 // The user may not even realize the content in these pages is a separate
1090 // frame, so may not care about the URL.
1092 TT_AUTO_SUBFRAME = 3,
1095 // Source is a subframe navigation explicitly requested by the user that will
1096 // generate new navigation entries in the back/forward list. These are
1097 // probably more important than frames that were automatically loaded in
1098 // the background because the user probably cares about the fact that this
1101 TT_MANUAL_SUBFRAME = 4,
1104 // Source is a form submission by the user. NOTE: In some situations
1105 // submitting a form does not result in this transition type. This can happen
1106 // if the form uses a script to submit the contents.
1111 // Source is a "reload" of the page via the Reload function or by re-visiting
1112 // the same URL. NOTE: This is distinct from the concept of whether a
1113 // particular load uses "reload semantics" (i.e. bypasses cached data).
1118 // General mask defining the bits used for the source values.
1120 TT_SOURCE_MASK = 0xFF,
1123 // Any of the core values above can be augmented by one or more qualifiers.
1124 // These qualifiers further define the transition.
1127 // Attempted to visit a URL but was blocked.
1129 TT_BLOCKED_FLAG = 0x00800000,
1132 // Used the Forward or Back function to navigate among browsing history.
1134 TT_FORWARD_BACK_FLAG = 0x01000000,
1137 // The beginning of a navigation chain.
1139 TT_CHAIN_START_FLAG = 0x10000000,
1142 // The last transition in a redirect chain.
1144 TT_CHAIN_END_FLAG = 0x20000000,
1147 // Redirects caused by JavaScript or a meta refresh tag on the page.
1149 TT_CLIENT_REDIRECT_FLAG = 0x40000000,
1152 // Redirects sent from the server by HTTP headers.
1154 TT_SERVER_REDIRECT_FLAG = 0x80000000,
1157 // Used to test whether a transition involves a redirect.
1159 TT_IS_REDIRECT_MASK = 0xC0000000,
1162 // General mask defining the bits used for the qualifiers.
1164 TT_QUALIFIER_MASK = 0xFFFFFF00,
1165 } cef_transition_type_t;
1168 // Flags used to customize the behavior of CefURLRequest.
1172 // Default behavior.
1177 // If set the cache will be skipped when handling the request.
1179 UR_FLAG_SKIP_CACHE = 1 << 0,
1182 // If set user name, password, and cookies may be sent with the request, and
1183 // cookies may be saved from the response.
1185 UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
1188 // If set upload progress events will be generated when a request has a body.
1190 UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3,
1193 // If set the headers sent and received for the request will be recorded.
1195 UR_FLAG_REPORT_RAW_HEADERS = 1 << 5,
1198 // If set the CefURLRequestClient::OnDownloadData method will not be called.
1200 UR_FLAG_NO_DOWNLOAD_DATA = 1 << 6,
1203 // If set 5XX redirect errors will be propagated to the observer instead of
1204 // automatically re-tried. This currently only applies for requests
1205 // originated in the browser process.
1207 UR_FLAG_NO_RETRY_ON_5XX = 1 << 7,
1208 } cef_urlrequest_flags_t;
1211 // Flags that represent CefURLRequest status.
1220 // Request succeeded.
1225 // An IO request is pending, and the caller will be informed when it is
1231 // Request was canceled programatically.
1236 // Request failed for some reason.
1239 } cef_urlrequest_status_t;
1242 // Structure representing a point.
1244 typedef struct _cef_point_t {
1250 // Structure representing a rectangle.
1252 typedef struct _cef_rect_t {
1260 // Structure representing a size.
1262 typedef struct _cef_size_t {
1268 // Existing process IDs.
1276 // Renderer process.
1282 // Existing thread IDs.
1285 // BROWSER PROCESS THREADS -- Only available in the browser process.
1288 // The main thread in the browser. This will be the same as the main
1289 // application thread if CefInitialize() is called with a
1290 // CefSettings.multi_threaded_message_loop value of false.
1295 // Used to interact with the database.
1300 // Used to interact with the file system.
1305 // Used for file system operations that block user interactions.
1306 // Responsiveness of this thread affects users.
1308 TID_FILE_USER_BLOCKING,
1311 // Used to launch and terminate browser processes.
1313 TID_PROCESS_LAUNCHER,
1316 // Used to handle slow HTTP cache operations.
1321 // Used to process IPC and network messages.
1325 // RENDER PROCESS THREADS -- Only available in the render process.
1328 // The main thread in the renderer. Used for all WebKit and V8 interaction.
1334 // Supported value types.
1349 // Supported JavaScript dialog types.
1352 JSDIALOGTYPE_ALERT = 0,
1353 JSDIALOGTYPE_CONFIRM,
1354 JSDIALOGTYPE_PROMPT,
1355 } cef_jsdialog_type_t;
1358 // Screen information used when window rendering is disabled. This structure is
1359 // passed as a parameter to CefRenderHandler::GetScreenInfo and should be filled
1360 // in by the client.
1362 typedef struct _cef_screen_info_t {
1364 // Device scale factor. Specifies the ratio between physical and logical
1367 float device_scale_factor;
1370 // The screen depth in bits per pixel.
1375 // The bits per color component. This assumes that the colors are balanced
1378 int depth_per_component;
1381 // This can be true for black and white printers.
1386 // This is set from the rcMonitor member of MONITORINFOEX, to whit:
1387 // "A RECT structure that specifies the display monitor rectangle,
1388 // expressed in virtual-screen coordinates. Note that if the monitor
1389 // is not the primary display monitor, some of the rectangle's
1390 // coordinates may be negative values."
1392 // The |rect| and |available_rect| properties are used to determine the
1393 // available surface for rendering popup views.
1398 // This is set from the rcWork member of MONITORINFOEX, to whit:
1399 // "A RECT structure that specifies the work area rectangle of the
1400 // display monitor that can be used by applications, expressed in
1401 // virtual-screen coordinates. Windows uses this rectangle to
1402 // maximize an application on the monitor. The rest of the area in
1403 // rcMonitor contains system windows such as the task bar and side
1404 // bars. Note that if the monitor is not the primary display monitor,
1405 // some of the rectangle's coordinates may be negative values".
1407 // The |rect| and |available_rect| properties are used to determine the
1408 // available surface for rendering popup views.
1410 cef_rect_t available_rect;
1411 } cef_screen_info_t;
1414 // Supported menu IDs. Non-English translations can be provided for the
1415 // IDS_MENU_* strings in CefResourceBundleHandler::GetLocalizedString().
1420 MENU_ID_FORWARD = 101,
1421 MENU_ID_RELOAD = 102,
1422 MENU_ID_RELOAD_NOCACHE = 103,
1423 MENU_ID_STOPLOAD = 104,
1430 MENU_ID_PASTE = 114,
1431 MENU_ID_DELETE = 115,
1432 MENU_ID_SELECT_ALL = 116,
1436 MENU_ID_PRINT = 131,
1437 MENU_ID_VIEW_SOURCE = 132,
1439 // Spell checking word correction suggestions.
1440 MENU_ID_SPELLCHECK_SUGGESTION_0 = 200,
1441 MENU_ID_SPELLCHECK_SUGGESTION_1 = 201,
1442 MENU_ID_SPELLCHECK_SUGGESTION_2 = 202,
1443 MENU_ID_SPELLCHECK_SUGGESTION_3 = 203,
1444 MENU_ID_SPELLCHECK_SUGGESTION_4 = 204,
1445 MENU_ID_SPELLCHECK_SUGGESTION_LAST = 204,
1446 MENU_ID_NO_SPELLING_SUGGESTIONS = 205,
1447 MENU_ID_ADD_TO_DICTIONARY = 206,
1449 // All user-defined menu IDs should come between MENU_ID_USER_FIRST and
1450 // MENU_ID_USER_LAST to avoid overlapping the Chromium and CEF ID ranges
1451 // defined in the tools/gritsettings/resource_ids file.
1452 MENU_ID_USER_FIRST = 26500,
1453 MENU_ID_USER_LAST = 28500,
1457 // Mouse button types.
1463 } cef_mouse_button_type_t;
1466 // Structure representing mouse event information.
1468 typedef struct _cef_mouse_event_t {
1470 // X coordinate relative to the left side of the view.
1475 // Y coordinate relative to the top side of the view.
1480 // Bit flags describing any pressed modifier keys. See
1481 // cef_event_flags_t for values.
1484 } cef_mouse_event_t;
1487 // Paint element types.
1492 } cef_paint_element_type_t;
1495 // Supported event bit flags.
1499 EVENTFLAG_CAPS_LOCK_ON = 1 << 0,
1500 EVENTFLAG_SHIFT_DOWN = 1 << 1,
1501 EVENTFLAG_CONTROL_DOWN = 1 << 2,
1502 EVENTFLAG_ALT_DOWN = 1 << 3,
1503 EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4,
1504 EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5,
1505 EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6,
1506 // Mac OS-X command key.
1507 EVENTFLAG_COMMAND_DOWN = 1 << 7,
1508 EVENTFLAG_NUM_LOCK_ON = 1 << 8,
1509 EVENTFLAG_IS_KEY_PAD = 1 << 9,
1510 EVENTFLAG_IS_LEFT = 1 << 10,
1511 EVENTFLAG_IS_RIGHT = 1 << 11,
1512 } cef_event_flags_t;
1515 // Supported menu item types.
1519 MENUITEMTYPE_COMMAND,
1522 MENUITEMTYPE_SEPARATOR,
1523 MENUITEMTYPE_SUBMENU,
1524 } cef_menu_item_type_t;
1527 // Supported context menu type flags.
1531 // No node is selected.
1533 CM_TYPEFLAG_NONE = 0,
1535 // The top page is selected.
1537 CM_TYPEFLAG_PAGE = 1 << 0,
1539 // A subframe page is selected.
1541 CM_TYPEFLAG_FRAME = 1 << 1,
1543 // A link is selected.
1545 CM_TYPEFLAG_LINK = 1 << 2,
1547 // A media node is selected.
1549 CM_TYPEFLAG_MEDIA = 1 << 3,
1551 // There is a textual or mixed selection that is selected.
1553 CM_TYPEFLAG_SELECTION = 1 << 4,
1555 // An editable element is selected.
1557 CM_TYPEFLAG_EDITABLE = 1 << 5,
1558 } cef_context_menu_type_flags_t;
1561 // Supported context menu media types.
1565 // No special node is in context.
1569 // An image node is selected.
1573 // A video node is selected.
1577 // An audio node is selected.
1581 // A file node is selected.
1585 // A plugin node is selected.
1587 CM_MEDIATYPE_PLUGIN,
1588 } cef_context_menu_media_type_t;
1591 // Supported context menu media state bit flags.
1594 CM_MEDIAFLAG_NONE = 0,
1595 CM_MEDIAFLAG_ERROR = 1 << 0,
1596 CM_MEDIAFLAG_PAUSED = 1 << 1,
1597 CM_MEDIAFLAG_MUTED = 1 << 2,
1598 CM_MEDIAFLAG_LOOP = 1 << 3,
1599 CM_MEDIAFLAG_CAN_SAVE = 1 << 4,
1600 CM_MEDIAFLAG_HAS_AUDIO = 1 << 5,
1601 CM_MEDIAFLAG_HAS_VIDEO = 1 << 6,
1602 CM_MEDIAFLAG_CONTROL_ROOT_ELEMENT = 1 << 7,
1603 CM_MEDIAFLAG_CAN_PRINT = 1 << 8,
1604 CM_MEDIAFLAG_CAN_ROTATE = 1 << 9,
1605 } cef_context_menu_media_state_flags_t;
1608 // Supported context menu edit state bit flags.
1611 CM_EDITFLAG_NONE = 0,
1612 CM_EDITFLAG_CAN_UNDO = 1 << 0,
1613 CM_EDITFLAG_CAN_REDO = 1 << 1,
1614 CM_EDITFLAG_CAN_CUT = 1 << 2,
1615 CM_EDITFLAG_CAN_COPY = 1 << 3,
1616 CM_EDITFLAG_CAN_PASTE = 1 << 4,
1617 CM_EDITFLAG_CAN_DELETE = 1 << 5,
1618 CM_EDITFLAG_CAN_SELECT_ALL = 1 << 6,
1619 CM_EDITFLAG_CAN_TRANSLATE = 1 << 7,
1620 } cef_context_menu_edit_state_flags_t;
1627 // Notification that a key transitioned from "up" to "down".
1629 KEYEVENT_RAWKEYDOWN = 0,
1632 // Notification that a key was pressed. This does not necessarily correspond
1633 // to a character depending on the key and language. Use KEYEVENT_CHAR for
1639 // Notification that a key was released.
1644 // Notification that a character was typed. Use this for text input. Key
1645 // down events may generate 0, 1, or more than one character event depending
1646 // on the key, locale, and operating system.
1649 } cef_key_event_type_t;
1652 // Structure representing keyboard event information.
1654 typedef struct _cef_key_event_t {
1656 // The type of keyboard event.
1658 cef_key_event_type_t type;
1661 // Bit flags describing any pressed modifier keys. See
1662 // cef_event_flags_t for values.
1667 // The Windows key code for the key event. This value is used by the DOM
1668 // specification. Sometimes it comes directly from the event (i.e. on
1669 // Windows) and sometimes it's determined using a mapping function. See
1670 // WebCore/platform/chromium/KeyboardCodes.h for the list of values.
1672 int windows_key_code;
1675 // The actual key code genenerated by the platform.
1677 int native_key_code;
1680 // Indicates whether the event is considered a "system key" event (see
1681 // http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx for details).
1682 // This value will always be false on non-Windows platforms.
1687 // The character generated by the keystroke.
1692 // Same as |character| but unmodified by any concurrently-held modifiers
1693 // (except shift). This is useful for working out shortcut keys.
1695 char16 unmodified_character;
1698 // True if the focus is currently on an editable field on the page. This is
1699 // useful for determining if standard key events should be intercepted.
1701 int focus_on_editable_field;
1709 // The source is explicit navigation via the API (LoadURL(), etc).
1711 FOCUS_SOURCE_NAVIGATION = 0,
1713 // The source is a system-generated focus event.
1715 FOCUS_SOURCE_SYSTEM,
1716 } cef_focus_source_t;
1719 // Navigation types.
1722 NAVIGATION_LINK_CLICKED = 0,
1723 NAVIGATION_FORM_SUBMITTED,
1724 NAVIGATION_BACK_FORWARD,
1726 NAVIGATION_FORM_RESUBMITTED,
1728 } cef_navigation_type_t;
1731 // Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and
1732 // UTF16 (LE and BE) by default. All other types must be translated to UTF8
1733 // before being passed to the parser. If a BOM is detected and the correct
1734 // decoder is available then that decoder will be used automatically.
1737 XML_ENCODING_NONE = 0,
1739 XML_ENCODING_UTF16LE,
1740 XML_ENCODING_UTF16BE,
1742 } cef_xml_encoding_type_t;
1748 XML_NODE_UNSUPPORTED = 0,
1749 XML_NODE_PROCESSING_INSTRUCTION,
1750 XML_NODE_DOCUMENT_TYPE,
1751 XML_NODE_ELEMENT_START,
1752 XML_NODE_ELEMENT_END,
1756 XML_NODE_ENTITY_REFERENCE,
1757 XML_NODE_WHITESPACE,
1759 } cef_xml_node_type_t;
1762 // Popup window features.
1764 typedef struct _cef_popup_features_t {
1775 int statusBarVisible;
1777 int locationBarVisible;
1778 int scrollbarsVisible;
1783 cef_string_list_t additionalFeatures;
1784 } cef_popup_features_t;
1787 // DOM document types.
1790 DOM_DOCUMENT_TYPE_UNKNOWN = 0,
1791 DOM_DOCUMENT_TYPE_HTML,
1792 DOM_DOCUMENT_TYPE_XHTML,
1793 DOM_DOCUMENT_TYPE_PLUGIN,
1794 } cef_dom_document_type_t;
1797 // DOM event category flags.
1800 DOM_EVENT_CATEGORY_UNKNOWN = 0x0,
1801 DOM_EVENT_CATEGORY_UI = 0x1,
1802 DOM_EVENT_CATEGORY_MOUSE = 0x2,
1803 DOM_EVENT_CATEGORY_MUTATION = 0x4,
1804 DOM_EVENT_CATEGORY_KEYBOARD = 0x8,
1805 DOM_EVENT_CATEGORY_TEXT = 0x10,
1806 DOM_EVENT_CATEGORY_COMPOSITION = 0x20,
1807 DOM_EVENT_CATEGORY_DRAG = 0x40,
1808 DOM_EVENT_CATEGORY_CLIPBOARD = 0x80,
1809 DOM_EVENT_CATEGORY_MESSAGE = 0x100,
1810 DOM_EVENT_CATEGORY_WHEEL = 0x200,
1811 DOM_EVENT_CATEGORY_BEFORE_TEXT_INSERTED = 0x400,
1812 DOM_EVENT_CATEGORY_OVERFLOW = 0x800,
1813 DOM_EVENT_CATEGORY_PAGE_TRANSITION = 0x1000,
1814 DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
1815 DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
1816 DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
1817 } cef_dom_event_category_t;
1820 // DOM event processing phases.
1823 DOM_EVENT_PHASE_UNKNOWN = 0,
1824 DOM_EVENT_PHASE_CAPTURING,
1825 DOM_EVENT_PHASE_AT_TARGET,
1826 DOM_EVENT_PHASE_BUBBLING,
1827 } cef_dom_event_phase_t;
1833 DOM_NODE_TYPE_UNSUPPORTED = 0,
1834 DOM_NODE_TYPE_ELEMENT,
1835 DOM_NODE_TYPE_ATTRIBUTE,
1837 DOM_NODE_TYPE_CDATA_SECTION,
1838 DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,
1839 DOM_NODE_TYPE_COMMENT,
1840 DOM_NODE_TYPE_DOCUMENT,
1841 DOM_NODE_TYPE_DOCUMENT_TYPE,
1842 DOM_NODE_TYPE_DOCUMENT_FRAGMENT,
1843 } cef_dom_node_type_t;
1846 // Supported file dialog modes.
1850 // Requires that the file exists before allowing the user to pick it.
1852 FILE_DIALOG_OPEN = 0,
1855 // Like Open, but allows picking multiple files to open.
1857 FILE_DIALOG_OPEN_MULTIPLE,
1860 // Like Open, but selects a folder to open.
1862 FILE_DIALOG_OPEN_FOLDER,
1865 // Allows picking a nonexistent file, and prompts to overwrite if the file
1871 // General mask defining the bits used for the type values.
1873 FILE_DIALOG_TYPE_MASK = 0xFF,
1876 // Any of the type values above can be augmented by one or more qualifiers.
1877 // These qualifiers further define the dialog behavior.
1880 // Prompt to overwrite if the user selects an existing file with the Save
1883 FILE_DIALOG_OVERWRITEPROMPT_FLAG = 0x01000000,
1886 // Do not display read-only files.
1888 FILE_DIALOG_HIDEREADONLY_FLAG = 0x02000000,
1889 } cef_file_dialog_mode_t;
1892 // Geoposition error codes.
1895 GEOPOSITON_ERROR_NONE = 0,
1896 GEOPOSITON_ERROR_PERMISSION_DENIED,
1897 GEOPOSITON_ERROR_POSITION_UNAVAILABLE,
1898 GEOPOSITON_ERROR_TIMEOUT,
1899 } cef_geoposition_error_code_t;
1902 // Structure representing geoposition information. The properties of this
1903 // structure correspond to those of the JavaScript Position object although
1904 // their types may differ.
1906 typedef struct _cef_geoposition_t {
1908 // Latitude in decimal degrees north (WGS84 coordinate frame).
1913 // Longitude in decimal degrees west (WGS84 coordinate frame).
1918 // Altitude in meters (above WGS84 datum).
1923 // Accuracy of horizontal position in meters.
1928 // Accuracy of altitude in meters.
1930 double altitude_accuracy;
1933 // Heading in decimal degrees clockwise from true north.
1938 // Horizontal component of device velocity in meters per second.
1943 // Time of position measurement in milliseconds since Epoch in UTC time. This
1944 // is taken from the host computer's system clock.
1946 cef_time_t timestamp;
1949 // Error code, see enum above.
1951 cef_geoposition_error_code_t error_code;
1954 // Human-readable error message.
1956 cef_string_t error_message;
1957 } cef_geoposition_t;
1960 // Print job color mode values.
1963 COLOR_MODEL_UNKNOWN,
1969 COLOR_MODEL_CMY_K, // CMY_K represents CMY+K.
1971 COLOR_MODEL_GRAYSCALE,
1975 COLOR_MODEL_COLORMODE_COLOR, // Used in samsung printer ppds.
1976 COLOR_MODEL_COLORMODE_MONOCHROME, // Used in samsung printer ppds.
1977 COLOR_MODEL_HP_COLOR_COLOR, // Used in HP color printer ppds.
1978 COLOR_MODEL_HP_COLOR_BLACK, // Used in HP color printer ppds.
1979 COLOR_MODEL_PRINTOUTMODE_NORMAL, // Used in foomatic ppds.
1980 COLOR_MODEL_PRINTOUTMODE_NORMAL_GRAY, // Used in foomatic ppds.
1981 COLOR_MODEL_PROCESSCOLORMODEL_CMYK, // Used in canon printer ppds.
1982 COLOR_MODEL_PROCESSCOLORMODEL_GREYSCALE, // Used in canon printer ppds.
1983 COLOR_MODEL_PROCESSCOLORMODEL_RGB, // Used in canon printer ppds
1984 } cef_color_model_t;
1987 // Print job duplex mode values.
1990 DUPLEX_MODE_UNKNOWN = -1,
1991 DUPLEX_MODE_SIMPLEX,
1992 DUPLEX_MODE_LONG_EDGE,
1993 DUPLEX_MODE_SHORT_EDGE,
1994 } cef_duplex_mode_t;
1997 // Structure representing a print job page range.
1999 typedef struct _cef_page_range_t {
2005 // Cursor type values.
2022 CT_NORTHSOUTHRESIZE,
2024 CT_NORTHEASTSOUTHWESTRESIZE,
2025 CT_NORTHWESTSOUTHEASTRESIZE,
2031 CT_NORTHEASTPANNING,
2032 CT_NORTHWESTPANNING,
2034 CT_SOUTHEASTPANNING,
2035 CT_SOUTHWESTPANNING,
2052 } cef_cursor_type_t;
2055 // Structure representing cursor information. |buffer| will be
2056 // |size.width|*|size.height|*4 bytes in size and represents a BGRA image with
2057 // an upper-left origin.
2059 typedef struct _cef_cursor_info_t {
2060 cef_point_t hotspot;
2061 float image_scale_factor;
2064 } cef_cursor_info_t;
2067 // URI unescape rules passed to CefURIDecode().
2071 // Don't unescape anything at all.
2076 // Don't unescape anything special, but all normal unescaping will happen.
2077 // This is a placeholder and can't be combined with other flags (since it's
2078 // just the absence of them). All other unescape rules imply "normal" in
2079 // addition to their special meaning. Things like escaped letters, digits,
2080 // and most symbols will get unescaped with this mode.
2085 // Convert %20 to spaces. In some places where we're showing URLs, we may
2086 // want this. In places where the URL may be copied and pasted out, then
2087 // you wouldn't want this since it might not be interpreted in one piece
2088 // by other applications.
2093 // Unescapes various characters that will change the meaning of URLs,
2094 // including '%', '+', '&', '/', '#'. If we unescaped these characters, the
2095 // resulting URL won't be the same as the source one. This flag is used when
2096 // generating final output like filenames for URLs where we won't be
2097 // interpreting as a URL and want to do as much unescaping as possible.
2099 UU_URL_SPECIAL_CHARS = 4,
2102 // Unescapes control characters such as %01. This INCLUDES NULLs. This is
2103 // used for rare cases such as data: URL decoding where the result is binary
2104 // data. This flag also unescapes BiDi control characters.
2106 // DO NOT use CONTROL_CHARS if the URL is going to be displayed in the UI
2107 // for security reasons.
2109 UU_CONTROL_CHARS = 8,
2112 // URL queries use "+" for space. This flag controls that replacement.
2114 UU_REPLACE_PLUS_WITH_SPACE = 16,
2115 } cef_uri_unescape_rule_t;
2121 #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_H_