From 88c309279f4acb300ad2e2e5e9ac4f2d94871b77 Mon Sep 17 00:00:00 2001 From: Vasil Rimar <5660247+vrimar@users.noreply.github.com> Date: Sun, 21 Jul 2024 18:21:34 -0400 Subject: [PATCH 01/14] Update to cef_binary_126.2.18+g3647d39+chromium-126.0.6478.183 --- CefGlue.Common/CommonBrowserAdapter.cs | 2 +- .../CommonCefRenderHandler.cs | 5 +- .../base/internal/cef_net_error_list.h | 73 +- CefGlue.Interop.Gen/include/cef_api_hash.h | 10 +- CefGlue.Interop.Gen/include/cef_app.h | 18 +- CefGlue.Interop.Gen/include/cef_browser.h | 32 +- .../include/cef_browser_process_handler.h | 25 +- CefGlue.Interop.Gen/include/cef_color_ids.h | 1616 ++++++++ CefGlue.Interop.Gen/include/cef_command_ids.h | 174 +- .../include/cef_command_line.h | 1 + CefGlue.Interop.Gen/include/cef_config.h | 2 +- CefGlue.Interop.Gen/include/cef_cookie.h | 1 + .../include/cef_dialog_handler.h | 25 +- CefGlue.Interop.Gen/include/cef_dom.h | 1 + .../include/cef_download_handler.h | 20 +- CefGlue.Interop.Gen/include/cef_drag_data.h | 1 + CefGlue.Interop.Gen/include/cef_extension.h | 2 + .../include/cef_extension_handler.h | 2 + CefGlue.Interop.Gen/include/cef_frame.h | 4 +- .../include/cef_frame_handler.h | 4 +- .../include/cef_life_span_handler.h | 2 +- .../include/cef_media_router.h | 3 +- .../include/cef_render_handler.h | 19 +- CefGlue.Interop.Gen/include/cef_request.h | 1 + .../include/cef_request_context.h | 42 + .../include/cef_request_handler.h | 45 +- CefGlue.Interop.Gen/include/cef_response.h | 1 + CefGlue.Interop.Gen/include/cef_server.h | 1 + CefGlue.Interop.Gen/include/cef_ssl_info.h | 1 - .../cef_unresponsive_process_callback.h | 62 + CefGlue.Interop.Gen/include/cef_v8.h | 6 +- CefGlue.Interop.Gen/include/cef_values.h | 1 + CefGlue.Interop.Gen/include/cef_version.h | 22 +- .../include/internal/cef_string_wrappers.h | 14 +- .../include/internal/cef_types.h | 316 +- .../include/internal/cef_types_color.h | 57 + .../internal/cef_types_content_settings.h | 85 +- .../include/internal/cef_types_runtime.h | 88 + .../include/internal/cef_types_win.h | 28 + .../include/internal/cef_types_wrappers.h | 17 +- .../include/internal/cef_win.h | 2 + .../include/wrapper/cef_byte_read_handler.h | 12 +- .../include/wrapper/cef_helpers.h | 2 +- .../include/wrapper/cef_message_router.h | 6 +- .../include/wrapper/cef_resource_manager.h | 2 +- .../include/wrapper/cef_xml_object.h | 2 +- CefGlue.Interop.Gen/schema.py | 19 +- CefGlue.Interop.Gen/schema_cef3.py | 2 + CefGlue/CefGlue.g.props | 260 ++ .../CefBrowserProcessHandler.cs | 31 +- CefGlue/Classes.Handlers/CefDialogHandler.cs | 37 +- .../Classes.Handlers/CefDownloadHandler.cs | 11 +- CefGlue/Classes.Handlers/CefRenderHandler.cs | 38 +- CefGlue/Classes.Handlers/CefRequestHandler.cs | 73 +- CefGlue/Classes.Proxies/CefBrowser.cs | 37 +- CefGlue/Classes.Proxies/CefFrame.cs | 13 +- CefGlue/Classes.Proxies/CefV8Value.cs | 6 +- .../Classes.g/CefBrowserProcessHandler.g.cs | 249 +- CefGlue/Classes.g/CefRequestHandler.g.cs | 270 +- .../CefUnresponsiveProcessCallback.g.cs | 83 + CefGlue/Enums/CefColorVariant.cs | 21 + CefGlue/Enums/CefRuntimeStyle.cs | 27 + .../Interop/Classes.g/cef_browser_host_t.g.cs | 3452 +++++++++-------- .../cef_browser_process_handler_t.g.cs | 215 +- CefGlue/Interop/Classes.g/cef_browser_t.g.cs | 1228 +++--- .../Classes.g/cef_dialog_handler_t.g.cs | 138 +- .../Classes.g/cef_download_handler_t.g.cs | 166 +- CefGlue/Interop/Classes.g/cef_frame_t.g.cs | 1420 +++---- .../Classes.g/cef_render_handler_t.g.cs | 362 +- .../Classes.g/cef_request_context_t.g.cs | 1636 ++++---- .../Classes.g/cef_request_handler_t.g.cs | 264 +- .../cef_unresponsive_process_callback_t.g.cs | 158 + CefGlue/Interop/Classes.g/cef_v8value_t.g.cs | 2820 +++++++------- .../Structs/cef_accelerated_paint_info_t.cs | 21 + CefGlue/Interop/libcef.g.cs | 398 +- CefGlue/Interop/version.g.cs | 56 +- CefGlue/Structs/CefAcceleratedPaintInfo.cs | 20 + Directory.Build.props | 4 +- 78 files changed, 9720 insertions(+), 6670 deletions(-) create mode 100644 CefGlue.Interop.Gen/include/cef_color_ids.h create mode 100644 CefGlue.Interop.Gen/include/cef_unresponsive_process_callback.h create mode 100644 CefGlue.Interop.Gen/include/internal/cef_types_color.h create mode 100644 CefGlue.Interop.Gen/include/internal/cef_types_runtime.h create mode 100644 CefGlue/CefGlue.g.props create mode 100644 CefGlue/Classes.g/CefUnresponsiveProcessCallback.g.cs create mode 100644 CefGlue/Enums/CefColorVariant.cs create mode 100644 CefGlue/Enums/CefRuntimeStyle.cs create mode 100644 CefGlue/Interop/Classes.g/cef_unresponsive_process_callback_t.g.cs create mode 100644 CefGlue/Interop/Structs/cef_accelerated_paint_info_t.cs create mode 100644 CefGlue/Structs/CefAcceleratedPaintInfo.cs diff --git a/CefGlue.Common/CommonBrowserAdapter.cs b/CefGlue.Common/CommonBrowserAdapter.cs index 3c52cf60..bd554cf8 100644 --- a/CefGlue.Common/CommonBrowserAdapter.cs +++ b/CefGlue.Common/CommonBrowserAdapter.cs @@ -232,7 +232,7 @@ public void ExecuteJavaScript(string code, string url, int line) public Task EvaluateJavaScript(string code, string url, int line, string frameName = null, TimeSpan? timeout = null) { - var frame = frameName != null ? _browser?.GetFrame(frameName) : _browser?.GetMainFrame(); + var frame = frameName != null ? _browser?.GetFrameByName(frameName) : _browser?.GetMainFrame(); if (frame != null) { return EvaluateJavaScript(code, url, line, frame, timeout); diff --git a/CefGlue.Common/InternalHandlers/CommonCefRenderHandler.cs b/CefGlue.Common/InternalHandlers/CommonCefRenderHandler.cs index 36a0b14b..bb4c0390 100644 --- a/CefGlue.Common/InternalHandlers/CommonCefRenderHandler.cs +++ b/CefGlue.Common/InternalHandlers/CommonCefRenderHandler.cs @@ -1,4 +1,5 @@ -using System; +using CefGlue.Structs; +using System; using Xilium.CefGlue.Common.Helpers.Logger; namespace Xilium.CefGlue.Common.InternalHandlers @@ -56,7 +57,7 @@ protected override void OnPopupSize(CefBrowser browser, CefRectangle rect) _owner.HandlePopupSizeChange(rect); } - protected override void OnAcceleratedPaint(CefBrowser browser, CefPaintElementType type, CefRectangle[] dirtyRects, IntPtr sharedHandle) + protected override void OnAcceleratedPaint(CefBrowser browser, CefPaintElementType type, CefRectangle[] dirtyRects, CefAcceleratedPaintInfo paintInfo) { } diff --git a/CefGlue.Interop.Gen/include/base/internal/cef_net_error_list.h b/CefGlue.Interop.Gen/include/base/internal/cef_net_error_list.h index 2e28c884..7895c59a 100644 --- a/CefGlue.Interop.Gen/include/base/internal/cef_net_error_list.h +++ b/CefGlue.Interop.Gen/include/base/internal/cef_net_error_list.h @@ -18,7 +18,7 @@ // 300-399 HTTP errors // 400-499 Cache errors // 500-599 ? -// 600-699 FTP errors +// 600-699 // 700-799 Certificate manager errors // 800-899 DNS resolver errors @@ -127,6 +127,10 @@ NET_ERROR(H2_OR_QUIC_REQUIRED, -31) // The request was blocked by CORB or ORB. NET_ERROR(BLOCKED_BY_ORB, -32) +// The request was blocked because it originated from a frame that has disabled +// network access. +NET_ERROR(NETWORK_ACCESS_REVOKED, -33) + // A connection was closed (corresponding to a TCP FIN). NET_ERROR(CONNECTION_CLOSED, -100) @@ -263,7 +267,7 @@ NET_ERROR(TEMPORARILY_THROTTLED, -139) // received a 302 (temporary redirect) response. The response body might // include a description of why the request failed. // -// TODO(https://crbug.com/928551): This is deprecated and should not be used by +// TODO(crbug.com/40093955): This is deprecated and should not be used by // new code. NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT, -140) @@ -790,7 +794,7 @@ NET_ERROR(HTTP2_STREAM_CLOSED, -376) // The server returned a non-2xx HTTP response code. // -// Not that this error is only used by certain APIs that interpret the HTTP +// Note that this error is only used by certain APIs that interpret the HTTP // response itself. URLRequest for instance just passes most non-2xx // response back as success. NET_ERROR(HTTP_RESPONSE_CODE_FAILURE, -379) @@ -817,6 +821,20 @@ NET_ERROR(INCONSISTENT_IP_ADDRESS_SPACE, -383) NET_ERROR(CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_PRIVATE_NETWORK_ACCESS_POLICY, -384) +// The connection is blocked by private network access checks. +NET_ERROR(BLOCKED_BY_PRIVATE_NETWORK_ACCESS_CHECKS, -385) + +// Content decoding failed due to the zstd window size being too big (over 8MB). +NET_ERROR(ZSTD_WINDOW_SIZE_TOO_BIG, -386) + +// The compression dictionary cannot be loaded. +NET_ERROR(DICTIONARY_LOAD_FAILED, -387) + +// The "content-dictionary" response header is unexpected. This is used both +// when there is no "content-dictionary" response header and when the received +// "content-dictionary" response header does not match the expected value. +NET_ERROR(UNEXPECTED_CONTENT_DICTIONARY_HEADER, -388) + // The cache does not have the requested entry. NET_ERROR(CACHE_MISS, -400) @@ -898,37 +916,13 @@ NET_ERROR(TRUST_TOKEN_OPERATION_FAILED, -506) NET_ERROR(TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST, -507) // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). *** - -// A generic error for failed FTP control connection command. -// If possible, please use or add a more specific error code. -NET_ERROR(FTP_FAILED, -601) - -// The server cannot fulfill the request at this point. This is a temporary -// error. -// FTP response code 421. -NET_ERROR(FTP_SERVICE_UNAVAILABLE, -602) - -// The server has aborted the transfer. -// FTP response code 426. -NET_ERROR(FTP_TRANSFER_ABORTED, -603) - -// The file is busy, or some other temporary error condition on opening -// the file. -// FTP response code 450. -NET_ERROR(FTP_FILE_BUSY, -604) - -// Server rejected our command because of syntax errors. -// FTP response codes 500, 501. -NET_ERROR(FTP_SYNTAX_ERROR, -605) - -// Server does not support the command we issued. -// FTP response codes 502, 504. -NET_ERROR(FTP_COMMAND_NOT_SUPPORTED, -606) - -// Server rejected our command because we didn't issue the commands in right -// order. -// FTP response code 503. -NET_ERROR(FTP_BAD_COMMAND_SEQUENCE, -607) +// *** Code -601 is reserved (was FTP_FAILED). *** +// *** Code -602 is reserved (was FTP_SERVICE_UNAVAILABLE). *** +// *** Code -603 is reserved (was FTP_TRANSFER_ABORTED). *** +// *** Code -604 is reserved (was FTP_FILE_BUSY). *** +// *** Code -605 is reserved (was FTP_SYNTAX_ERROR). *** +// *** Code -606 is reserved (was FTP_COMMAND_NOT_SUPPORTED). *** +// *** Code -607 is reserved (was FTP_BAD_COMMAND_SEQUENCE). *** // PKCS #12 import failed due to incorrect password. NET_ERROR(PKCS12_IMPORT_BAD_PASSWORD, -701) @@ -1029,7 +1023,12 @@ NET_ERROR(DNS_REQUEST_CANCELLED, -810) // alpn values of supported protocols, but did not. NET_ERROR(DNS_NO_MATCHING_SUPPORTED_ALPN, -811) -// The compression dictionary cannot be loaded. -NET_ERROR(DICTIONARY_LOAD_FAILED, -812) +// Error -812 was removed +// Error -813 was removed + +// When checking whether secure DNS can be used, the response returned for the +// requested probe record either had no answer or was invalid. +NET_ERROR(DNS_SECURE_PROBE_RECORD_INVALID, -814) -// Error -813 was removed (DICTIONARY_ORIGIN_CHECK_FAILED) +// CAUTION: Before adding errors here, please check the ranges of errors written +// in the top of this file. diff --git a/CefGlue.Interop.Gen/include/cef_api_hash.h b/CefGlue.Interop.Gen/include/cef_api_hash.h index 4d855bac..cfb2fac7 100644 --- a/CefGlue.Interop.Gen/include/cef_api_hash.h +++ b/CefGlue.Interop.Gen/include/cef_api_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2024 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 @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "bbdc07e7c5ed2ae5398efdebdd1ed08801bc91ab" +#define CEF_API_HASH_UNIVERSAL "ed1dfa5ff8a041241f8fb72eb7454811f358f0d3" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "002e3391fd68b0a444dbb6cd1b2a19a4c181d935" +#define CEF_API_HASH_PLATFORM "0d99d1b9b85b2efab91a39d6fc325bb6d56fd524" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "3e4f2433692dc8bb779314dce84b81d81d39d2c2" +#define CEF_API_HASH_PLATFORM "e585e190387e31a71267207b66d175e213991470" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "4e707370d08d4639c41e7c8aa8027c4a6090eace" +#define CEF_API_HASH_PLATFORM "09d3e280ed38f7a082b794c56ff71c52f86f0ea8" #endif #ifdef __cplusplus diff --git a/CefGlue.Interop.Gen/include/cef_app.h b/CefGlue.Interop.Gen/include/cef_app.h index f52280cf..f011d02f 100644 --- a/CefGlue.Interop.Gen/include/cef_app.h +++ b/CefGlue.Interop.Gen/include/cef_app.h @@ -71,9 +71,9 @@ int CefExecuteProcess(const CefMainArgs& args, /// true if initialization succeeds. Returns false if initialization fails or if /// early exit is desired (for example, due to process singleton relaunch /// behavior). If this function returns false then the application should exit -/// immediately without calling any other CEF functions. The -/// |windows_sandbox_info| parameter is only used on Windows and may be NULL -/// (see cef_sandbox_win.h for details). +/// immediately without calling any other CEF functions except, optionally, +/// CefGetErrorCode. The |windows_sandbox_info| parameter is only used on +/// Windows and may be NULL (see cef_sandbox_win.h for details). /// /*--cef(api_hash_check,optional_param=application, optional_param=windows_sandbox_info)--*/ @@ -82,6 +82,18 @@ bool CefInitialize(const CefMainArgs& args, CefRefPtr application, void* windows_sandbox_info); +/// +/// This function can optionally be called on the main application thread after +/// CefInitialize to retrieve the initialization exit code. When CefInitialize +/// returns true the exit code will be 0 (CEF_RESULT_CODE_NORMAL_EXIT). +/// Otherwise, see cef_resultcode_t for possible exit code values including +/// browser process initialization errors and normal early exit conditions (such +/// as CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED for process singleton +/// relaunch behavior). +/// +/*--cef()--*/ +int CefGetExitCode(); + /// /// This function should be called on the main application thread to shut down /// the CEF browser process before the application exits. Do not call any diff --git a/CefGlue.Interop.Gen/include/cef_browser.h b/CefGlue.Interop.Gen/include/cef_browser.h index 7ba49858..c2e8d943 100644 --- a/CefGlue.Interop.Gen/include/cef_browser.h +++ b/CefGlue.Interop.Gen/include/cef_browser.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_devtools_message_observer.h" #include "include/cef_drag_data.h" @@ -169,14 +170,15 @@ class CefBrowser : public virtual CefBaseRefCounted { /// /// Returns the frame with the specified identifier, or NULL if not found. /// - /*--cef(capi_name=get_frame_byident)--*/ - virtual CefRefPtr GetFrame(int64_t identifier) = 0; + /*--cef()--*/ + virtual CefRefPtr GetFrameByIdentifier( + const CefString& identifier) = 0; /// /// Returns the frame with the specified name, or NULL if not found. /// /*--cef(optional_param=name)--*/ - virtual CefRefPtr GetFrame(const CefString& name) = 0; + virtual CefRefPtr GetFrameByName(const CefString& name) = 0; /// /// Returns the number of frames that currently exist. @@ -188,7 +190,7 @@ class CefBrowser : public virtual CefBaseRefCounted { /// Returns the identifiers of all existing frames. /// /*--cef(count_func=identifiers:GetFrameCount)--*/ - virtual void GetFrameIdentifiers(std::vector& identifiers) = 0; + virtual void GetFrameIdentifiers(std::vector& identifiers) = 0; /// /// Returns the names of all existing frames. @@ -941,6 +943,8 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /// Returns the extension hosted in this browser or NULL if no extension is /// hosted. See CefRequestContext::LoadExtension for details. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual CefRefPtr GetExtension() = 0; @@ -949,6 +953,8 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /// Background hosts do not have a window and are not displayable. See /// CefRequestContext::LoadExtension for details. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual bool IsBackgroundHost() = 0; @@ -1006,6 +1012,24 @@ class CefBrowserHost : public virtual CefBaseRefCounted { virtual void ExecuteChromeCommand( int command_id, cef_window_open_disposition_t disposition) = 0; + + /// + /// Returns true if the render process associated with this browser is + /// currently unresponsive as indicated by a lack of input event processing + /// for at least 15 seconds. To receive associated state change notifications + /// and optionally handle an unresponsive render process implement + /// CefRequestHandler::OnRenderProcessUnresponsive. This method can only be + /// called on the UI thread. + /// + /*--cef()--*/ + virtual bool IsRenderProcessUnresponsive() = 0; + + /// + /// Returns the runtime style for this browser (ALLOY or CHROME). See + /// cef_runtime_style_t documentation for details. + /// + /*--cef(default_retval=CEF_RUNTIME_STYLE_DEFAULT)--*/ + virtual cef_runtime_style_t GetRuntimeStyle() = 0; }; #endif // CEF_INCLUDE_CEF_BROWSER_H_ diff --git a/CefGlue.Interop.Gen/include/cef_browser_process_handler.h b/CefGlue.Interop.Gen/include/cef_browser_process_handler.h index 93daf563..088df8ef 100644 --- a/CefGlue.Interop.Gen/include/cef_browser_process_handler.h +++ b/CefGlue.Interop.Gen/include/cef_browser_process_handler.h @@ -42,6 +42,7 @@ #include "include/cef_client.h" #include "include/cef_command_line.h" #include "include/cef_preference.h" +#include "include/cef_request_context_handler.h" #include "include/cef_values.h" /// @@ -139,14 +140,28 @@ class CefBrowserProcessHandler : public virtual CefBaseRefCounted { virtual void OnScheduleMessagePumpWork(int64_t delay_ms) {} /// - /// Return the default client for use with a newly created browser window. If - /// null is returned the browser will be unmanaged (no callbacks will be - /// executed for that browser) and application shutdown will be blocked until - /// the browser window is closed manually. This method is currently only used - /// with the chrome runtime. + /// Return the default client for use with a newly created browser window + /// (CefBrowser object). If null is returned the CefBrowser will be unmanaged + /// (no callbacks will be executed for that CefBrowser) and application + /// shutdown will be blocked until the browser window is closed manually. This + /// method is currently only used with the Chrome runtime when creating new + /// browser windows via Chrome UI. /// /*--cef()--*/ virtual CefRefPtr GetDefaultClient() { return nullptr; } + + /// + /// Return the default handler for use with a new user or incognito profile + /// (CefRequestContext object). If null is returned the CefRequestContext will + /// be unmanaged (no callbacks will be executed for that CefRequestContext). + /// This method is currently only used with the Chrome runtime when creating + /// new browser windows via Chrome UI. + /// + /*--cef()--*/ + virtual CefRefPtr + GetDefaultRequestContextHandler() { + return nullptr; + } }; #endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ diff --git a/CefGlue.Interop.Gen/include/cef_color_ids.h b/CefGlue.Interop.Gen/include/cef_color_ids.h new file mode 100644 index 00000000..60b287a3 --- /dev/null +++ b/CefGlue.Interop.Gen/include/cef_color_ids.h @@ -0,0 +1,1616 @@ +// Copyright (c) 2024 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. +// +// --------------------------------------------------------------------------- +// +// This file is generated by the make_colorids_header.py tool. +// + +#ifndef CEF_INCLUDE_CEF_COLOR_IDS_H_ +#define CEF_INCLUDE_CEF_COLOR_IDS_H_ +#pragma once + +#include "include/base/cef_build.h" + +// Undefine the macros that will be defined in this file. +// This avoids previous definition conflicts with Chromium. +#undef CHROMEOS_ASH_COLOR_IDS +#undef CHROME_COLOR_IDS +#undef CHROME_PLATFORM_SPECIFIC_COLOR_IDS +#undef COLOR_IDS +#undef COMMON_CHROME_COLOR_IDS +#undef COMMON_COMPONENTS_COLOR_IDS +#undef COMPONENTS_COLOR_IDS +#undef CROSS_PLATFORM_COLOR_IDS +#undef PLATFORM_SPECIFIC_COLOR_IDS + +// --------------------------------------------------------------------------- +// From ui/color/color_id.h: + +#define CROSS_PLATFORM_COLOR_IDS \ + /* UI reference color tokens */ \ + /* Use the 3 param macro so CEF_ColorAccent is set to the correct value. */ \ + E_CPONLY(CEF_ColorRefPrimary0, CEF_UiColorsStart, CEF_UiColorsStart) \ + E_CPONLY(CEF_ColorRefPrimary10) \ + E_CPONLY(CEF_ColorRefPrimary20) \ + E_CPONLY(CEF_ColorRefPrimary25) \ + E_CPONLY(CEF_ColorRefPrimary30) \ + E_CPONLY(CEF_ColorRefPrimary40) \ + E_CPONLY(CEF_ColorRefPrimary50) \ + E_CPONLY(CEF_ColorRefPrimary60) \ + E_CPONLY(CEF_ColorRefPrimary70) \ + E_CPONLY(CEF_ColorRefPrimary80) \ + E_CPONLY(CEF_ColorRefPrimary90) \ + E_CPONLY(CEF_ColorRefPrimary95) \ + E_CPONLY(CEF_ColorRefPrimary99) \ + E_CPONLY(CEF_ColorRefPrimary100) \ + E_CPONLY(CEF_ColorRefSecondary0) \ + E_CPONLY(CEF_ColorRefSecondary10) \ + E_CPONLY(CEF_ColorRefSecondary12) \ + E_CPONLY(CEF_ColorRefSecondary15) \ + E_CPONLY(CEF_ColorRefSecondary20) \ + E_CPONLY(CEF_ColorRefSecondary25) \ + E_CPONLY(CEF_ColorRefSecondary30) \ + E_CPONLY(CEF_ColorRefSecondary35) \ + E_CPONLY(CEF_ColorRefSecondary40) \ + E_CPONLY(CEF_ColorRefSecondary50) \ + E_CPONLY(CEF_ColorRefSecondary60) \ + E_CPONLY(CEF_ColorRefSecondary70) \ + E_CPONLY(CEF_ColorRefSecondary80) \ + E_CPONLY(CEF_ColorRefSecondary90) \ + E_CPONLY(CEF_ColorRefSecondary95) \ + E_CPONLY(CEF_ColorRefSecondary99) \ + E_CPONLY(CEF_ColorRefSecondary100) \ + E_CPONLY(CEF_ColorRefTertiary0) \ + E_CPONLY(CEF_ColorRefTertiary10) \ + E_CPONLY(CEF_ColorRefTertiary20) \ + E_CPONLY(CEF_ColorRefTertiary30) \ + E_CPONLY(CEF_ColorRefTertiary40) \ + E_CPONLY(CEF_ColorRefTertiary50) \ + E_CPONLY(CEF_ColorRefTertiary60) \ + E_CPONLY(CEF_ColorRefTertiary70) \ + E_CPONLY(CEF_ColorRefTertiary80) \ + E_CPONLY(CEF_ColorRefTertiary90) \ + E_CPONLY(CEF_ColorRefTertiary95) \ + E_CPONLY(CEF_ColorRefTertiary99) \ + E_CPONLY(CEF_ColorRefTertiary100) \ + E_CPONLY(CEF_ColorRefError0) \ + E_CPONLY(CEF_ColorRefError10) \ + E_CPONLY(CEF_ColorRefError20) \ + E_CPONLY(CEF_ColorRefError30) \ + E_CPONLY(CEF_ColorRefError40) \ + E_CPONLY(CEF_ColorRefError50) \ + E_CPONLY(CEF_ColorRefError60) \ + E_CPONLY(CEF_ColorRefError70) \ + E_CPONLY(CEF_ColorRefError80) \ + E_CPONLY(CEF_ColorRefError90) \ + E_CPONLY(CEF_ColorRefError95) \ + E_CPONLY(CEF_ColorRefError99) \ + E_CPONLY(CEF_ColorRefError100) \ + E_CPONLY(CEF_ColorRefNeutral0) \ + E_CPONLY(CEF_ColorRefNeutral4) \ + E_CPONLY(CEF_ColorRefNeutral6) \ + E_CPONLY(CEF_ColorRefNeutral8) \ + E_CPONLY(CEF_ColorRefNeutral10) \ + E_CPONLY(CEF_ColorRefNeutral12) \ + E_CPONLY(CEF_ColorRefNeutral15) \ + E_CPONLY(CEF_ColorRefNeutral17) \ + E_CPONLY(CEF_ColorRefNeutral20) \ + E_CPONLY(CEF_ColorRefNeutral22) \ + E_CPONLY(CEF_ColorRefNeutral24) \ + E_CPONLY(CEF_ColorRefNeutral25) \ + E_CPONLY(CEF_ColorRefNeutral30) \ + E_CPONLY(CEF_ColorRefNeutral40) \ + E_CPONLY(CEF_ColorRefNeutral50) \ + E_CPONLY(CEF_ColorRefNeutral60) \ + E_CPONLY(CEF_ColorRefNeutral70) \ + E_CPONLY(CEF_ColorRefNeutral80) \ + E_CPONLY(CEF_ColorRefNeutral87) \ + E_CPONLY(CEF_ColorRefNeutral90) \ + E_CPONLY(CEF_ColorRefNeutral92) \ + E_CPONLY(CEF_ColorRefNeutral94) \ + E_CPONLY(CEF_ColorRefNeutral95) \ + E_CPONLY(CEF_ColorRefNeutral96) \ + E_CPONLY(CEF_ColorRefNeutral98) \ + E_CPONLY(CEF_ColorRefNeutral99) \ + E_CPONLY(CEF_ColorRefNeutral100) \ + E_CPONLY(CEF_ColorRefNeutralVariant0) \ + E_CPONLY(CEF_ColorRefNeutralVariant10) \ + E_CPONLY(CEF_ColorRefNeutralVariant15) \ + E_CPONLY(CEF_ColorRefNeutralVariant20) \ + E_CPONLY(CEF_ColorRefNeutralVariant30) \ + E_CPONLY(CEF_ColorRefNeutralVariant40) \ + E_CPONLY(CEF_ColorRefNeutralVariant50) \ + E_CPONLY(CEF_ColorRefNeutralVariant60) \ + E_CPONLY(CEF_ColorRefNeutralVariant70) \ + E_CPONLY(CEF_ColorRefNeutralVariant80) \ + E_CPONLY(CEF_ColorRefNeutralVariant90) \ + E_CPONLY(CEF_ColorRefNeutralVariant95) \ + E_CPONLY(CEF_ColorRefNeutralVariant99) \ + E_CPONLY(CEF_ColorRefNeutralVariant100) \ + \ + /* UI material system color tokens. Id ordering matches UX design spec. */ \ + E_CPONLY(CEF_ColorSysPrimary) \ + E_CPONLY(CEF_ColorSysOnPrimary) \ + E_CPONLY(CEF_ColorSysPrimaryContainer) \ + E_CPONLY(CEF_ColorSysOnPrimaryContainer) \ + E_CPONLY(CEF_ColorSysGradientPrimary) \ + /* Secondary. */ \ + E_CPONLY(CEF_ColorSysSecondary) \ + E_CPONLY(CEF_ColorSysOnSecondary) \ + E_CPONLY(CEF_ColorSysSecondaryContainer) \ + E_CPONLY(CEF_ColorSysOnSecondaryContainer) \ + /* Tertiary. */ \ + E_CPONLY(CEF_ColorSysTertiary) \ + E_CPONLY(CEF_ColorSysOnTertiary) \ + E_CPONLY(CEF_ColorSysTertiaryContainer) \ + E_CPONLY(CEF_ColorSysOnTertiaryContainer) \ + E_CPONLY(CEF_ColorSysGradientTertiary) \ + /* Error. */ \ + E_CPONLY(CEF_ColorSysError) \ + E_CPONLY(CEF_ColorSysOnError) \ + E_CPONLY(CEF_ColorSysErrorContainer) \ + E_CPONLY(CEF_ColorSysOnErrorContainer) \ + /* Neutral. */ \ + E_CPONLY(CEF_ColorSysOnSurface) \ + E_CPONLY(CEF_ColorSysOnSurfaceVariant) \ + E_CPONLY(CEF_ColorSysOutline) \ + E_CPONLY(CEF_ColorSysSurfaceVariant) \ + /* Constant. */\ + E_CPONLY(CEF_ColorSysBlack) \ + E_CPONLY(CEF_ColorSysWhite) \ + /* Inverse. */ \ + E_CPONLY(CEF_ColorSysInversePrimary) \ + E_CPONLY(CEF_ColorSysInverseSurface) \ + E_CPONLY(CEF_ColorSysInverseOnSurface) \ + /* Surfaces. */ \ + E_CPONLY(CEF_ColorSysSurface) \ + E_CPONLY(CEF_ColorSysSurface1) \ + E_CPONLY(CEF_ColorSysSurface2) \ + E_CPONLY(CEF_ColorSysSurface3) \ + E_CPONLY(CEF_ColorSysSurface4) \ + E_CPONLY(CEF_ColorSysSurface5) \ + /* General. */ \ + E_CPONLY(CEF_ColorSysOnSurfaceSecondary) \ + E_CPONLY(CEF_ColorSysOnSurfaceSubtle) \ + E_CPONLY(CEF_ColorSysOnSurfacePrimary) \ + E_CPONLY(CEF_ColorSysOnSurfacePrimaryInactive) \ + E_CPONLY(CEF_ColorSysTonalContainer) \ + E_CPONLY(CEF_ColorSysOnTonalContainer) \ + E_CPONLY(CEF_ColorSysTonalOutline) \ + E_CPONLY(CEF_ColorSysNeutralOutline) \ + E_CPONLY(CEF_ColorSysNeutralContainer) \ + E_CPONLY(CEF_ColorSysDivider) \ + /* Chrome surfaces. */ \ + E_CPONLY(CEF_ColorSysBase) \ + E_CPONLY(CEF_ColorSysBaseContainer) \ + E_CPONLY(CEF_ColorSysBaseContainerElevated) \ + E_CPONLY(CEF_ColorSysHeader) \ + E_CPONLY(CEF_ColorSysHeaderInactive) \ + E_CPONLY(CEF_ColorSysHeaderContainer) \ + E_CPONLY(CEF_ColorSysHeaderContainerInactive) \ + E_CPONLY(CEF_ColorSysOnHeaderDivider) \ + E_CPONLY(CEF_ColorSysOnHeaderDividerInactive) \ + E_CPONLY(CEF_ColorSysOnHeaderPrimary) \ + E_CPONLY(CEF_ColorSysOnHeaderPrimaryInactive) \ + /* States. */ \ + E_CPONLY(CEF_ColorSysStateHoverOnProminent) \ + E_CPONLY(CEF_ColorSysStateHoverOnSubtle) \ + E_CPONLY(CEF_ColorSysStateRippleNeutralOnProminent) \ + E_CPONLY(CEF_ColorSysStateRippleNeutralOnSubtle) \ + E_CPONLY(CEF_ColorSysStateRipplePrimary) \ + E_CPONLY(CEF_ColorSysStateFocusRing) \ + E_CPONLY(CEF_ColorSysStateFocusHighlight) \ + E_CPONLY(CEF_ColorSysStateTextHighlight) \ + E_CPONLY(CEF_ColorSysStateOnTextHighlight) \ + E_CPONLY(CEF_ColorSysStateDisabled) \ + E_CPONLY(CEF_ColorSysStateDisabledContainer) \ + E_CPONLY(CEF_ColorSysStateHoverDimBlendProtection) \ + E_CPONLY(CEF_ColorSysStateHoverBrightBlendProtection) \ + E_CPONLY(CEF_ColorSysStateOnHeaderHover) \ + E_CPONLY(CEF_ColorSysStateHeaderHover) \ + E_CPONLY(CEF_ColorSysStateHeaderHoverInactive) \ + E_CPONLY(CEF_ColorSysStateHeaderSelect) \ + E_CPONLY(CEF_ColorSysStateInactiveRing) \ + /* Effects. */ \ + E_CPONLY(CEF_ColorSysShadow) \ + /* AI. */ \ + E_CPONLY(CEF_ColorSysAiIllustrationShapeSurface1) \ + E_CPONLY(CEF_ColorSysAiIllustrationShapeSurface2) \ + E_CPONLY(CEF_ColorSysAiIllustrationShapeSurfaceGradientStart) \ + E_CPONLY(CEF_ColorSysAiIllustrationShapeSurfaceGradientEnd) \ + /* Experimentation. */ \ + E_CPONLY(CEF_ColorSysOmniboxContainer) \ + /* Deprecated */ \ + E_CPONLY(CEF_ColorSysOnBase) \ + E_CPONLY(CEF_ColorSysOnBaseSecondary) \ + E_CPONLY(CEF_ColorSysOnBaseBorder) \ + E_CPONLY(CEF_ColorSysStateHover) \ + E_CPONLY(CEF_ColorSysStateFocus) \ + E_CPONLY(CEF_ColorSysStatePressed) \ + E_CPONLY(CEF_ColorSysStateDrag) \ + E_CPONLY(CEF_ColorSysStateHoverCutout) \ + E_CPONLY(CEF_ColorSysStateHoverInverseCutout) \ + /* Core color concepts */ \ + /* CEF_ColorAccent is used in color_provider_css_colors_test.ts. */ \ + /* If changing the variable name, the variable name in the test needs to */ \ + /* be changed as well. */ \ + E_CPONLY(CEF_ColorAccent) \ + E_CPONLY(CEF_ColorAccentWithGuaranteedContrastAtopPrimaryBackground) \ + E_CPONLY(CEF_ColorAlertHighSeverity) \ + E_CPONLY(CEF_ColorAlertLowSeverity) \ + E_CPONLY(CEF_ColorAlertMediumSeverityIcon) \ + E_CPONLY(CEF_ColorAlertMediumSeverityText) \ + E_CPONLY(CEF_ColorDisabledForeground) \ + E_CPONLY(CEF_ColorEndpointBackground) \ + E_CPONLY(CEF_ColorEndpointForeground) \ + E_CPONLY(CEF_ColorItemHighlight) \ + E_CPONLY(CEF_ColorItemSelectionBackground) \ + E_CPONLY(CEF_ColorMenuSelectionBackground) \ + E_CPONLY(CEF_ColorMidground) \ + E_CPONLY(CEF_ColorPrimaryBackground) \ + E_CPONLY(CEF_ColorPrimaryForeground) \ + E_CPONLY(CEF_ColorSecondaryForeground) \ + E_CPONLY(CEF_ColorSubtleAccent) \ + E_CPONLY(CEF_ColorSubtleEmphasisBackground) \ + E_CPONLY(CEF_ColorTextSelectionBackground) \ + E_CPONLY(CEF_ColorTextSelectionForeground) \ + \ + /* Further UI element colors */ \ + E_CPONLY(CEF_ColorAppMenuProfileRowBackground) \ + E_CPONLY(CEF_ColorAppMenuProfileRowChipBackground) \ + E_CPONLY(CEF_ColorAppMenuProfileRowChipHovered) \ + E_CPONLY(CEF_ColorAppMenuRowBackgroundHovered) \ + E_CPONLY(CEF_ColorAppMenuUpgradeRowBackground) \ + E_CPONLY(CEF_ColorAvatarHeaderArt) \ + E_CPONLY(CEF_ColorAvatarIconGuest) \ + E_CPONLY(CEF_ColorAvatarIconIncognito) \ + E_CPONLY(CEF_ColorBadgeBackground) \ + E_CPONLY(CEF_ColorBadgeForeground) \ + E_CPONLY(CEF_ColorBadgeInCocoaMenuBackground) \ + E_CPONLY(CEF_ColorBadgeInCocoaMenuForeground) \ + E_CPONLY(CEF_ColorBubbleBackground) \ + E_CPONLY(CEF_ColorBubbleBorder) \ + E_CPONLY(CEF_ColorBubbleBorderShadowLarge) \ + E_CPONLY(CEF_ColorBubbleBorderShadowSmall) \ + E_CPONLY(CEF_ColorBubbleFooterBackground) \ + E_CPONLY(CEF_ColorBubbleFooterBorder) \ + E_CPONLY(CEF_ColorButtonFeatureAttentionHighlight) \ + E_CPONLY(CEF_ColorButtonBackground) \ + E_CPONLY(CEF_ColorButtonBackgroundPressed) \ + E_CPONLY(CEF_ColorButtonBackgroundProminent) \ + E_CPONLY(CEF_ColorButtonBackgroundProminentDisabled) \ + E_CPONLY(CEF_ColorButtonBackgroundProminentFocused) \ + E_CPONLY(CEF_ColorButtonBackgroundTonal) \ + E_CPONLY(CEF_ColorButtonBackgroundTonalDisabled) \ + E_CPONLY(CEF_ColorButtonBackgroundTonalFocused) \ + E_CPONLY(CEF_ColorButtonBackgroundWithAttention) \ + E_CPONLY(CEF_ColorButtonBorder) \ + E_CPONLY(CEF_ColorButtonBorderDisabled) \ + E_CPONLY(CEF_ColorButtonForeground) \ + E_CPONLY(CEF_ColorButtonForegroundDisabled) \ + E_CPONLY(CEF_ColorButtonForegroundProminent) \ + E_CPONLY(CEF_ColorButtonForegroundTonal) \ + E_CPONLY(CEF_ColorButtonHoverBackgroundText) \ + E_CPONLY(CEF_ColorMultitaskMenuNudgePulse) \ + E_CPONLY(CEF_ColorCheckboxCheck) \ + E_CPONLY(CEF_ColorCheckboxCheckDisabled) \ + E_CPONLY(CEF_ColorCheckboxContainer) \ + E_CPONLY(CEF_ColorCheckboxContainerDisabled) \ + E_CPONLY(CEF_ColorCheckboxOutline) \ + E_CPONLY(CEF_ColorCheckboxOutlineDisabled) \ + E_CPONLY(CEF_ColorCheckboxForegroundChecked) \ + E_CPONLY(CEF_ColorCheckboxForegroundUnchecked) \ + E_CPONLY(CEF_ColorChipBackgroundHover) \ + E_CPONLY(CEF_ColorChipBackgroundSelected) \ + E_CPONLY(CEF_ColorChipBorder) \ + E_CPONLY(CEF_ColorChipForeground) \ + E_CPONLY(CEF_ColorChipForegroundSelected) \ + E_CPONLY(CEF_ColorChipIcon) \ + E_CPONLY(CEF_ColorChipIconSelected) \ + E_CPONLY(CEF_ColorComboboxBackground) \ + E_CPONLY(CEF_ColorComboboxBackgroundDisabled) \ + E_CPONLY(CEF_ColorComboboxContainerOutline) \ + E_CPONLY(CEF_ColorComboboxInkDropHovered) \ + E_CPONLY(CEF_ColorComboboxInkDropRipple) \ + /* These colors correspond to the system colors defined in */ \ + /* ui::NativeTheme::SystemThemeColor. They are used to support */ \ + /* CSS system colors. */ \ + E_CPONLY(CEF_ColorCssSystemBtnFace) \ + E_CPONLY(CEF_ColorCssSystemBtnText) \ + E_CPONLY(CEF_ColorCssSystemGrayText) \ + E_CPONLY(CEF_ColorCssSystemHighlight) \ + E_CPONLY(CEF_ColorCssSystemHighlightText) \ + E_CPONLY(CEF_ColorCssSystemHotlight) \ + E_CPONLY(CEF_ColorCssSystemMenuHilight) \ + E_CPONLY(CEF_ColorCssSystemScrollbar) \ + E_CPONLY(CEF_ColorCssSystemWindow) \ + E_CPONLY(CEF_ColorCssSystemWindowText) \ + E_CPONLY(CEF_ColorCustomFrameCaptionForeground) \ + E_CPONLY(CEF_ColorDebugBoundsOutline) \ + E_CPONLY(CEF_ColorDebugContentOutline) \ + E_CPONLY(CEF_ColorDialogBackground) \ + E_CPONLY(CEF_ColorDialogForeground) \ + E_CPONLY(CEF_ColorDropdownBackground) \ + E_CPONLY(CEF_ColorDropdownBackgroundSelected) \ + E_CPONLY(CEF_ColorDropdownForeground) \ + E_CPONLY(CEF_ColorDropdownForegroundSelected) \ + E_CPONLY(CEF_ColorFocusableBorderFocused) \ + E_CPONLY(CEF_ColorFocusableBorderUnfocused) \ + E_CPONLY(CEF_ColorFrameActive) \ + E_CPONLY(CEF_ColorFrameActiveUnthemed) \ + E_CPONLY(CEF_ColorFrameCaptionButtonUnfocused) \ + E_CPONLY(CEF_ColorFrameInactive) \ + E_CPONLY(CEF_ColorHelpIconActive) \ + E_CPONLY(CEF_ColorHelpIconInactive) \ + /* These should be refactored into chrome_color_id or removed once the */ \ + /* history clusters side panel is refactored to use shadow parts. */ \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelDivider) \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelDialogBackground) \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelDialogDivider) \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelDialogPrimaryForeground) \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelDialogSecondaryForeground) \ + E_CPONLY(CEF_ColorHistoryClustersSidePanelCardSecondaryForeground) \ + E_CPONLY(CEF_ColorIcon) \ + E_CPONLY(CEF_ColorIconDisabled) \ + E_CPONLY(CEF_ColorIconSecondary) \ + /* This is declared here so src/components/ can access it, but we expect */ \ + /* this to be set in the embedder. */ \ + E_CPONLY(CEF_ColorInfoBarIcon) \ + E_CPONLY(CEF_ColorLabelForeground) \ + E_CPONLY(CEF_ColorLabelForegroundDisabled) \ + E_CPONLY(CEF_ColorLabelForegroundSecondary) \ + E_CPONLY(CEF_ColorLabelSelectionBackground) \ + E_CPONLY(CEF_ColorLabelSelectionForeground) \ + E_CPONLY(CEF_ColorLinkForeground) \ + E_CPONLY(CEF_ColorLinkForegroundDefault) \ + E_CPONLY(CEF_ColorLinkForegroundDisabled) \ + E_CPONLY(CEF_ColorLinkForegroundOnBubbleFooter) \ + E_CPONLY(CEF_ColorLinkForegroundPressed) \ + E_CPONLY(CEF_ColorLinkForegroundPressedDefault) \ + E_CPONLY(CEF_ColorLinkForegroundPressedOnBubbleFooter) \ + E_CPONLY(CEF_ColorListItemFolderIconBackground) \ + E_CPONLY(CEF_ColorListItemFolderIconForeground) \ + E_CPONLY(CEF_ColorListItemUrlFaviconBackground) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleBackgroundDefault) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleButtonIcon) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleButtonIconDisabled) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleForegroundDefault) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleForegroundSecondary) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleCheckbox) \ + E_CPONLY(CEF_ColorLiveCaptionBubbleLink) \ + E_CPONLY(CEF_ColorLoadingGradientBorder) \ + E_CPONLY(CEF_ColorLoadingGradientEnd) \ + E_CPONLY(CEF_ColorLoadingGradientMiddle) \ + E_CPONLY(CEF_ColorLoadingGradientStart) \ + E_CPONLY(CEF_ColorMenuBackground) \ + E_CPONLY(CEF_ColorMenuBorder) \ + E_CPONLY(CEF_ColorMenuButtonBackground) \ + E_CPONLY(CEF_ColorMenuButtonBackgroundSelected) \ + E_CPONLY(CEF_ColorMenuDropmarker) \ + E_CPONLY(CEF_ColorMenuIcon) \ + E_CPONLY(CEF_ColorMenuIconDisabled) \ + E_CPONLY(CEF_ColorMenuItemBackgroundAlertedInitial) \ + E_CPONLY(CEF_ColorMenuItemBackgroundAlertedTarget) \ + E_CPONLY(CEF_ColorMenuItemBackgroundHighlighted) \ + E_CPONLY(CEF_ColorMenuItemBackgroundSelected) \ + E_CPONLY(CEF_ColorMenuItemForeground) \ + E_CPONLY(CEF_ColorMenuItemForegroundDisabled) \ + E_CPONLY(CEF_ColorMenuItemForegroundHighlighted) \ + E_CPONLY(CEF_ColorMenuItemForegroundSecondary) \ + E_CPONLY(CEF_ColorMenuItemForegroundSelected) \ + E_CPONLY(CEF_ColorMenuSeparator) \ + E_CPONLY(CEF_ColorNotificationActionsBackground) \ + E_CPONLY(CEF_ColorNotificationBackgroundActive) \ + E_CPONLY(CEF_ColorNotificationBackgroundInactive) \ + E_CPONLY(CEF_ColorNotificationHeaderForeground) \ + E_CPONLY(CEF_ColorNotificationIconBackground) \ + E_CPONLY(CEF_ColorNotificationIconForeground) \ + E_CPONLY(CEF_ColorNotificationImageBackground) \ + E_CPONLY(CEF_ColorNotificationInputBackground) \ + E_CPONLY(CEF_ColorNotificationInputForeground) \ + E_CPONLY(CEF_ColorNotificationInputPlaceholderForeground) \ + E_CPONLY(CEF_ColorOverlayScrollbarFill) \ + E_CPONLY(CEF_ColorOverlayScrollbarFillHovered) \ + E_CPONLY(CEF_ColorOverlayScrollbarStroke) \ + E_CPONLY(CEF_ColorOverlayScrollbarStrokeHovered) \ + E_CPONLY(CEF_ColorProgressBar) \ + E_CPONLY(CEF_ColorProgressBarBackground) \ + E_CPONLY(CEF_ColorProgressBarPaused) \ + E_CPONLY(CEF_ColorRadioButtonForegroundUnchecked) \ + E_CPONLY(CEF_ColorRadioButtonForegroundDisabled) \ + E_CPONLY(CEF_ColorRadioButtonForegroundChecked) \ + E_CPONLY(CEF_ColorSegmentedButtonBorder) \ + E_CPONLY(CEF_ColorSegmentedButtonFocus) \ + E_CPONLY(CEF_ColorSegmentedButtonForegroundChecked) \ + E_CPONLY(CEF_ColorSegmentedButtonForegroundUnchecked) \ + E_CPONLY(CEF_ColorSegmentedButtonHover) \ + E_CPONLY(CEF_ColorSegmentedButtonRipple) \ + E_CPONLY(CEF_ColorSegmentedButtonChecked) \ + E_CPONLY(CEF_ColorSeparator) \ + E_CPONLY(CEF_ColorShadowBase) \ + E_CPONLY(CEF_ColorShadowValueAmbientShadowElevationFour) \ + E_CPONLY(CEF_ColorShadowValueAmbientShadowElevationSixteen) \ + E_CPONLY(CEF_ColorShadowValueAmbientShadowElevationThree) \ + E_CPONLY(CEF_ColorShadowValueAmbientShadowElevationTwelve) \ + E_CPONLY(CEF_ColorShadowValueAmbientShadowElevationTwentyFour) \ + E_CPONLY(CEF_ColorShadowValueKeyShadowElevationFour) \ + E_CPONLY(CEF_ColorShadowValueKeyShadowElevationSixteen) \ + E_CPONLY(CEF_ColorShadowValueKeyShadowElevationThree) \ + E_CPONLY(CEF_ColorShadowValueKeyShadowElevationTwelve) \ + E_CPONLY(CEF_ColorShadowValueKeyShadowElevationTwentyFour) \ + E_CPONLY(CEF_ColorSidePanelComboboxBorder) \ + E_CPONLY(CEF_ColorSidePanelComboboxBackground) \ + E_CPONLY(CEF_ColorSliderThumb) \ + E_CPONLY(CEF_ColorSliderThumbMinimal) \ + E_CPONLY(CEF_ColorSliderTrack) \ + E_CPONLY(CEF_ColorSliderTrackMinimal) \ + E_CPONLY(CEF_ColorSyncInfoBackground) \ + E_CPONLY(CEF_ColorSyncInfoBackgroundError) \ + E_CPONLY(CEF_ColorSyncInfoBackgroundPaused) \ + E_CPONLY(CEF_ColorTabBackgroundHighlighted) \ + E_CPONLY(CEF_ColorTabBackgroundHighlightedFocused) \ + E_CPONLY(CEF_ColorTabBorderSelected) \ + E_CPONLY(CEF_ColorTabContentSeparator) \ + E_CPONLY(CEF_ColorTabForeground) \ + E_CPONLY(CEF_ColorTabForegroundSelected) \ + E_CPONLY(CEF_ColorTableBackground) \ + E_CPONLY(CEF_ColorTableBackgroundAlternate) \ + E_CPONLY(CEF_ColorTableBackgroundSelectedFocused) \ + E_CPONLY(CEF_ColorTableBackgroundSelectedUnfocused) \ + E_CPONLY(CEF_ColorTableForeground) \ + E_CPONLY(CEF_ColorTableForegroundSelectedFocused) \ + E_CPONLY(CEF_ColorTableForegroundSelectedUnfocused) \ + E_CPONLY(CEF_ColorTableGroupingIndicator) \ + E_CPONLY(CEF_ColorTableHeaderBackground) \ + E_CPONLY(CEF_ColorTableHeaderForeground) \ + E_CPONLY(CEF_ColorTableHeaderSeparator) \ + E_CPONLY(CEF_ColorSuggestionChipBorder) \ + E_CPONLY(CEF_ColorSuggestionChipIcon) \ + E_CPONLY(CEF_ColorTextfieldBackground) \ + E_CPONLY(CEF_ColorTextfieldBackgroundDisabled) \ + E_CPONLY(CEF_ColorTextfieldFilledBackground) \ + E_CPONLY(CEF_ColorTextfieldFilledForegroundInvalid) \ + E_CPONLY(CEF_ColorTextfieldFilledUnderline) \ + E_CPONLY(CEF_ColorTextfieldFilledUnderlineFocused) \ + E_CPONLY(CEF_ColorTextfieldForeground) \ + E_CPONLY(CEF_ColorTextfieldForegroundDisabled) \ + E_CPONLY(CEF_ColorTextfieldForegroundIcon) \ + E_CPONLY(CEF_ColorTextfieldForegroundLabel) \ + E_CPONLY(CEF_ColorTextfieldForegroundPlaceholderInvalid) \ + E_CPONLY(CEF_ColorTextfieldForegroundPlaceholder) \ + E_CPONLY(CEF_ColorTextfieldHover) \ + E_CPONLY(CEF_ColorTextfieldSelectionBackground) \ + E_CPONLY(CEF_ColorTextfieldSelectionForeground) \ + E_CPONLY(CEF_ColorTextfieldOutline) \ + E_CPONLY(CEF_ColorTextfieldOutlineDisabled) \ + E_CPONLY(CEF_ColorTextfieldOutlineInvalid) \ + E_CPONLY(CEF_ColorThemeColorPickerCheckmarkBackground) \ + E_CPONLY(CEF_ColorThemeColorPickerCheckmarkForeground) \ + E_CPONLY(CEF_ColorThemeColorPickerCustomColorIconBackground) \ + E_CPONLY(CEF_ColorThemeColorPickerHueSliderDialogBackground) \ + E_CPONLY(CEF_ColorThemeColorPickerHueSliderDialogForeground) \ + E_CPONLY(CEF_ColorThemeColorPickerHueSliderDialogIcon) \ + E_CPONLY(CEF_ColorThemeColorPickerHueSliderHandle) \ + E_CPONLY(CEF_ColorThemeColorPickerOptionBackground) \ + E_CPONLY(CEF_ColorThrobber) \ + E_CPONLY(CEF_ColorThrobberPreconnect) \ + E_CPONLY(CEF_ColorToastBackground) \ + E_CPONLY(CEF_ColorToastButton) \ + E_CPONLY(CEF_ColorToastForeground) \ + E_CPONLY(CEF_ColorToggleButtonHover) \ + E_CPONLY(CEF_ColorToggleButtonPressed) \ + E_CPONLY(CEF_ColorToggleButtonShadow) \ + E_CPONLY(CEF_ColorToggleButtonThumbOff) \ + E_CPONLY(CEF_ColorToggleButtonThumbOffDisabled) \ + E_CPONLY(CEF_ColorToggleButtonThumbOn) \ + E_CPONLY(CEF_ColorToggleButtonThumbOnDisabled) \ + E_CPONLY(CEF_ColorToggleButtonThumbOnHover) \ + E_CPONLY(CEF_ColorToggleButtonTrackOff) \ + E_CPONLY(CEF_ColorToggleButtonTrackOffDisabled) \ + E_CPONLY(CEF_ColorToggleButtonTrackOn) \ + E_CPONLY(CEF_ColorToggleButtonTrackOnDisabled) \ + E_CPONLY(CEF_ColorToolbarSearchFieldBackground) \ + E_CPONLY(CEF_ColorToolbarSearchFieldBackgroundHover) \ + E_CPONLY(CEF_ColorToolbarSearchFieldBackgroundPressed) \ + E_CPONLY(CEF_ColorToolbarSearchFieldForeground) \ + E_CPONLY(CEF_ColorToolbarSearchFieldForegroundPlaceholder) \ + E_CPONLY(CEF_ColorToolbarSearchFieldIcon) \ + E_CPONLY(CEF_ColorTooltipBackground) \ + E_CPONLY(CEF_ColorTooltipForeground) \ + E_CPONLY(CEF_ColorTreeBackground) \ + E_CPONLY(CEF_ColorTreeNodeBackgroundSelectedFocused) \ + E_CPONLY(CEF_ColorTreeNodeBackgroundSelectedUnfocused) \ + E_CPONLY(CEF_ColorTreeNodeForeground) \ + E_CPONLY(CEF_ColorTreeNodeForegroundSelectedFocused) \ + E_CPONLY(CEF_ColorTreeNodeForegroundSelectedUnfocused) \ + /* These colors are used to paint the controls defined in */ \ + /* ui::NativeThemeBase::ControlColorId. */ \ + E_CPONLY(CEF_ColorWebNativeControlAccent) \ + E_CPONLY(CEF_ColorWebNativeControlAccentDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlAccentHovered) \ + E_CPONLY(CEF_ColorWebNativeControlAccentPressed) \ + E_CPONLY(CEF_ColorWebNativeControlAutoCompleteBackground) \ + E_CPONLY(CEF_ColorWebNativeControlBackground) \ + E_CPONLY(CEF_ColorWebNativeControlBackgroundDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlBorder) \ + E_CPONLY(CEF_ColorWebNativeControlBorderDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlBorderHovered) \ + E_CPONLY(CEF_ColorWebNativeControlBorderPressed) \ + E_CPONLY(CEF_ColorWebNativeControlButtonBorder) \ + E_CPONLY(CEF_ColorWebNativeControlButtonBorderDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlButtonBorderHovered) \ + E_CPONLY(CEF_ColorWebNativeControlButtonBorderPressed) \ + E_CPONLY(CEF_ColorWebNativeControlButtonFill) \ + E_CPONLY(CEF_ColorWebNativeControlButtonFillDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlButtonFillHovered) \ + E_CPONLY(CEF_ColorWebNativeControlButtonFillPressed) \ + E_CPONLY(CEF_ColorWebNativeControlFill) \ + E_CPONLY(CEF_ColorWebNativeControlFillDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlFillHovered) \ + E_CPONLY(CEF_ColorWebNativeControlFillPressed) \ + E_CPONLY(CEF_ColorWebNativeControlLightenLayer) \ + E_CPONLY(CEF_ColorWebNativeControlProgressValue) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarArrowBackgroundHovered) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarArrowBackgroundPressed) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarArrowForeground) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarArrowForegroundPressed) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarCorner) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarThumb) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarThumbHovered) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarThumbInactive) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarThumbOverlayMinimalMode) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarThumbPressed) \ + E_CPONLY(CEF_ColorWebNativeControlScrollbarTrack) \ + E_CPONLY(CEF_ColorWebNativeControlSlider) \ + E_CPONLY(CEF_ColorWebNativeControlSliderDisabled) \ + E_CPONLY(CEF_ColorWebNativeControlSliderHovered) \ + E_CPONLY(CEF_ColorWebNativeControlSliderPressed) \ + E_CPONLY(CEF_ColorWindowBackground) + +#if defined(OS_CHROMEOS_ASH) +#define CHROMEOS_ASH_COLOR_IDS \ + /* Colors for illustrations */ \ + E_CPONLY(CEF_ColorNativeColor1) \ + E_CPONLY(CEF_ColorNativeColor1Shade1) \ + E_CPONLY(CEF_ColorNativeColor1Shade2) \ + E_CPONLY(CEF_ColorNativeColor2) \ + E_CPONLY(CEF_ColorNativeColor3) \ + E_CPONLY(CEF_ColorNativeColor4) \ + E_CPONLY(CEF_ColorNativeColor5) \ + E_CPONLY(CEF_ColorNativeColor6) \ + E_CPONLY(CEF_ColorNativeBaseColor) \ + E_CPONLY(CEF_ColorNativeSecondaryColor) \ + E_CPONLY(CEF_ColorNativeOnPrimaryContainerColor) \ + E_CPONLY(CEF_ColorNativeAnalogColor) \ + E_CPONLY(CEF_ColorNativeMutedColor) \ + E_CPONLY(CEF_ColorNativeComplementColor) \ + E_CPONLY(CEF_ColorNativeOnGradientColor) +#elif defined(OS_CHROMEOS_LACROS) +#define CHROMEOS_ASH_COLOR_IDS +#endif +#if defined(OS_CHROMEOS) +#define PLATFORM_SPECIFIC_COLOR_IDS \ + CHROMEOS_ASH_COLOR_IDS \ + /* NOTE: Nearly all of the following CrOS color ids will need to be re- */ \ + /* evaluated once CrOS fully supports the color pipeline. */ \ + E_CPONLY(CEF_ColorAshActionLabelFocusRingEdit) \ + E_CPONLY(CEF_ColorAshActionLabelFocusRingError) \ + E_CPONLY(CEF_ColorAshActionLabelFocusRingHover) \ + \ + /* TODO(skau): Remove Compat value when dark/light mode launches. */ \ + E_CPONLY(CEF_ColorAshAppListFocusRingCompat) \ + E_CPONLY(CEF_ColorAshAppListFocusRingNoKeyboard) \ + E_CPONLY(CEF_ColorAshAppListSeparator) \ + E_CPONLY(CEF_ColorAshAppListSeparatorLight) \ + E_CPONLY(CEF_ColorAshArcInputMenuSeparator) \ + E_CPONLY(CEF_ColorAshFocusRing) \ + /* TODO(kylixrd): Determine whether this special color should follow */ \ + /* light/dark mode. Remove if it should equal CEF_ColorAshFocusRing. */ \ + E_CPONLY(CEF_ColorAshInputOverlayFocusRing) \ + E_CPONLY(CEF_ColorAshIconInOobe) \ + \ + /* TODO(crbug/1319917): Remove these when dark light mode is launched. */ \ + E_CPONLY(CEF_ColorAshLightFocusRing) \ + \ + E_CPONLY(CEF_ColorAshOnboardingFocusRing) \ + \ + E_CPONLY(CEF_ColorAshPrivacyIndicatorsBackground) \ + \ + E_CPONLY(CEF_ColorAshSystemUIMenuBackground) \ + E_CPONLY(CEF_ColorAshSystemUIMenuIcon) \ + E_CPONLY(CEF_ColorAshSystemUIMenuItemBackgroundSelected) \ + E_CPONLY(CEF_ColorAshSystemUIMenuSeparator) \ + \ + /* TODO(b/291622042): Delete these colors when Jelly is launched */ \ + E_CPONLY(CEF_ColorHighlightBorderBorder1) \ + E_CPONLY(CEF_ColorHighlightBorderBorder2) \ + E_CPONLY(CEF_ColorHighlightBorderBorder3) \ + E_CPONLY(CEF_ColorHighlightBorderHighlight1) \ + E_CPONLY(CEF_ColorHighlightBorderHighlight2) \ + E_CPONLY(CEF_ColorHighlightBorderHighlight3) \ + \ + E_CPONLY(CEF_ColorCrosSystemHighlight) \ + E_CPONLY(CEF_ColorCrosSystemHighlightBorder) \ + E_CPONLY(CEF_ColorCrosSystemHighlightBorder1) \ + \ + E_CPONLY(CEF_ColorCrosSysPositive) \ + E_CPONLY(CEF_ColorCrosSysComplementVariant) +#elif defined(OS_LINUX) +#define PLATFORM_SPECIFIC_COLOR_IDS \ + E_CPONLY(CEF_ColorNativeButtonBorder)\ + E_CPONLY(CEF_ColorNativeHeaderButtonBorderActive) \ + E_CPONLY(CEF_ColorNativeHeaderButtonBorderInactive) \ + E_CPONLY(CEF_ColorNativeHeaderSeparatorBorderActive) \ + E_CPONLY(CEF_ColorNativeHeaderSeparatorBorderInactive) \ + E_CPONLY(CEF_ColorNativeLabelForeground) \ + E_CPONLY(CEF_ColorNativeTabForegroundInactiveFrameActive) \ + E_CPONLY(CEF_ColorNativeTabForegroundInactiveFrameInactive) \ + E_CPONLY(CEF_ColorNativeTextfieldBorderUnfocused)\ + E_CPONLY(CEF_ColorNativeToolbarBackground) +#elif defined(OS_WIN) +#define PLATFORM_SPECIFIC_COLOR_IDS \ + E_CPONLY(CEF_ColorNative3dDkShadow) \ + E_CPONLY(CEF_ColorNative3dLight) \ + E_CPONLY(CEF_ColorNativeActiveBorder) \ + E_CPONLY(CEF_ColorNativeActiveCaption) \ + E_CPONLY(CEF_ColorNativeAppWorkspace) \ + E_CPONLY(CEF_ColorNativeBackground) \ + E_CPONLY(CEF_ColorNativeBtnFace) \ + E_CPONLY(CEF_ColorNativeBtnHighlight) \ + E_CPONLY(CEF_ColorNativeBtnShadow) \ + E_CPONLY(CEF_ColorNativeBtnText) \ + E_CPONLY(CEF_ColorNativeCaptionText) \ + E_CPONLY(CEF_ColorNativeGradientActiveCaption) \ + E_CPONLY(CEF_ColorNativeGradientInactiveCaption) \ + E_CPONLY(CEF_ColorNativeGrayText) \ + E_CPONLY(CEF_ColorNativeHighlight) \ + E_CPONLY(CEF_ColorNativeHighlightText) \ + E_CPONLY(CEF_ColorNativeHotlight) \ + E_CPONLY(CEF_ColorNativeInactiveBorder) \ + E_CPONLY(CEF_ColorNativeInactiveCaption) \ + E_CPONLY(CEF_ColorNativeInactiveCaptionText) \ + E_CPONLY(CEF_ColorNativeInfoBk) \ + E_CPONLY(CEF_ColorNativeInfoText) \ + E_CPONLY(CEF_ColorNativeMenu) \ + E_CPONLY(CEF_ColorNativeMenuBar) \ + E_CPONLY(CEF_ColorNativeMenuHilight) \ + E_CPONLY(CEF_ColorNativeMenuText) \ + E_CPONLY(CEF_ColorNativeScrollbar) \ + E_CPONLY(CEF_ColorNativeWindow) \ + E_CPONLY(CEF_ColorNativeWindowFrame) \ + E_CPONLY(CEF_ColorNativeWindowText) +#else +#define PLATFORM_SPECIFIC_COLOR_IDS +#endif + +#define COLOR_IDS \ + CROSS_PLATFORM_COLOR_IDS \ + PLATFORM_SPECIFIC_COLOR_IDS + +// --------------------------------------------------------------------------- +// From components/color/color_id.h: + +// Cross-platform IDs should be added here. +#define COMMON_COMPONENTS_COLOR_IDS \ + +#if !defined(OS_MAC) +#define COMPONENTS_COLOR_IDS COMMON_COMPONENTS_COLOR_IDS \ + /* Eyedropper colors. */ \ + E_CPONLY(CEF_ColorEyedropperBoundary) \ + E_CPONLY(CEF_ColorEyedropperCentralPixelInnerRing) \ + E_CPONLY(CEF_ColorEyedropperCentralPixelOuterRing) \ + E_CPONLY(CEF_ColorEyedropperGrid) \ + +#else +#define COMPONENTS_COLOR_IDS COMMON_COMPONENTS_COLOR_IDS +#endif + +// --------------------------------------------------------------------------- +// From chrome/browser/ui/color/chrome_color_id.h: + +#define COMMON_CHROME_COLOR_IDS \ + /* App menu colors. */ \ + /* The CEF_ColorAppMenuHighlightSeverityLow color id is used in */ \ + /* color_provider_css_colors_test.ts. If changing the variable name, the */ \ + /* variable name in the test needs to be changed as well. */ \ + E_CPONLY(CEF_ColorAppMenuHighlightSeverityLow, CEF_ChromeColorsStart, \ + CEF_ChromeColorsStart) \ + E_CPONLY(CEF_ColorAppMenuHighlightSeverityHigh) \ + E_CPONLY(CEF_ColorAppMenuHighlightSeverityMedium) \ + E_CPONLY(CEF_ColorAppMenuHighlightDefault) \ + E_CPONLY(CEF_ColorAppMenuHighlightPrimary) \ + E_CPONLY(CEF_ColorAppMenuExpandedForegroundDefault) \ + E_CPONLY(CEF_ColorAppMenuExpandedForegroundPrimary) \ + E_CPONLY(CEF_ColorAppMenuChipInkDropHover) \ + E_CPONLY(CEF_ColorAppMenuChipInkDropRipple) \ + /* Avatar colors. */ \ + /* TODO(crbug.com/40259490): Refactor the Avatar Button colors as Profile */ \ + /* Menu Button colors. */ \ + E_CPONLY(CEF_ColorAvatarButtonHighlightDefault) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightNormal) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightSyncError) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightSyncPaused) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightSigninPaused) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightExplicitText) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightIncognito) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightNormalForeground) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightDefaultForeground) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightSyncErrorForeground) \ + E_CPONLY(CEF_ColorAvatarButtonHighlightIncognitoForeground) \ + E_CPONLY(CEF_ColorAvatarButtonIncognitoHover) \ + E_CPONLY(CEF_ColorAvatarButtonNormalRipple) \ + E_CPONLY(CEF_ColorAvatarStrokeLight) \ + /* Bookmark bar colors. */ \ + E_CPONLY(CEF_ColorBookmarkBarBackground) \ + E_CPONLY(CEF_ColorBookmarkBarForeground) \ + E_CPONLY(CEF_ColorBookmarkBarForegroundDisabled) \ + E_CPONLY(CEF_ColorBookmarkBarSeparator) \ + E_CPONLY(CEF_ColorBookmarkBarSeparatorChromeRefresh) \ + E_CPONLY(CEF_ColorBookmarkButtonIcon) \ + E_CPONLY(CEF_ColorBookmarkDialogTrackPriceIcon) \ + E_CPONLY(CEF_ColorBookmarkDialogProductImageBorder) \ + E_CPONLY(CEF_ColorBookmarkDragImageBackground) \ + E_CPONLY(CEF_ColorBookmarkDragImageCountBackground) \ + E_CPONLY(CEF_ColorBookmarkDragImageCountForeground) \ + E_CPONLY(CEF_ColorBookmarkDragImageForeground) \ + E_CPONLY(CEF_ColorBookmarkDragImageIconBackground) \ + E_CPONLY(CEF_ColorBookmarkFavicon) \ + E_CPONLY(CEF_ColorBookmarkFolderIcon) \ + /* Window caption colors. */ \ + E_CPONLY(CEF_ColorCaptionButtonBackground) \ + /* Captured tab colors. */ \ + E_CPONLY(CEF_ColorCapturedTabContentsBorder) \ + /* Cast dialog colors. */ \ + E_CPONLY(CEF_ColorCastDialogHelpIcon) \ + /* Signin bubble colors. */ \ + E_CPONLY(CEF_ColorChromeSigninBubbleBackground) \ + E_CPONLY(CEF_ColorChromeSigninBubbleInfoBackground) \ + /* Compose colors */ \ + E_CPONLY(CEF_ColorComposeDialogBackground) \ + E_CPONLY(CEF_ColorComposeDialogDivider) \ + E_CPONLY(CEF_ColorComposeDialogError) \ + E_CPONLY(CEF_ColorComposeDialogForegroundSubtle) \ + E_CPONLY(CEF_ColorComposeDialogLink) \ + E_CPONLY(CEF_ColorComposeDialogLogo) \ + E_CPONLY(CEF_ColorComposeDialogResultBackground) \ + E_CPONLY(CEF_ColorComposeDialogResultForeground) \ + E_CPONLY(CEF_ColorComposeDialogResultForegroundWhileLoading) \ + E_CPONLY(CEF_ColorComposeDialogResultIcon) \ + E_CPONLY(CEF_ColorComposeDialogResultButtonsDivider) \ + E_CPONLY(CEF_ColorComposeDialogResultContainerScrollbarThumb) \ + E_CPONLY(CEF_ColorComposeDialogScrollbarThumb) \ + E_CPONLY(CEF_ColorComposeDialogTitle) \ + E_CPONLY(CEF_ColorComposeDialogTextarea) \ + E_CPONLY(CEF_ColorComposeDialogTextareaOutline) \ + E_CPONLY(CEF_ColorComposeDialogTextareaPlaceholder) \ + E_CPONLY(CEF_ColorComposeDialogTextareaReadonlyBackground) \ + E_CPONLY(CEF_ColorComposeDialogTextareaReadonlyForeground) \ + E_CPONLY(CEF_ColorComposeDialogTextareaIcon) \ + E_CPONLY(CEF_ColorComposeDialogSelectOptionDisabled) \ + /* Desktop media tab list colors. */ \ + E_CPONLY(CEF_ColorDesktopMediaTabListBorder) \ + E_CPONLY(CEF_ColorDesktopMediaTabListPreviewBackground) \ + /* Common Download colors. */ \ + E_CPONLY(CEF_ColorDownloadItemIconDangerous) \ + E_CPONLY(CEF_ColorDownloadItemTextDangerous) \ + E_CPONLY(CEF_ColorDownloadItemIconWarning) \ + E_CPONLY(CEF_ColorDownloadItemTextWarning) \ + /* Download bubble colors. */\ + E_CPONLY(CEF_ColorDownloadBubbleInfoBackground) \ + E_CPONLY(CEF_ColorDownloadBubbleInfoIcon) \ + E_CPONLY(CEF_ColorDownloadBubbleRowHover) \ + E_CPONLY(CEF_ColorDownloadBubbleShowAllDownloadsIcon) \ + E_CPONLY(CEF_ColorDownloadBubblePrimaryIcon) \ + /* Download shelf colors. */ \ + E_CPONLY(CEF_ColorDownloadItemForeground) \ + E_CPONLY(CEF_ColorDownloadItemForegroundDangerous) \ + E_CPONLY(CEF_ColorDownloadItemForegroundDisabled) \ + E_CPONLY(CEF_ColorDownloadItemForegroundSafe) \ + E_CPONLY(CEF_ColorDownloadItemProgressRingBackground) \ + E_CPONLY(CEF_ColorDownloadItemProgressRingForeground) \ + E_CPONLY(CEF_ColorDownloadShelfBackground) \ + E_CPONLY(CEF_ColorDownloadShelfButtonBackground) \ + E_CPONLY(CEF_ColorDownloadShelfButtonText) \ + E_CPONLY(CEF_ColorDownloadShelfButtonIcon) \ + E_CPONLY(CEF_ColorDownloadShelfButtonIconDisabled) \ + E_CPONLY(CEF_ColorDownloadShelfContentAreaSeparator) \ + E_CPONLY(CEF_ColorDownloadShelfForeground) \ + E_CPONLY(CEF_ColorDownloadStartedAnimationForeground) \ + E_CPONLY(CEF_ColorDownloadToolbarButtonActive) \ + E_CPONLY(CEF_ColorDownloadToolbarButtonAnimationBackground) \ + E_CPONLY(CEF_ColorDownloadToolbarButtonAnimationForeground) \ + E_CPONLY(CEF_ColorDownloadToolbarButtonInactive) \ + E_CPONLY(CEF_ColorDownloadToolbarButtonRingBackground) \ + /* Extension colors. */ \ + E_CPONLY(CEF_ColorExtensionDialogBackground) \ + E_CPONLY(CEF_ColorExtensionIconBadgeBackgroundDefault) \ + E_CPONLY(CEF_ColorExtensionIconDecorationAmbientShadow) \ + E_CPONLY(CEF_ColorExtensionIconDecorationBackground) \ + E_CPONLY(CEF_ColorExtensionIconDecorationKeyShadow) \ + E_CPONLY(CEF_ColorExtensionMenuIcon) \ + E_CPONLY(CEF_ColorExtensionMenuIconDisabled) \ + E_CPONLY(CEF_ColorExtensionMenuPinButtonIcon) \ + E_CPONLY(CEF_ColorExtensionMenuPinButtonIconDisabled) \ + E_CPONLY(CEF_ColorExtensionsMenuHighlightedBackground) \ + E_CPONLY(CEF_ColorExtensionsToolbarControlsBackground) \ + E_CPONLY(CEF_ColorExtensionsMenuText) \ + E_CPONLY(CEF_ColorExtensionsMenuSecondaryText) \ + /* Feature Promo bubble colors. */ \ + E_CPONLY(CEF_ColorFeaturePromoBubbleBackground) \ + E_CPONLY(CEF_ColorFeaturePromoBubbleButtonBorder) \ + E_CPONLY(CEF_ColorFeaturePromoBubbleCloseButtonInkDrop) \ + E_CPONLY(CEF_ColorFeaturePromoBubbleDefaultButtonBackground) \ + E_CPONLY(CEF_ColorFeaturePromoBubbleDefaultButtonForeground) \ + E_CPONLY(CEF_ColorFeaturePromoBubbleForeground) \ + E_CPONLY(CEF_ColorFeatureLensPromoBubbleBackground) \ + E_CPONLY(CEF_ColorFeatureLensPromoBubbleForeground) \ + /* Find bar colors. */ \ + E_CPONLY(CEF_ColorFindBarBackground) \ + E_CPONLY(CEF_ColorFindBarButtonIcon) \ + E_CPONLY(CEF_ColorFindBarButtonIconDisabled) \ + E_CPONLY(CEF_ColorFindBarForeground) \ + E_CPONLY(CEF_ColorFindBarMatchCount) \ + /* Flying Indicator colors. */ \ + E_CPONLY(CEF_ColorFlyingIndicatorBackground) \ + E_CPONLY(CEF_ColorFlyingIndicatorForeground) \ + /* Default accessibility focus highlight. */ \ + E_CPONLY(CEF_ColorFocusHighlightDefault) \ + /* Frame caption colors. */ \ + E_CPONLY(CEF_ColorFrameCaptionActive) \ + E_CPONLY(CEF_ColorFrameCaptionInactive) \ + /* InfoBar colors. */ \ + E_CPONLY(CEF_ColorInfoBarBackground) \ + E_CPONLY(CEF_ColorInfoBarButtonIcon) \ + E_CPONLY(CEF_ColorInfoBarButtonIconDisabled) \ + E_CPONLY(CEF_ColorInfoBarContentAreaSeparator) \ + E_CPONLY(CEF_ColorInfoBarForeground) \ + /* There is also a CEF_ColorInfoBarIcon in /ui/color/color_id.h */ \ + /* Intent Picker colors. */ \ + E_CPONLY(CEF_ColorIntentPickerItemBackgroundHovered) \ + E_CPONLY(CEF_ColorIntentPickerItemBackgroundSelected) \ + /* Location bar colors. */ \ + E_CPONLY(CEF_ColorLocationBarBackground) \ + E_CPONLY(CEF_ColorLocationBarBackgroundHovered) \ + E_CPONLY(CEF_ColorLocationBarBorder) \ + E_CPONLY(CEF_ColorLocationBarBorderOnMismatch) \ + E_CPONLY(CEF_ColorLocationBarBorderOpaque) \ + E_CPONLY(CEF_ColorLocationBarClearAllButtonIcon) \ + E_CPONLY(CEF_ColorLocationBarClearAllButtonIconDisabled) \ + /* Media router colors. */ \ + E_CPONLY(CEF_ColorMediaRouterIconActive) \ + E_CPONLY(CEF_ColorMediaRouterIconWarning) \ + /* New tab button colors. */ \ + E_CPONLY(CEF_ColorNewTabButtonForegroundFrameActive) \ + E_CPONLY(CEF_ColorNewTabButtonForegroundFrameInactive) \ + E_CPONLY(CEF_ColorNewTabButtonBackgroundFrameActive) \ + E_CPONLY(CEF_ColorNewTabButtonBackgroundFrameInactive) \ + E_CPONLY(CEF_ColorNewTabButtonFocusRing) \ + E_CPONLY(CEF_ColorNewTabButtonInkDropFrameActive) \ + E_CPONLY(CEF_ColorNewTabButtonInkDropFrameInactive) \ + E_CPONLY(CEF_ColorTabStripControlButtonInkDrop) \ + E_CPONLY(CEF_ColorTabStripControlButtonInkDropRipple) \ + /* New tab button colors for ChromeRefresh.*/ \ + /* TODO (crbug.com/1399942) remove when theming works */ \ + E_CPONLY(CEF_ColorNewTabButtonCRForegroundFrameActive) \ + E_CPONLY(CEF_ColorNewTabButtonCRForegroundFrameInactive) \ + E_CPONLY(CEF_ColorNewTabButtonCRBackgroundFrameActive) \ + E_CPONLY(CEF_ColorNewTabButtonCRBackgroundFrameInactive) \ + /* New Tab Page colors. */ \ + E_CPONLY(CEF_ColorNewTabPageActionButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageActionButtonBorder) \ + E_CPONLY(CEF_ColorNewTabPageActionButtonBorderHovered) \ + E_CPONLY(CEF_ColorNewTabPageActionButtonForeground) \ + E_CPONLY(CEF_ColorNewTabPageActiveBackground) \ + E_CPONLY(CEF_ColorNewTabPageAddShortcutBackground) \ + E_CPONLY(CEF_ColorNewTabPageAddShortcutForeground) \ + E_CPONLY(CEF_ColorNewTabPageAttributionForeground) \ + E_CPONLY(CEF_ColorNewTabPageBackground) \ + E_CPONLY(CEF_ColorNewTabPageBackgroundOverride) \ + E_CPONLY(CEF_ColorNewTabPageBorder) \ + E_CPONLY(CEF_ColorNewTabPageButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageButtonBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageButtonForeground) \ + E_CPONLY(CEF_ColorNewTabPageCartModuleDiscountChipBackground) \ + E_CPONLY(CEF_ColorNewTabPageCartModuleDiscountChipForeground) \ + E_CPONLY(CEF_ColorNewTabPageChipBackground) \ + E_CPONLY(CEF_ColorNewTabPageChipForeground) \ + E_CPONLY(CEF_ColorNewTabPageControlBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageControlBackgroundSelected) \ + E_CPONLY(CEF_ColorNewTabPageDialogBackground) \ + E_CPONLY(CEF_ColorNewTabPageDialogBackgroundActive) \ + E_CPONLY(CEF_ColorNewTabPageDialogBorder) \ + E_CPONLY(CEF_ColorNewTabPageDialogBorderSelected) \ + E_CPONLY(CEF_ColorNewTabPageDialogControlBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageDialogForeground) \ + E_CPONLY(CEF_ColorNewTabPageDialogSecondaryForeground) \ + E_CPONLY(CEF_ColorNewTabPageFirstRunBackground) \ + E_CPONLY(CEF_ColorNewTabPageFocusRing) \ + E_CPONLY(CEF_ColorNewTabPageHeader) \ + E_CPONLY(CEF_ColorNewTabPageHistoryClustersModuleItemBackground) \ + E_CPONLY(CEF_ColorNewTabPagePromoBackground) \ + E_CPONLY(CEF_ColorNewTabPagePromoImageBackground) \ + E_CPONLY(CEF_ColorNewTabPageIconButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageIconButtonBackgroundActive) \ + E_CPONLY(CEF_ColorNewTabPageLink) \ + E_CPONLY(CEF_ColorNewTabPageLogo) \ + E_CPONLY(CEF_ColorNewTabPageLogoUnthemedDark) \ + E_CPONLY(CEF_ColorNewTabPageLogoUnthemedLight) \ + E_CPONLY(CEF_ColorNewTabPageMenuInnerShadow) \ + E_CPONLY(CEF_ColorNewTabPageMenuOuterShadow) \ + E_CPONLY(CEF_ColorNewTabPageMicBorderColor) \ + E_CPONLY(CEF_ColorNewTabPageMicIconColor) \ + E_CPONLY(CEF_ColorNewTabPageModuleControlBorder) \ + E_CPONLY(CEF_ColorNewTabPageModuleContextMenuDivider) \ + E_CPONLY(CEF_ColorNewTabPageModuleBackground) \ + E_CPONLY(CEF_ColorNewTabPageModuleIconBackground) \ + E_CPONLY(CEF_ColorNewTabPageModuleElementDivider) \ + E_CPONLY(CEF_ColorNewTabPageModuleIconContainerBackground) \ + E_CPONLY(CEF_ColorNewTabPageModuleItemBackground) \ + E_CPONLY(CEF_ColorNewTabPageModuleItemBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageModuleScrollButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageModuleScrollButtonBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageMostVisitedForeground) \ + E_CPONLY(CEF_ColorNewTabPageMostVisitedTileBackground) \ + E_CPONLY(CEF_ColorNewTabPageMostVisitedTileBackgroundThemed) \ + E_CPONLY(CEF_ColorNewTabPageMostVisitedTileBackgroundUnthemed) \ + E_CPONLY(CEF_ColorNewTabPageOnThemeForeground) \ + E_CPONLY(CEF_ColorNewTabPageOverlayBackground) \ + E_CPONLY(CEF_ColorNewTabPageOverlayForeground) \ + E_CPONLY(CEF_ColorNewTabPageOverlaySecondaryForeground) \ + E_CPONLY(CEF_ColorNewTabPagePrimaryForeground) \ + E_CPONLY(CEF_ColorNewTabPageSearchBoxBackground) \ + E_CPONLY(CEF_ColorNewTabPageSearchBoxBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageSearchBoxResultsTextDimmedSelected) \ + E_CPONLY(CEF_ColorNewTabPageSecondaryForeground) \ + E_CPONLY(CEF_ColorNewTabPageSectionBorder) \ + E_CPONLY(CEF_ColorNewTabPageSelectedBackground) \ + E_CPONLY(CEF_ColorNewTabPageSelectedBorder) \ + E_CPONLY(CEF_ColorNewTabPageSelectedForeground) \ + E_CPONLY(CEF_ColorNewTabPageTagBackground) \ + E_CPONLY(CEF_ColorNewTabPageText) \ + E_CPONLY(CEF_ColorNewTabPageTextUnthemed) \ + E_CPONLY(CEF_ColorNewTabPageTextLight) \ + E_CPONLY(CEF_ColorNewTabPageWallpaperSearchButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageWallpaperSearchButtonBackgroundHovered) \ + E_CPONLY(CEF_ColorNewTabPageWallpaperSearchButtonForeground) \ + /* New Tab Page Colors for Doodle Share Button. */ \ + E_CPONLY(CEF_ColorNewTabPageDoodleShareButtonBackground) \ + E_CPONLY(CEF_ColorNewTabPageDoodleShareButtonIcon) \ + /* Omnibox colors. */ \ + E_CPONLY(CEF_ColorOmniboxAnswerIconBackground) \ + E_CPONLY(CEF_ColorOmniboxAnswerIconForeground) \ + E_CPONLY(CEF_ColorOmniboxAnswerIconGM3Background) \ + E_CPONLY(CEF_ColorOmniboxAnswerIconGM3Foreground) \ + E_CPONLY(CEF_ColorOmniboxBubbleOutline) \ + E_CPONLY(CEF_ColorOmniboxBubbleOutlineExperimentalKeywordMode) \ + E_CPONLY(CEF_ColorOmniboxChipInUseActivityIndicatorBackground) \ + E_CPONLY(CEF_ColorOmniboxChipInUseActivityIndicatorForeground) \ + E_CPONLY(CEF_ColorOmniboxChipBackground) \ + E_CPONLY(CEF_ColorOmniboxChipBlockedActivityIndicatorBackground) \ + E_CPONLY(CEF_ColorOmniboxChipBlockedActivityIndicatorForeground) \ + E_CPONLY(CEF_ColorOmniboxChipForegroundLowVisibility) \ + E_CPONLY(CEF_ColorOmniboxChipForegroundNormalVisibility) \ + E_CPONLY(CEF_ColorOmniboxChipInkDropHover) \ + E_CPONLY(CEF_ColorOmniboxChipInkDropRipple) \ + E_CPONLY(CEF_ColorOmniboxChipOnSystemBlockedActivityIndicatorBackground) \ + E_CPONLY(CEF_ColorOmniboxChipOnSystemBlockedActivityIndicatorForeground) \ + E_CPONLY(CEF_ColorOmniboxIntentChipBackground) \ + E_CPONLY(CEF_ColorOmniboxIntentChipIcon) \ + E_CPONLY(CEF_ColorOmniboxKeywordSelected) \ + E_CPONLY(CEF_ColorOmniboxKeywordSeparator) \ + E_CPONLY(CEF_ColorOmniboxResultsBackground) \ + E_CPONLY(CEF_ColorOmniboxResultsBackgroundHovered) \ + E_CPONLY(CEF_ColorOmniboxResultsBackgroundSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsBackgroundIPH) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonBorder) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonIcon) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonIconSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDrop) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDropRowHovered) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDropRowSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDropSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDropSelectedRowHovered) \ + E_CPONLY(CEF_ColorOmniboxResultsButtonInkDropSelectedRowSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsFocusIndicator) \ + E_CPONLY(CEF_ColorOmniboxResultsIcon) \ + E_CPONLY(CEF_ColorOmniboxResultsIconGM3Background) \ + E_CPONLY(CEF_ColorOmniboxResultsIconSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsStarterPackIcon) \ + E_CPONLY(CEF_ColorOmniboxResultsTextDimmed) \ + E_CPONLY(CEF_ColorOmniboxResultsTextDimmedSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsTextNegative) \ + E_CPONLY(CEF_ColorOmniboxResultsTextNegativeSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsTextPositive) \ + E_CPONLY(CEF_ColorOmniboxResultsTextPositiveSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsTextSecondary) \ + E_CPONLY(CEF_ColorOmniboxResultsTextSecondarySelected) \ + E_CPONLY(CEF_ColorOmniboxResultsTextSelected) \ + E_CPONLY(CEF_ColorOmniboxResultsUrl) \ + E_CPONLY(CEF_ColorOmniboxResultsUrlSelected) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipDangerous) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipDangerousBackground) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipDefault) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipInkDropHover) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipInkDropRipple) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipSecure) \ + E_CPONLY(CEF_ColorOmniboxSecurityChipText) \ + E_CPONLY(CEF_ColorOmniboxSelectionBackground) \ + E_CPONLY(CEF_ColorOmniboxSelectionForeground) \ + E_CPONLY(CEF_ColorOmniboxText) \ + E_CPONLY(CEF_ColorOmniboxTextDimmed) \ + /* Page Info colors */ \ + E_CPONLY(CEF_ColorPageActionIcon) \ + E_CPONLY(CEF_ColorPageActionIconHover) \ + E_CPONLY(CEF_ColorPageInfoBackground) \ + E_CPONLY(CEF_ColorPageInfoBackgroundTonal) \ + E_CPONLY(CEF_ColorPageInfoChosenObjectDeleteButtonIcon) \ + E_CPONLY(CEF_ColorPageInfoChosenObjectDeleteButtonIconDisabled) \ + E_CPONLY(CEF_ColorPageInfoIconHover) \ + E_CPONLY(CEF_ColorPageInfoIconPressed) \ + E_CPONLY(CEF_ColorPageInfoLensOverlayBackground) \ + E_CPONLY(CEF_ColorPageInfoLensOverlayForeground) \ + E_CPONLY(CEF_ColorPageInfoPermissionBlockedOnSystemLevelDisabled) \ + E_CPONLY(CEF_ColorPageInfoPermissionForeground) \ + E_CPONLY(CEF_ColorPageInfoPermissionUsedIcon) \ + /* Payments colors. */ \ + E_CPONLY(CEF_ColorPaymentsFeedbackTipBackground) \ + E_CPONLY(CEF_ColorPaymentsFeedbackTipBorder) \ + E_CPONLY(CEF_ColorPaymentsFeedbackTipForeground) \ + E_CPONLY(CEF_ColorPaymentsFeedbackTipIcon) \ + E_CPONLY(CEF_ColorPaymentsGooglePayLogo) \ + E_CPONLY(CEF_ColorPaymentsPromoCodeBackground) \ + E_CPONLY(CEF_ColorPaymentsPromoCodeForeground) \ + E_CPONLY(CEF_ColorPaymentsPromoCodeForegroundHovered) \ + E_CPONLY(CEF_ColorPaymentsPromoCodeForegroundPressed) \ + E_CPONLY(CEF_ColorPaymentsPromoCodeInkDrop) \ + E_CPONLY(CEF_ColorPaymentsRequestBackArrowButtonIcon) \ + E_CPONLY(CEF_ColorPaymentsRequestBackArrowButtonIconDisabled) \ + E_CPONLY(CEF_ColorPaymentsRequestRowBackgroundHighlighted) \ + /* Permission Prompt colors. */ \ + E_CPONLY(CEF_ColorPermissionPromptRequestText) \ + /* Picture-in-Picture window colors. */ \ + E_CPONLY(CEF_ColorPipWindowBackToTabButtonBackground) \ + E_CPONLY(CEF_ColorPipWindowBackground) \ + E_CPONLY(CEF_ColorPipWindowControlsBackground) \ + E_CPONLY(CEF_ColorPipWindowTopBarBackground) \ + E_CPONLY(CEF_ColorPipWindowForeground) \ + E_CPONLY(CEF_ColorPipWindowForegroundInactive) \ + E_CPONLY(CEF_ColorPipWindowHangUpButtonForeground) \ + E_CPONLY(CEF_ColorPipWindowSkipAdButtonBackground) \ + E_CPONLY(CEF_ColorPipWindowSkipAdButtonBorder) \ + /* Product Specifications colors */ \ + E_CPONLY(CEF_ColorProductSpecificationsButtonBackground) \ + E_CPONLY(CEF_ColorProductSpecificationsTonalButtonBackground) \ + E_CPONLY(CEF_ColorProductSpecificationsContentBackground) \ + E_CPONLY(CEF_ColorProductSpecificationsDivider) \ + E_CPONLY(CEF_ColorProductSpecificationsPageBackground) \ + E_CPONLY(CEF_ColorProductSpecificationsPrimaryTitle) \ + E_CPONLY(CEF_ColorProductSpecificationsSecondaryTitle) \ + E_CPONLY(CEF_ColorProductSpecificationsSummaryBackground) \ + /* Profile Menu colors. */ \ + E_CPONLY(CEF_ColorProfileMenuBackground) \ + E_CPONLY(CEF_ColorProfileMenuHeaderBackground) \ + E_CPONLY(CEF_ColorProfileMenuHeaderLabel) \ + E_CPONLY(CEF_ColorProfileMenuIconButton) \ + E_CPONLY(CEF_ColorProfileMenuIconButtonBackground) \ + E_CPONLY(CEF_ColorProfileMenuIconButtonBackgroundHovered) \ + E_CPONLY(CEF_ColorProfileMenuSyncErrorIcon) \ + E_CPONLY(CEF_ColorProfileMenuSyncIcon) \ + E_CPONLY(CEF_ColorProfileMenuSyncInfoBackground) \ + E_CPONLY(CEF_ColorProfileMenuSyncOffIcon) \ + E_CPONLY(CEF_ColorProfileMenuSyncPausedIcon) \ + /* Profiles colors. */ \ + E_CPONLY(CEF_ColorProfilesReauthDialogBorder) \ + /* PWA colors. */ \ + E_CPONLY(CEF_ColorPwaBackground) \ + E_CPONLY(CEF_ColorPwaMenuButtonIcon) \ + E_CPONLY(CEF_ColorPwaSecurityChipForeground) \ + E_CPONLY(CEF_ColorPwaSecurityChipForegroundDangerous) \ + E_CPONLY(CEF_ColorPwaSecurityChipForegroundPolicyCert) \ + E_CPONLY(CEF_ColorPwaSecurityChipForegroundSecure) \ + E_CPONLY(CEF_ColorPwaTabBarBottomSeparator) \ + E_CPONLY(CEF_ColorPwaTabBarTopSeparator) \ + E_CPONLY(CEF_ColorPwaTheme) \ + E_CPONLY(CEF_ColorPwaToolbarBackground) \ + E_CPONLY(CEF_ColorPwaToolbarButtonIcon) \ + E_CPONLY(CEF_ColorPwaToolbarButtonIconDisabled) \ + /* QR code colors. */ \ + E_CPONLY(CEF_ColorQrCodeBackground) \ + E_CPONLY(CEF_ColorQrCodeBorder) \ + /* Quick Answers colors. */ \ + E_CPONLY(CEF_ColorQuickAnswersReportQueryButtonBackground) \ + E_CPONLY(CEF_ColorQuickAnswersReportQueryButtonForeground) \ + /* Read Anything colors. */ \ + E_CPONLY(CEF_ColorReadAnythingBackground) \ + E_CPONLY(CEF_ColorReadAnythingBackgroundBlue) \ + E_CPONLY(CEF_ColorReadAnythingBackgroundDark) \ + E_CPONLY(CEF_ColorReadAnythingBackgroundLight) \ + E_CPONLY(CEF_ColorReadAnythingBackgroundYellow) \ + E_CPONLY(CEF_ColorReadAnythingCurrentReadAloudHighlight) \ + E_CPONLY(CEF_ColorReadAnythingCurrentReadAloudHighlightBlue) \ + E_CPONLY(CEF_ColorReadAnythingCurrentReadAloudHighlightDark) \ + E_CPONLY(CEF_ColorReadAnythingCurrentReadAloudHighlightLight) \ + E_CPONLY(CEF_ColorReadAnythingCurrentReadAloudHighlightYellow) \ + E_CPONLY(CEF_ColorReadAnythingFocusRingBackground) \ + E_CPONLY(CEF_ColorReadAnythingFocusRingBackgroundBlue) \ + E_CPONLY(CEF_ColorReadAnythingFocusRingBackgroundDark) \ + E_CPONLY(CEF_ColorReadAnythingFocusRingBackgroundLight) \ + E_CPONLY(CEF_ColorReadAnythingFocusRingBackgroundYellow) \ + E_CPONLY(CEF_ColorReadAnythingForeground) \ + E_CPONLY(CEF_ColorReadAnythingForegroundBlue) \ + E_CPONLY(CEF_ColorReadAnythingForegroundDark) \ + E_CPONLY(CEF_ColorReadAnythingForegroundLight) \ + E_CPONLY(CEF_ColorReadAnythingForegroundYellow) \ + E_CPONLY(CEF_ColorReadAnythingSeparator) \ + E_CPONLY(CEF_ColorReadAnythingSeparatorBlue) \ + E_CPONLY(CEF_ColorReadAnythingSeparatorDark) \ + E_CPONLY(CEF_ColorReadAnythingSeparatorLight) \ + E_CPONLY(CEF_ColorReadAnythingSeparatorYellow) \ + E_CPONLY(CEF_ColorReadAnythingDropdownBackground) \ + E_CPONLY(CEF_ColorReadAnythingDropdownBackgroundBlue) \ + E_CPONLY(CEF_ColorReadAnythingDropdownBackgroundDark) \ + E_CPONLY(CEF_ColorReadAnythingDropdownBackgroundLight) \ + E_CPONLY(CEF_ColorReadAnythingDropdownBackgroundYellow) \ + E_CPONLY(CEF_ColorReadAnythingDropdownSelected) \ + E_CPONLY(CEF_ColorReadAnythingDropdownSelectedBlue) \ + E_CPONLY(CEF_ColorReadAnythingDropdownSelectedDark) \ + E_CPONLY(CEF_ColorReadAnythingDropdownSelectedLight) \ + E_CPONLY(CEF_ColorReadAnythingDropdownSelectedYellow) \ + E_CPONLY(CEF_ColorReadAnythingTextSelection) \ + E_CPONLY(CEF_ColorReadAnythingTextSelectionBlue) \ + E_CPONLY(CEF_ColorReadAnythingTextSelectionDark) \ + E_CPONLY(CEF_ColorReadAnythingTextSelectionLight) \ + E_CPONLY(CEF_ColorReadAnythingTextSelectionYellow) \ + E_CPONLY(CEF_ColorReadAnythingLinkDefault) \ + E_CPONLY(CEF_ColorReadAnythingLinkDefaultBlue) \ + E_CPONLY(CEF_ColorReadAnythingLinkDefaultDark) \ + E_CPONLY(CEF_ColorReadAnythingLinkDefaultLight) \ + E_CPONLY(CEF_ColorReadAnythingLinkDefaultYellow) \ + E_CPONLY(CEF_ColorReadAnythingLinkVisited) \ + E_CPONLY(CEF_ColorReadAnythingLinkVisitedBlue) \ + E_CPONLY(CEF_ColorReadAnythingLinkVisitedDark) \ + E_CPONLY(CEF_ColorReadAnythingLinkVisitedLight) \ + E_CPONLY(CEF_ColorReadAnythingLinkVisitedYellow) \ + E_CPONLY(CEF_ColorReadAnythingPreviousReadAloudHighlight) \ + E_CPONLY(CEF_ColorReadAnythingPreviousReadAloudHighlightBlue) \ + E_CPONLY(CEF_ColorReadAnythingPreviousReadAloudHighlightDark) \ + E_CPONLY(CEF_ColorReadAnythingPreviousReadAloudHighlightLight) \ + E_CPONLY(CEF_ColorReadAnythingPreviousReadAloudHighlightYellow) \ + /* Realbox colors. */ \ + E_CPONLY(CEF_ColorRealboxAnswerIconBackground) \ + E_CPONLY(CEF_ColorRealboxAnswerIconForeground) \ + E_CPONLY(CEF_ColorRealboxBackground) \ + E_CPONLY(CEF_ColorRealboxBackgroundHovered) \ + E_CPONLY(CEF_ColorRealboxBorder) \ + E_CPONLY(CEF_ColorRealboxForeground) \ + E_CPONLY(CEF_ColorRealboxLensVoiceIconBackground) \ + E_CPONLY(CEF_ColorRealboxPlaceholder) \ + E_CPONLY(CEF_ColorRealboxResultsActionChip) \ + E_CPONLY(CEF_ColorRealboxResultsActionChipIcon) \ + E_CPONLY(CEF_ColorRealboxResultsActionChipFocusOutline) \ + E_CPONLY(CEF_ColorRealboxResultsBackground) \ + E_CPONLY(CEF_ColorRealboxResultsBackgroundHovered) \ + E_CPONLY(CEF_ColorRealboxResultsButtonHover) \ + E_CPONLY(CEF_ColorRealboxResultsDimSelected) \ + E_CPONLY(CEF_ColorRealboxResultsFocusIndicator) \ + E_CPONLY(CEF_ColorRealboxResultsForeground) \ + E_CPONLY(CEF_ColorRealboxResultsForegroundDimmed) \ + E_CPONLY(CEF_ColorRealboxResultsIcon) \ + E_CPONLY(CEF_ColorRealboxResultsIconFocusedOutline) \ + E_CPONLY(CEF_ColorRealboxResultsIconSelected) \ + E_CPONLY(CEF_ColorRealboxResultsUrl) \ + E_CPONLY(CEF_ColorRealboxResultsUrlSelected) \ + E_CPONLY(CEF_ColorRealboxSearchIconBackground) \ + E_CPONLY(CEF_ColorRealboxSelectionBackground) \ + E_CPONLY(CEF_ColorRealboxSelectionForeground) \ + E_CPONLY(CEF_ColorRealboxShadow) \ + /* The colors used for saved tab group chips on the bookmark bar. */ \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundGrey) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundBlue) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundRed) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundYellow) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundGreen) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundPink) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundPurple) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundCyan) \ + E_CPONLY(CEF_ColorSavedTabGroupForegroundOrange) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineGrey) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineBlue) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineRed) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineYellow) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineGreen) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlinePink) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlinePurple) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineCyan) \ + E_CPONLY(CEF_ColorSavedTabGroupOutlineOrange) \ + /* Screenshot captured bubble colors. */ \ + E_CPONLY(CEF_ColorScreenshotCapturedImageBackground) \ + E_CPONLY(CEF_ColorScreenshotCapturedImageBorder) \ + /* Share-this-tab dialog colors. */ \ + E_CPONLY(CEF_ColorShareThisTabAudioToggleBackground) \ + E_CPONLY(CEF_ColorShareThisTabSourceViewBorder) \ + /* Experimentation */ \ + E_CPONLY(CEF_ColorShoppingPageActionIconBackgroundVariant) \ + E_CPONLY(CEF_ColorShoppingPageActionIconForegroundVariant) \ + /* Side panel colors. */ \ + E_CPONLY(CEF_ColorSidePanelBackground) \ + E_CPONLY(CEF_ColorSidePanelBadgeBackground) \ + E_CPONLY(CEF_ColorSidePanelBadgeBackgroundUpdated) \ + E_CPONLY(CEF_ColorSidePanelBadgeForeground) \ + E_CPONLY(CEF_ColorSidePanelBadgeForegroundUpdated) \ + E_CPONLY(CEF_ColorSidePanelBookmarksSelectedFolderBackground) \ + E_CPONLY(CEF_ColorSidePanelBookmarksSelectedFolderForeground) \ + E_CPONLY(CEF_ColorSidePanelBookmarksSelectedFolderIcon) \ + E_CPONLY(CEF_ColorSidePanelCardBackground) \ + E_CPONLY(CEF_ColorSidePanelCardPrimaryForeground) \ + E_CPONLY(CEF_ColorSidePanelCardSecondaryForeground) \ + E_CPONLY(CEF_ColorSidePanelCommerceGraphAxis) \ + E_CPONLY(CEF_ColorSidePanelCommerceGraphBubbleBackground) \ + E_CPONLY(CEF_ColorSidePanelCommerceGraphLine) \ + E_CPONLY(CEF_ColorSidePanelContentAreaSeparator) \ + E_CPONLY(CEF_ColorSidePanelContentBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeClassicChromeTileBorder) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeCornerNtpBorder) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeCustomOptionBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeCustomOptionForeground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpActiveTab) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpArrowsAndRefreshButton) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpBorder) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpCaron) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpCaronContainer) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpChromeLogo) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpOmnibox) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeMiniNtpTabStripBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeThemeBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeThemeCheckmarkBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeThemeCheckmarkForeground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeThemeSnapshotBackground) \ + E_CPONLY(CEF_ColorSidePanelCustomizeChromeWebStoreBorder) \ + E_CPONLY(CEF_ColorSidePanelDialogBackground) \ + E_CPONLY(CEF_ColorSidePanelDialogDivider) \ + E_CPONLY(CEF_ColorSidePanelDialogPrimaryForeground) \ + E_CPONLY(CEF_ColorSidePanelDialogSecondaryForeground) \ + E_CPONLY(CEF_ColorSidePanelDivider) \ + E_CPONLY(CEF_ColorSidePanelEditFooterBorder) \ + E_CPONLY(CEF_ColorSidePanelComboboxEntryIcon) \ + E_CPONLY(CEF_ColorSidePanelComboboxEntryTitle) \ + E_CPONLY(CEF_ColorSidePanelEntryIcon) \ + E_CPONLY(CEF_ColorSidePanelEntryDropdownIcon) \ + E_CPONLY(CEF_ColorSidePanelEntryTitle) \ + E_CPONLY(CEF_ColorSidePanelFilterChipBorder) \ + E_CPONLY(CEF_ColorSidePanelFilterChipForeground) \ + E_CPONLY(CEF_ColorSidePanelFilterChipForegroundSelected) \ + E_CPONLY(CEF_ColorSidePanelFilterChipIcon) \ + E_CPONLY(CEF_ColorSidePanelFilterChipIconSelected) \ + E_CPONLY(CEF_ColorSidePanelFilterChipBackgroundHover) \ + E_CPONLY(CEF_ColorSidePanelFilterChipBackgroundSelected) \ + E_CPONLY(CEF_ColorSidePanelHeaderButtonIcon) \ + E_CPONLY(CEF_ColorSidePanelHeaderButtonIconDisabled) \ + E_CPONLY(CEF_ColorSidePanelHoverResizeAreaHandle) \ + E_CPONLY(CEF_ColorSidePanelResizeAreaHandle) \ + E_CPONLY(CEF_ColorSidePanelScrollbarThumb) \ + E_CPONLY(CEF_ColorSidePanelTextfieldBorder) \ + E_CPONLY(CEF_ColorSidePanelWallpaperSearchTileBackground) \ + E_CPONLY(CEF_ColorSidePanelWallpaperSearchErrorButtonBackground) \ + E_CPONLY(CEF_ColorSidePanelWallpaperSearchErrorButtonText) \ + E_CPONLY(CEF_ColorSidePanelWallpaperSearchInspirationDescriptors) \ + /* Status bubble colors. */ \ + E_CPONLY(CEF_ColorStatusBubbleBackgroundFrameActive) \ + E_CPONLY(CEF_ColorStatusBubbleBackgroundFrameInactive) \ + E_CPONLY(CEF_ColorStatusBubbleForegroundFrameActive) \ + E_CPONLY(CEF_ColorStatusBubbleForegroundFrameInactive) \ + E_CPONLY(CEF_ColorStatusBubbleShadow) \ + /* Tab alert colors in tab strip. */ \ + E_CPONLY(CEF_ColorTabAlertAudioPlayingActiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertAudioPlayingActiveFrameInactive) \ + E_CPONLY(CEF_ColorTabAlertAudioPlayingInactiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertAudioPlayingInactiveFrameInactive) \ + E_CPONLY(CEF_ColorTabAlertMediaRecordingActiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertMediaRecordingActiveFrameInactive) \ + E_CPONLY(CEF_ColorTabAlertMediaRecordingInactiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertMediaRecordingInactiveFrameInactive) \ + E_CPONLY(CEF_ColorTabAlertPipPlayingActiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertPipPlayingActiveFrameInactive) \ + E_CPONLY(CEF_ColorTabAlertPipPlayingInactiveFrameActive) \ + E_CPONLY(CEF_ColorTabAlertPipPlayingInactiveFrameInactive) \ + /* Tab alert colors in hover cards */ \ + E_CPONLY(CEF_ColorHoverCardTabAlertMediaRecordingIcon) \ + E_CPONLY(CEF_ColorHoverCardTabAlertPipPlayingIcon) \ + E_CPONLY(CEF_ColorHoverCardTabAlertAudioPlayingIcon) \ + /* Tab colors. */ \ + E_CPONLY(CEF_ColorTabBackgroundActiveFrameActive) \ + E_CPONLY(CEF_ColorTabBackgroundActiveFrameInactive) \ + E_CPONLY(CEF_ColorTabBackgroundInactiveFrameActive) \ + E_CPONLY(CEF_ColorTabBackgroundInactiveFrameInactive) \ + E_CPONLY(CEF_ColorTabBackgroundInactiveHoverFrameActive) \ + E_CPONLY(CEF_ColorTabBackgroundInactiveHoverFrameInactive) \ + E_CPONLY(CEF_ColorTabBackgroundSelectedFrameActive) \ + E_CPONLY(CEF_ColorTabBackgroundSelectedFrameInactive) \ + E_CPONLY(CEF_ColorTabBackgroundSelectedHoverFrameActive) \ + E_CPONLY(CEF_ColorTabBackgroundSelectedHoverFrameInactive) \ + E_CPONLY(CEF_ColorTabCloseButtonFocusRingActive) \ + E_CPONLY(CEF_ColorTabCloseButtonFocusRingInactive) \ + E_CPONLY(CEF_ColorTabDiscardRingFrameActive) \ + E_CPONLY(CEF_ColorTabDiscardRingFrameInactive) \ + E_CPONLY(CEF_ColorTabFocusRingActive) \ + E_CPONLY(CEF_ColorTabFocusRingInactive) \ + E_CPONLY(CEF_ColorTabForegroundActiveFrameActive) \ + E_CPONLY(CEF_ColorTabForegroundActiveFrameInactive) \ + E_CPONLY(CEF_ColorTabForegroundInactiveFrameActive) \ + E_CPONLY(CEF_ColorTabForegroundInactiveFrameInactive) \ + E_CPONLY(CEF_ColorTabDividerFrameActive) \ + E_CPONLY(CEF_ColorTabDividerFrameInactive) \ + E_CPONLY(CEF_ColorTabHoverCardBackground) \ + E_CPONLY(CEF_ColorTabHoverCardForeground) \ + E_CPONLY(CEF_ColorTabHoverCardSecondaryText) \ + /* Tab group bookmark bar colors. */ \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarGrey) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarBlue) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarRed) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarYellow) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarGreen) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarPink) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarPurple) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarCyan) \ + E_CPONLY(CEF_ColorTabGroupBookmarkBarOrange) \ + /* The colors used for tab groups in the context submenu. */ \ + E_CPONLY(CEF_ColorTabGroupContextMenuBlue) \ + E_CPONLY(CEF_ColorTabGroupContextMenuCyan) \ + E_CPONLY(CEF_ColorTabGroupContextMenuGreen) \ + E_CPONLY(CEF_ColorTabGroupContextMenuGrey) \ + E_CPONLY(CEF_ColorTabGroupContextMenuOrange) \ + E_CPONLY(CEF_ColorTabGroupContextMenuPink) \ + E_CPONLY(CEF_ColorTabGroupContextMenuPurple) \ + E_CPONLY(CEF_ColorTabGroupContextMenuRed) \ + E_CPONLY(CEF_ColorTabGroupContextMenuYellow) \ + /* The colors used for tab groups in the bubble dialog view. */ \ + E_CPONLY(CEF_ColorTabGroupDialogGrey) \ + E_CPONLY(CEF_ColorTabGroupDialogBlue) \ + E_CPONLY(CEF_ColorTabGroupDialogRed) \ + E_CPONLY(CEF_ColorTabGroupDialogYellow) \ + E_CPONLY(CEF_ColorTabGroupDialogGreen) \ + E_CPONLY(CEF_ColorTabGroupDialogPink) \ + E_CPONLY(CEF_ColorTabGroupDialogPurple) \ + E_CPONLY(CEF_ColorTabGroupDialogCyan) \ + E_CPONLY(CEF_ColorTabGroupDialogOrange) \ + E_CPONLY(CEF_ColorTabGroupDialogIconEnabled) \ + /* The colors used for tab groups in the tabstrip. */ \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveGrey) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveBlue) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveRed) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveYellow) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveGreen) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActivePink) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActivePurple) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveCyan) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameActiveOrange) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveGrey) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveBlue) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveRed) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveYellow) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveGreen) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactivePink) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactivePurple) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveCyan) \ + E_CPONLY(CEF_ColorTabGroupTabStripFrameInactiveOrange) \ + E_CPONLY(CEF_ColorTabStrokeFrameActive) \ + E_CPONLY(CEF_ColorTabStrokeFrameInactive) \ + E_CPONLY(CEF_ColorTabstripLoadingProgressBackground) \ + E_CPONLY(CEF_ColorTabstripLoadingProgressForeground) \ + E_CPONLY(CEF_ColorTabstripScrollContainerShadow) \ + E_CPONLY(CEF_ColorTabThrobber) \ + E_CPONLY(CEF_ColorTabThrobberPreconnect) \ + /* Tab Search colors */ \ + E_CPONLY(CEF_ColorTabSearchBackground) \ + E_CPONLY(CEF_ColorTabSearchButtonCRForegroundFrameActive) \ + E_CPONLY(CEF_ColorTabSearchButtonCRForegroundFrameInactive) \ + E_CPONLY(CEF_ColorTabSearchCardBackground) \ + E_CPONLY(CEF_ColorTabSearchDivider) \ + E_CPONLY(CEF_ColorTabSearchFooterBackground) \ + E_CPONLY(CEF_ColorTabSearchImageTabContentBottom) \ + E_CPONLY(CEF_ColorTabSearchImageTabContentTop) \ + E_CPONLY(CEF_ColorTabSearchImageTabText) \ + E_CPONLY(CEF_ColorTabSearchImageWindowFrame) \ + E_CPONLY(CEF_ColorTabSearchMediaIcon) \ + E_CPONLY(CEF_ColorTabSearchMediaRecordingIcon) \ + E_CPONLY(CEF_ColorTabSearchPrimaryForeground) \ + E_CPONLY(CEF_ColorTabSearchSecondaryForeground) \ + E_CPONLY(CEF_ColorTabSearchSelected) \ + E_CPONLY(CEF_ColorTabSearchScrollbarThumb) \ + /* Thumbnail tab colors. */ \ + E_CPONLY(CEF_ColorThumbnailTabBackground) \ + E_CPONLY(CEF_ColorThumbnailTabForeground) \ + E_CPONLY(CEF_ColorThumbnailTabStripBackgroundActive) \ + E_CPONLY(CEF_ColorThumbnailTabStripBackgroundInactive) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveGrey) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveBlue) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveRed) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveYellow) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveGreen) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActivePink) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActivePurple) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveCyan) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameActiveOrange) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveGrey) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveBlue) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveRed) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveYellow) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveGreen) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactivePink) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactivePurple) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveCyan) \ + E_CPONLY(CEF_ColorThumbnailTabStripTabGroupFrameInactiveOrange) \ + /* Toolbar colors. */ \ + E_CPONLY(CEF_ColorToolbar) \ + E_CPONLY(CEF_ColorToolbarBackgroundSubtleEmphasis) \ + E_CPONLY(CEF_ColorToolbarBackgroundSubtleEmphasisHovered) \ + E_CPONLY(CEF_ColorToolbarButtonBackgroundHighlightedDefault) \ + E_CPONLY(CEF_ColorToolbarButtonBorder) \ + E_CPONLY(CEF_ColorToolbarButtonIcon) \ + E_CPONLY(CEF_ColorToolbarButtonIconDefault) \ + E_CPONLY(CEF_ColorToolbarButtonIconDisabled) \ + E_CPONLY(CEF_ColorToolbarButtonIconHovered) \ + E_CPONLY(CEF_ColorToolbarButtonIconInactive) \ + E_CPONLY(CEF_ColorToolbarButtonIconPressed) \ + E_CPONLY(CEF_ColorToolbarButtonText) \ + E_CPONLY(CEF_ColorToolbarContentAreaSeparator) \ + E_CPONLY(CEF_ColorToolbarExtensionSeparatorDisabled) \ + E_CPONLY(CEF_ColorToolbarExtensionSeparatorEnabled) \ + E_CPONLY(CEF_ColorToolbarFeaturePromoHighlight) \ + E_CPONLY(CEF_ColorToolbarIconContainerBorder) \ + E_CPONLY(CEF_ColorToolbarInkDrop) \ + E_CPONLY(CEF_ColorToolbarInkDropHover) \ + E_CPONLY(CEF_ColorToolbarInkDropRipple) \ + E_CPONLY(CEF_ColorToolbarSeparator) \ + E_CPONLY(CEF_ColorToolbarSeparatorDefault) \ + E_CPONLY(CEF_ColorToolbarText) \ + E_CPONLY(CEF_ColorToolbarTextDefault) \ + E_CPONLY(CEF_ColorToolbarTextDisabled) \ + E_CPONLY(CEF_ColorToolbarTextDisabledDefault) \ + E_CPONLY(CEF_ColorToolbarTopSeparatorFrameActive) \ + E_CPONLY(CEF_ColorToolbarTopSeparatorFrameInactive) \ + /* WebAuthn colors. */ \ + E_CPONLY(CEF_ColorWebAuthnBackArrowButtonIcon) \ + E_CPONLY(CEF_ColorWebAuthnBackArrowButtonIconDisabled) \ + E_CPONLY(CEF_ColorWebAuthnIconColor) \ + E_CPONLY(CEF_ColorWebAuthnPinTextfieldBottomBorder) \ + E_CPONLY(CEF_ColorWebAuthnProgressRingBackground) \ + E_CPONLY(CEF_ColorWebAuthnProgressRingForeground) \ + /* Web contents colors. */ \ + E_CPONLY(CEF_ColorWebContentsBackground) \ + E_CPONLY(CEF_ColorWebContentsBackgroundLetterboxing) \ + /* WebUI Tab Strip colors. */ \ + E_CPONLY(CEF_ColorWebUiTabStripBackground) \ + E_CPONLY(CEF_ColorWebUiTabStripFocusOutline) \ + E_CPONLY(CEF_ColorWebUiTabStripIndicatorCapturing) \ + E_CPONLY(CEF_ColorWebUiTabStripIndicatorPip) \ + E_CPONLY(CEF_ColorWebUiTabStripIndicatorRecording) \ + E_CPONLY(CEF_ColorWebUiTabStripScrollbarThumb) \ + E_CPONLY(CEF_ColorWebUiTabStripTabActiveTitleBackground) \ + E_CPONLY(CEF_ColorWebUiTabStripTabActiveTitleContent) \ + E_CPONLY(CEF_ColorWebUiTabStripTabBackground) \ + E_CPONLY(CEF_ColorWebUiTabStripTabBlocked) \ + E_CPONLY(CEF_ColorWebUiTabStripTabLoadingSpinning) \ + E_CPONLY(CEF_ColorWebUiTabStripTabSeparator) \ + E_CPONLY(CEF_ColorWebUiTabStripTabText) \ + E_CPONLY(CEF_ColorWebUiTabStripTabWaitingSpinning) \ + /* Window control button background colors. */ \ + E_CPONLY(CEF_ColorWindowControlButtonBackgroundActive) \ + E_CPONLY(CEF_ColorWindowControlButtonBackgroundInactive) \ + +#if defined(OS_CHROMEOS) +#define CHROME_PLATFORM_SPECIFIC_COLOR_IDS \ + /* Borealis colors. */ \ + E_CPONLY(CEF_ColorBorealisSplashScreenBackground) \ + E_CPONLY(CEF_ColorBorealisSplashScreenForeground) \ + /* Caption colors. */ \ + E_CPONLY(CEF_ColorCaptionForeground) \ + /* Sharesheet colors. */ \ + E_CPONLY(CEF_ColorSharesheetTargetButtonIconShadow) +#elif defined(OS_WIN) +#define CHROME_PLATFORM_SPECIFIC_COLOR_IDS \ + /* The colors of the 1px border around the window on Windows 10. */ \ + E_CPONLY(CEF_ColorAccentBorderActive) \ + E_CPONLY(CEF_ColorAccentBorderInactive) \ + /* Caption colors. */ \ + E_CPONLY(CEF_ColorCaptionButtonForegroundActive) \ + E_CPONLY(CEF_ColorCaptionButtonForegroundInactive) \ + E_CPONLY(CEF_ColorCaptionCloseButtonBackgroundHovered) \ + E_CPONLY(CEF_ColorCaptionCloseButtonForegroundHovered) \ + E_CPONLY(CEF_ColorCaptionForegroundActive) \ + E_CPONLY(CEF_ColorCaptionForegroundInactive) \ + /* Tab search caption button colors. */ \ + E_CPONLY(CEF_ColorTabSearchCaptionButtonFocusRing) +#else +#define CHROME_PLATFORM_SPECIFIC_COLOR_IDS +#endif // defined(OS_WIN) + +#define CHROME_COLOR_IDS \ + COMMON_CHROME_COLOR_IDS CHROME_PLATFORM_SPECIFIC_COLOR_IDS + +#include "include/base/internal/cef_color_id_macros.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +/// +/// All input, intermediary, and output colors known to CEF/Chromium. +/// Clients can optionally extend this enum with additional values. +/// Clients define enum values from CEF_ChromeColorsEnd. Values named +/// beginning with "CEF_Color" represent the actual colors; the rest are +/// markers. +/// +typedef enum { + CEF_UiColorsStart = 0, + + COLOR_IDS + + CEF_UiColorsEnd, + + CEF_ComponentsColorsStart = CEF_UiColorsEnd, + + COMPONENTS_COLOR_IDS + + CEF_ComponentsColorsEnd, + + CEF_ChromeColorsStart = CEF_ComponentsColorsEnd, + + CHROME_COLOR_IDS + + // Clients must start custom color IDs from this value. + CEF_ChromeColorsEnd, + + // Clients must not assign IDs larger than this value. This is used to + // verify that color IDs and color set IDs are not interchanged. + CEF_UiColorsLast = 0xffff +} cef_color_id_t; + +#ifdef __cplusplus +} +#endif + +// Note that this second include is not redundant. The second inclusion of the +// .inc file serves to undefine the macros the first inclusion defined. +#include "include/base/internal/cef_color_id_macros.inc" + +// Undefine the macros that were defined in this file. +#undef CHROMEOS_ASH_COLOR_IDS +#undef CHROME_COLOR_IDS +#undef CHROME_PLATFORM_SPECIFIC_COLOR_IDS +#undef COLOR_IDS +#undef COMMON_CHROME_COLOR_IDS +#undef COMMON_COMPONENTS_COLOR_IDS +#undef COMPONENTS_COLOR_IDS +#undef CROSS_PLATFORM_COLOR_IDS +#undef PLATFORM_SPECIFIC_COLOR_IDS + +#endif // CEF_INCLUDE_CEF_COLOR_IDS_H_ diff --git a/CefGlue.Interop.Gen/include/cef_command_ids.h b/CefGlue.Interop.Gen/include/cef_command_ids.h index f084d8fc..dbcdf46b 100644 --- a/CefGlue.Interop.Gen/include/cef_command_ids.h +++ b/CefGlue.Interop.Gen/include/cef_command_ids.h @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2024 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 @@ -120,8 +120,6 @@ #define IDC_VIRTUAL_CARD_MANUAL_FALLBACK 35030 #define IDC_SHARING_HUB_SCREENSHOT 35031 #define IDC_VIRTUAL_CARD_ENROLL 35032 -#define IDC_FOLLOW 35033 -#define IDC_UNFOLLOW 35034 #define IDC_SAVE_IBAN_FOR_PAGE 35035 #define IDC_AUTOFILL_MANDATORY_REAUTH 35036 #define IDC_PROFILE_MENU_IN_APP_MENU 35039 @@ -129,6 +127,8 @@ #define IDC_SHOW_PASSWORD_MANAGER 35041 #define IDC_SHOW_PAYMENT_METHODS 35042 #define IDC_SHOW_ADDRESSES 35043 +#define IDC_ORGANIZE_TABS 35044 +#define IDC_CREATE_NEW_TAB_GROUP 35045 #define IDC_MUTE_TARGET_SITE 35050 #define IDC_PIN_TARGET_TAB 35051 #define IDC_GROUP_TARGET_TAB 35052 @@ -190,8 +190,10 @@ #define IDC_MANAGE_EXTENSIONS 40022 #define IDC_DEV_TOOLS_INSPECT 40023 #define IDC_UPGRADE_DIALOG 40024 +#define IDC_SHOW_HISTORY_CLUSTERS_SIDE_PANEL 40025 #define IDC_PROFILING_ENABLED 40028 #define IDC_BOOKMARKS_MENU 40029 +#define IDC_SAVED_TAB_GROUPS_MENU 40030 #define IDC_EXTENSION_ERRORS 40031 #define IDC_SHOW_SETTINGS_CHANGE_FIRST 40033 #define IDC_SHOW_SETTINGS_CHANGE_LAST 40133 @@ -220,7 +222,6 @@ #define IDC_CLOSE_SIGN_IN_PROMO 40258 #define IDC_SHOW_FULL_URLS 40259 #define IDC_CARET_BROWSING_TOGGLE 40260 -#define IDC_TOGGLE_QUICK_COMMANDS 40261 #define IDC_CHROME_TIPS 40263 #define IDC_CHROME_WHATS_NEW 40264 #define IDC_LACROS_DATA_MIGRATION 40265 @@ -231,11 +232,14 @@ #define IDC_READING_LIST_MENU 40270 #define IDC_READING_LIST_MENU_ADD_TAB 40271 #define IDC_READING_LIST_MENU_SHOW_UI 40272 +#define IDC_SHOW_READING_MODE_SIDE_PANEL 40273 #define IDC_SHOW_BOOKMARK_SIDE_PANEL 40274 #define IDC_SHOW_SEARCH_COMPANION 40275 #define IDC_SHOW_CHROME_LABS 40276 #define IDC_RECENT_TABS_LOGIN_FOR_DEVICE_TABS 40277 #define IDC_OPEN_RECENT_TAB 40278 +#define IDC_OPEN_SAFETY_HUB 40279 +#define IDC_SHOW_PASSWORD_CHECKUP 40280 #define IDC_SPELLCHECK_SUGGESTION_0 41000 #define IDC_SPELLCHECK_SUGGESTION_1 41001 #define IDC_SPELLCHECK_SUGGESTION_2 41002 @@ -276,77 +280,83 @@ #define IDC_CONTENT_CONTEXT_COPYLINKTEXT 50107 #define IDC_CONTENT_CONTEXT_OPENLINKINPROFILE 50108 #define IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP 50109 -#define IDC_CONTENT_CONTEXT_SAVEIMAGEAS 50110 -#define IDC_CONTENT_CONTEXT_COPYIMAGELOCATION 50111 -#define IDC_CONTENT_CONTEXT_COPYIMAGE 50112 -#define IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB 50113 -#define IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE 50114 -#define IDC_CONTENT_CONTEXT_OPEN_ORIGINAL_IMAGE_NEW_TAB 50115 -#define IDC_CONTENT_CONTEXT_LOAD_IMAGE 50116 -#define IDC_CONTENT_CONTEXT_SEARCHLENSFORIMAGE 50117 -#define IDC_CONTENT_CONTEXT_TRANSLATEIMAGEWITHWEB 50118 -#define IDC_CONTENT_CONTEXT_TRANSLATEIMAGEWITHLENS 50119 -#define IDC_CONTENT_CONTEXT_SAVEAVAS 50120 -#define IDC_CONTENT_CONTEXT_COPYAVLOCATION 50121 -#define IDC_CONTENT_CONTEXT_COPYVIDEOFRAME 50122 -#define IDC_CONTENT_CONTEXT_OPENAVNEWTAB 50123 -#define IDC_CONTENT_CONTEXT_PICTUREINPICTURE 50124 -#define IDC_CONTENT_CONTEXT_LOOP 50130 -#define IDC_CONTENT_CONTEXT_CONTROLS 50131 -#define IDC_CONTENT_CONTEXT_ROTATECW 50132 -#define IDC_CONTENT_CONTEXT_ROTATECCW 50133 -#define IDC_CONTENT_CONTEXT_COPY 50140 -#define IDC_CONTENT_CONTEXT_CUT 50141 -#define IDC_CONTENT_CONTEXT_PASTE 50142 -#define IDC_CONTENT_CONTEXT_DELETE 50143 -#define IDC_CONTENT_CONTEXT_UNDO 50144 -#define IDC_CONTENT_CONTEXT_REDO 50145 -#define IDC_CONTENT_CONTEXT_SELECTALL 50146 -#define IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE 50147 -#define IDC_CONTENT_CONTEXT_COPYLINKTOTEXT 50148 -#define IDC_CONTENT_CONTEXT_RESHARELINKTOTEXT 50149 -#define IDC_CONTENT_CONTEXT_REMOVELINKTOTEXT 50150 -#define IDC_CONTENT_CONTEXT_TRANSLATE 50151 -#define IDC_CONTENT_CONTEXT_INSPECTELEMENT 50152 -#define IDC_CONTENT_CONTEXT_VIEWPAGEINFO 50153 -#define IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS 50154 -#define IDC_CONTENT_CONTEXT_LOOK_UP 50155 -#define IDC_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS 50156 -#define IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION 50157 -#define IDC_CONTENT_CONTEXT_SPELLING_TOGGLE 50158 -#define IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE 50159 -#define IDC_CONTENT_CONTEXT_SAVEPLUGINAS 50160 -#define IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE 50161 -#define IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP 50162 -#define IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP 50163 -#define IDC_CONTENT_CONTEXT_LENS_REGION_SEARCH 50164 -#define IDC_CONTENT_CONTEXT_WEB_REGION_SEARCH 50165 -#define IDC_CONTENT_CONTEXT_GENERATEPASSWORD 50166 -#define IDC_CONTENT_CONTEXT_EXIT_FULLSCREEN 50167 -#define IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS 50168 -#define IDC_CONTENT_CONTEXT_PARTIAL_TRANSLATE 50169 -#define IDC_CONTENT_CONTEXT_RELOADFRAME 50170 -#define IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE 50171 -#define IDC_CONTENT_CONTEXT_VIEWFRAMEINFO 50172 -#define IDC_CONTENT_CONTEXT_ADD_A_NOTE 50175 -#define IDC_CONTENT_CONTEXT_GOTOURL 50180 -#define IDC_CONTENT_CONTEXT_SEARCHWEBFOR 50181 -#define IDC_CONTENT_CONTEXT_SEARCHWEBFORNEWTAB 50182 -#define IDC_CONTENT_CONTEXT_OPEN_WITH1 50190 -#define IDC_CONTENT_CONTEXT_OPEN_WITH2 50191 -#define IDC_CONTENT_CONTEXT_OPEN_WITH3 50192 -#define IDC_CONTENT_CONTEXT_OPEN_WITH4 50193 -#define IDC_CONTENT_CONTEXT_OPEN_WITH5 50194 -#define IDC_CONTENT_CONTEXT_OPEN_WITH6 50195 -#define IDC_CONTENT_CONTEXT_OPEN_WITH7 50196 -#define IDC_CONTENT_CONTEXT_OPEN_WITH8 50197 -#define IDC_CONTENT_CONTEXT_OPEN_WITH9 50198 -#define IDC_CONTENT_CONTEXT_OPEN_WITH10 50199 -#define IDC_CONTENT_CONTEXT_OPEN_WITH11 50200 -#define IDC_CONTENT_CONTEXT_OPEN_WITH12 50201 -#define IDC_CONTENT_CONTEXT_OPEN_WITH13 50202 -#define IDC_CONTENT_CONTEXT_OPEN_WITH14 50203 -#define IDC_CONTENT_CONTEXT_EMOJI 50210 +#define IDC_CONTENT_CONTEXT_OPENLINKPREVIEW 50110 +#define IDC_CONTENT_CONTEXT_SAVEIMAGEAS 50120 +#define IDC_CONTENT_CONTEXT_COPYIMAGELOCATION 50121 +#define IDC_CONTENT_CONTEXT_COPYIMAGE 50122 +#define IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB 50123 +#define IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE 50124 +#define IDC_CONTENT_CONTEXT_OPEN_ORIGINAL_IMAGE_NEW_TAB 50125 +#define IDC_CONTENT_CONTEXT_LOAD_IMAGE 50126 +#define IDC_CONTENT_CONTEXT_SEARCHLENSFORIMAGE 50127 +#define IDC_CONTENT_CONTEXT_TRANSLATEIMAGEWITHWEB 50128 +#define IDC_CONTENT_CONTEXT_TRANSLATEIMAGEWITHLENS 50129 +#define IDC_CONTENT_CONTEXT_SAVEVIDEOFRAMEAS 50130 +#define IDC_CONTENT_CONTEXT_SAVEAVAS 50131 +#define IDC_CONTENT_CONTEXT_COPYAVLOCATION 50132 +#define IDC_CONTENT_CONTEXT_COPYVIDEOFRAME 50133 +#define IDC_CONTENT_CONTEXT_SEARCHLENSFORVIDEOFRAME 50134 +#define IDC_CONTENT_CONTEXT_SEARCHWEBFORVIDEOFRAME 50135 +#define IDC_CONTENT_CONTEXT_OPENAVNEWTAB 50136 +#define IDC_CONTENT_CONTEXT_PICTUREINPICTURE 50137 +#define IDC_CONTENT_CONTEXT_LOOP 50140 +#define IDC_CONTENT_CONTEXT_CONTROLS 50141 +#define IDC_CONTENT_CONTEXT_ROTATECW 50142 +#define IDC_CONTENT_CONTEXT_ROTATECCW 50143 +#define IDC_CONTENT_CONTEXT_COPY 50150 +#define IDC_CONTENT_CONTEXT_CUT 50151 +#define IDC_CONTENT_CONTEXT_PASTE 50152 +#define IDC_CONTENT_CONTEXT_DELETE 50153 +#define IDC_CONTENT_CONTEXT_UNDO 50154 +#define IDC_CONTENT_CONTEXT_REDO 50155 +#define IDC_CONTENT_CONTEXT_SELECTALL 50156 +#define IDC_CONTENT_CONTEXT_PASTE_AND_MATCH_STYLE 50157 +#define IDC_CONTENT_CONTEXT_COPYLINKTOTEXT 50158 +#define IDC_CONTENT_CONTEXT_RESHARELINKTOTEXT 50159 +#define IDC_CONTENT_CONTEXT_REMOVELINKTOTEXT 50160 +#define IDC_CONTENT_CONTEXT_TRANSLATE 50161 +#define IDC_CONTENT_CONTEXT_INSPECTELEMENT 50162 +#define IDC_CONTENT_CONTEXT_VIEWPAGEINFO 50163 +#define IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS 50164 +#define IDC_CONTENT_CONTEXT_LOOK_UP 50165 +#define IDC_CONTENT_CONTEXT_NO_SPELLING_SUGGESTIONS 50166 +#define IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION 50167 +#define IDC_CONTENT_CONTEXT_SPELLING_TOGGLE 50168 +#define IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE 50169 +#define IDC_CONTENT_CONTEXT_SAVEPLUGINAS 50170 +#define IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE 50171 +#define IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP 50172 +#define IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP 50173 +#define IDC_CONTENT_CONTEXT_LENS_REGION_SEARCH 50174 +#define IDC_CONTENT_CONTEXT_WEB_REGION_SEARCH 50175 +#define IDC_CONTENT_CONTEXT_GENERATEPASSWORD 50176 +#define IDC_CONTENT_CONTEXT_EXIT_FULLSCREEN 50177 +#define IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS 50178 +#define IDC_CONTENT_CONTEXT_PARTIAL_TRANSLATE 50179 +#define IDC_CONTENT_CONTEXT_RELOADFRAME 50180 +#define IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE 50181 +#define IDC_CONTENT_CONTEXT_VIEWFRAMEINFO 50182 +#define IDC_CONTENT_CONTEXT_ADD_A_NOTE 50185 +#define IDC_CONTENT_CONTEXT_GOTOURL 50190 +#define IDC_CONTENT_CONTEXT_SEARCHWEBFOR 50191 +#define IDC_CONTENT_CONTEXT_SEARCHWEBFORNEWTAB 50192 +#define IDC_CONTENT_CONTEXT_LENS_OVERLAY 50193 +#define IDC_CONTENT_CONTEXT_OPEN_WITH1 50200 +#define IDC_CONTENT_CONTEXT_OPEN_WITH2 50201 +#define IDC_CONTENT_CONTEXT_OPEN_WITH3 50202 +#define IDC_CONTENT_CONTEXT_OPEN_WITH4 50203 +#define IDC_CONTENT_CONTEXT_OPEN_WITH5 50204 +#define IDC_CONTENT_CONTEXT_OPEN_WITH6 50205 +#define IDC_CONTENT_CONTEXT_OPEN_WITH7 50206 +#define IDC_CONTENT_CONTEXT_OPEN_WITH8 50207 +#define IDC_CONTENT_CONTEXT_OPEN_WITH9 50208 +#define IDC_CONTENT_CONTEXT_OPEN_WITH10 50209 +#define IDC_CONTENT_CONTEXT_OPEN_WITH11 50210 +#define IDC_CONTENT_CONTEXT_OPEN_WITH12 50211 +#define IDC_CONTENT_CONTEXT_OPEN_WITH13 50212 +#define IDC_CONTENT_CONTEXT_OPEN_WITH14 50213 +#define IDC_CONTENT_CONTEXT_EMOJI 50220 +#define IDC_CONTEXT_COMPOSE 50230 #define IDC_BOOKMARK_BAR_OPEN_ALL 51000 #define IDC_BOOKMARK_BAR_OPEN_ALL_NEW_WINDOW 51001 #define IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO 51002 @@ -368,6 +378,7 @@ #define IDC_BOOKMARK_BAR_UNTRACK_PRICE_FOR_SHOPPING_BOOKMARK 51018 #define IDC_BOOKMARK_BAR_ADD_TO_BOOKMARKS_BAR 51019 #define IDC_BOOKMARK_BAR_REMOVE_FROM_BOOKMARKS_BAR 51020 +#define IDC_BOOKMARK_BAR_TOGGLE_SHOW_TAB_GROUPS 51021 #define IDC_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_SINGLE_DEVICE 51030 #define IDC_CONTENT_CONTEXT_SHARING_CLICK_TO_CALL_MULTIPLE_DEVICES 51031 #define IDC_CONTENT_CONTEXT_SHARING_SHARED_CLIPBOARD_SINGLE_DEVICE 51032 @@ -386,6 +397,7 @@ #define IDC_MEDIA_ROUTER_TOGGLE_MEDIA_REMOTING 51208 #define IDC_MEDIA_TOOLBAR_CONTEXT_REPORT_CAST_ISSUE 51209 #define IDC_MEDIA_TOOLBAR_CONTEXT_SHOW_OTHER_SESSIONS 51210 +#define IDC_UPDATE_SIDE_PANEL_PIN_STATE 51211 #define IDC_MEDIA_STREAM_DEVICE_STATUS_TRAY 51300 #define IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_FIRST 51301 #define IDC_MEDIA_CONTEXT_MEDIA_STREAM_CAPTURE_LIST_LAST 51399 @@ -405,20 +417,24 @@ #define IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_TOGGLE_ONCE 52412 #define IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER 52413 #define IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY 52414 -#define IDC_CONTENT_CONTEXT_ORCA 52415 #define IDC_CONTENT_CONTEXT_RUN_LAYOUT_EXTRACTION 52420 #define IDC_CONTENT_CONTEXT_PDF_OCR 52421 -#define IDC_CONTENT_CONTEXT_PDF_OCR_ALWAYS 52422 -#define IDC_CONTENT_CONTEXT_PDF_OCR_ONCE 52423 #define IDC_TAB_SEARCH 52500 #define IDC_TAB_SEARCH_CLOSE 52501 #define IDC_DEBUG_TOGGLE_TABLET_MODE 52510 #define IDC_DEBUG_PRINT_VIEW_TREE 52511 #define IDC_DEBUG_PRINT_VIEW_TREE_DETAILS 52512 #define IDC_CONTENT_CONTEXT_AUTOFILL_FEEDBACK 52990 -#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_AUTOCOMPLETE_UNRECOGNIZED 52995 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PLUS_ADDRESS 52994 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_ADDRESS 52995 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PAYMENTS 52996 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PASSWORDS 52997 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PASSWORDS_SELECT_PASSWORD 52998 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PASSWORDS_IMPORT_PASSWORDS 52999 +#define IDC_CONTENT_CONTEXT_AUTOFILL_FALLBACK_PASSWORDS_SUGGEST_PASSWORD 53000 #define IDC_LIVE_CAPTION 53251 #define IDC_DEVICE_SYSTEM_TRAY_ICON_FIRST 53260 #define IDC_DEVICE_SYSTEM_TRAY_ICON_LAST 53299 +#define IDC_SET_BROWSER_AS_DEFAULT 53300 #endif // CEF_INCLUDE_CEF_COMMAND_IDS_H_ diff --git a/CefGlue.Interop.Gen/include/cef_command_line.h b/CefGlue.Interop.Gen/include/cef_command_line.h index 9ae6ee64..27691ed4 100644 --- a/CefGlue.Interop.Gen/include/cef_command_line.h +++ b/CefGlue.Interop.Gen/include/cef_command_line.h @@ -40,6 +40,7 @@ #include #include + #include "include/cef_base.h" /// diff --git a/CefGlue.Interop.Gen/include/cef_config.h b/CefGlue.Interop.Gen/include/cef_config.h index d59e6e82..b5cc4511 100644 --- a/CefGlue.Interop.Gen/include/cef_config.h +++ b/CefGlue.Interop.Gen/include/cef_config.h @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2024 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 diff --git a/CefGlue.Interop.Gen/include/cef_cookie.h b/CefGlue.Interop.Gen/include/cef_cookie.h index e3a68207..40570d81 100644 --- a/CefGlue.Interop.Gen/include/cef_cookie.h +++ b/CefGlue.Interop.Gen/include/cef_cookie.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_callback.h" diff --git a/CefGlue.Interop.Gen/include/cef_dialog_handler.h b/CefGlue.Interop.Gen/include/cef_dialog_handler.h index 30fd3a16..d922885b 100644 --- a/CefGlue.Interop.Gen/include/cef_dialog_handler.h +++ b/CefGlue.Interop.Gen/include/cef_dialog_handler.h @@ -77,21 +77,30 @@ class CefDialogHandler : public virtual CefBaseRefCounted { /// empty to show the default title ("Open" or "Save" depending on the mode). /// |default_file_path| is the path with optional directory and/or file name /// component that should be initially selected in the dialog. - /// |accept_filters| are used to restrict the selectable file types and may - /// any combination of (a) valid lower-cased MIME types (e.g. "text/*" or - /// "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) - /// combined description and file extension delimited using "|" and ";" (e.g. - /// "Image Types|.png;.gif;.jpg"). To display a custom dialog return true and - /// execute |callback| either inline or at a later time. To display the - /// default dialog return false. + /// |accept_filters| are used to restrict the selectable file types and may be + /// any combination of valid lower-cased MIME types (e.g. "text/*" or + /// "image/*") and individual file extensions (e.g. ".txt" or ".png"). + /// |accept_extensions| provides the semicolon-delimited expansion of MIME + /// types to file extensions (if known, or empty string otherwise). + /// |accept_descriptions| provides the descriptions for MIME types (if known, + /// or empty string otherwise). For example, the "image/*" mime type might + /// have extensions ".png;.jpg;.bmp;..." and description "Image Files". + /// |accept_filters|, |accept_extensions| and |accept_descriptions| will all + /// be the same size. To display a custom dialog return true and execute + /// |callback| either inline or at a later time. To display the default dialog + /// return false. If this method returns false it may be called an additional + /// time for the same dialog (both before and after MIME type expansion). /// /*--cef(optional_param=title,optional_param=default_file_path, - optional_param=accept_filters)--*/ + optional_param=accept_filters,optional_param=accept_extensions, + optional_param=accept_descriptions)--*/ virtual bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title, const CefString& default_file_path, const std::vector& accept_filters, + const std::vector& accept_extensions, + const std::vector& accept_descriptions, CefRefPtr callback) { return false; } diff --git a/CefGlue.Interop.Gen/include/cef_dom.h b/CefGlue.Interop.Gen/include/cef_dom.h index 8ddb8f64..21fa3f4e 100644 --- a/CefGlue.Interop.Gen/include/cef_dom.h +++ b/CefGlue.Interop.Gen/include/cef_dom.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" class CefDOMDocument; diff --git a/CefGlue.Interop.Gen/include/cef_download_handler.h b/CefGlue.Interop.Gen/include/cef_download_handler.h index de911b66..64e3a4b3 100644 --- a/CefGlue.Interop.Gen/include/cef_download_handler.h +++ b/CefGlue.Interop.Gen/include/cef_download_handler.h @@ -106,17 +106,19 @@ class CefDownloadHandler : public virtual CefBaseRefCounted { /// /// Called before a download begins. |suggested_name| is the suggested name - /// for the download file. By default the download will be canceled. Execute - /// |callback| either asynchronously or in this method to continue the - /// download if desired. Do not keep a reference to |download_item| outside of - /// this method. + /// for the download file. Return true and execute |callback| either + /// asynchronously or in this method to continue or cancel the download. + /// Return false to proceed with default handling (cancel with Alloy style, + /// download shelf with Chrome style). Do not keep a reference to + /// |download_item| outside of this method. /// /*--cef()--*/ - virtual void OnBeforeDownload( - CefRefPtr browser, - CefRefPtr download_item, - const CefString& suggested_name, - CefRefPtr callback) = 0; + virtual bool OnBeforeDownload(CefRefPtr browser, + CefRefPtr download_item, + const CefString& suggested_name, + CefRefPtr callback) { + return false; + } /// /// Called when a download's status or progress information has been updated. diff --git a/CefGlue.Interop.Gen/include/cef_drag_data.h b/CefGlue.Interop.Gen/include/cef_drag_data.h index 735a64c4..382047b9 100644 --- a/CefGlue.Interop.Gen/include/cef_drag_data.h +++ b/CefGlue.Interop.Gen/include/cef_drag_data.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_image.h" #include "include/cef_stream.h" diff --git a/CefGlue.Interop.Gen/include/cef_extension.h b/CefGlue.Interop.Gen/include/cef_extension.h index 5d94192f..5f78d815 100644 --- a/CefGlue.Interop.Gen/include/cef_extension.h +++ b/CefGlue.Interop.Gen/include/cef_extension.h @@ -48,6 +48,8 @@ class CefRequestContext; /// Object representing an extension. Methods may be called on any thread unless /// otherwise indicated. /// +/// WARNING: This API is deprecated and will be removed in ~M127. +/// /*--cef(source=library)--*/ class CefExtension : public CefBaseRefCounted { public: diff --git a/CefGlue.Interop.Gen/include/cef_extension_handler.h b/CefGlue.Interop.Gen/include/cef_extension_handler.h index 4b34fbc0..e9591689 100644 --- a/CefGlue.Interop.Gen/include/cef_extension_handler.h +++ b/CefGlue.Interop.Gen/include/cef_extension_handler.h @@ -70,6 +70,8 @@ class CefGetExtensionResourceCallback : public CefBaseRefCounted { /// The methods of this class will be called on the UI thread. See /// CefRequestContext::LoadExtension for information about extension loading. /// +/// WARNING: This API is deprecated and will be removed in ~M127. +/// /*--cef(source=client)--*/ class CefExtensionHandler : public virtual CefBaseRefCounted { public: diff --git a/CefGlue.Interop.Gen/include/cef_frame.h b/CefGlue.Interop.Gen/include/cef_frame.h index ab11dee6..4c8d414b 100644 --- a/CefGlue.Interop.Gen/include/cef_frame.h +++ b/CefGlue.Interop.Gen/include/cef_frame.h @@ -180,11 +180,11 @@ class CefFrame : public virtual CefBaseRefCounted { virtual CefString GetName() = 0; /// - /// Returns the globally unique identifier for this frame or < 0 if the + /// Returns the globally unique identifier for this frame or empty if the /// underlying frame does not yet exist. /// /*--cef()--*/ - virtual int64_t GetIdentifier() = 0; + virtual CefString GetIdentifier() = 0; /// /// Returns the parent of this frame or NULL if this is the main (top-level) diff --git a/CefGlue.Interop.Gen/include/cef_frame_handler.h b/CefGlue.Interop.Gen/include/cef_frame_handler.h index b742623f..ce4e0fc9 100644 --- a/CefGlue.Interop.Gen/include/cef_frame_handler.h +++ b/CefGlue.Interop.Gen/include/cef_frame_handler.h @@ -95,7 +95,7 @@ /// will then be discarded after the real cross-origin sub-frame is created in /// the new/target renderer process. The client will receive cross-origin /// navigation callbacks (2) for the transition from the temporary sub-frame to -/// the real sub-frame. The temporary sub-frame will not recieve or execute +/// the real sub-frame. The temporary sub-frame will not receive or execute /// commands during this transitional period (any sent commands will be /// discarded). /// @@ -103,7 +103,7 @@ /// browser, a temporary main frame object for the popup will first be created /// in the parent's renderer process. That temporary main frame will then be /// discarded after the real cross-origin main frame is created in the -/// new/target renderer process. The client will recieve creation and initial +/// new/target renderer process. The client will receive creation and initial /// navigation callbacks (1) for the temporary main frame, followed by /// cross-origin navigation callbacks (2) for the transition from the temporary /// main frame to the real main frame. The temporary main frame may receive and diff --git a/CefGlue.Interop.Gen/include/cef_life_span_handler.h b/CefGlue.Interop.Gen/include/cef_life_span_handler.h index 067a3f9d..1170cd3b 100644 --- a/CefGlue.Interop.Gen/include/cef_life_span_handler.h +++ b/CefGlue.Interop.Gen/include/cef_life_span_handler.h @@ -131,7 +131,7 @@ class CefLifeSpanHandler : public virtual CefBaseRefCounted { virtual void OnAfterCreated(CefRefPtr browser) {} /// - /// Called when a browser has recieved a request to close. This may result + /// Called when a browser has received a request to close. This may result /// directly from a call to CefBrowserHost::*CloseBrowser() or indirectly if /// the browser is parented to a top-level window created by CEF and the user /// attempts to close that window (by clicking the 'X', for example). The diff --git a/CefGlue.Interop.Gen/include/cef_media_router.h b/CefGlue.Interop.Gen/include/cef_media_router.h index eb9ea3f8..0550c2a5 100644 --- a/CefGlue.Interop.Gen/include/cef_media_router.h +++ b/CefGlue.Interop.Gen/include/cef_media_router.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_callback.h" #include "include/cef_registration.h" @@ -145,7 +146,7 @@ class CefMediaObserver : public virtual CefBaseRefCounted { ConnectionState state) = 0; /// - /// A message was recieved over |route|. |message| is only valid for + /// A message was received over |route|. |message| is only valid for /// the scope of this callback and should be copied if necessary. /// /*--cef()--*/ diff --git a/CefGlue.Interop.Gen/include/cef_render_handler.h b/CefGlue.Interop.Gen/include/cef_render_handler.h index b27403f9..9ac414a3 100644 --- a/CefGlue.Interop.Gen/include/cef_render_handler.h +++ b/CefGlue.Interop.Gen/include/cef_render_handler.h @@ -152,16 +152,25 @@ class CefRenderHandler : public virtual CefBaseRefCounted { /// Called when an element has been rendered to the shared texture handle. /// |type| indicates whether the element is the view or the popup widget. /// |dirtyRects| contains the set of rectangles in pixel coordinates that need - /// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that - /// can be accessed via ID3D11Device using the OpenSharedResource method. This - /// method is only called when CefWindowInfo::shared_texture_enabled is set to - /// true, and is currently only supported on Windows. + /// to be repainted. |info| contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on + /// macOS it is an IOSurface pointer that can be opened with Metal or OpenGL, + /// and on Linux it contains several planes, each with an fd to the underlying + /// system native buffer. + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of |info| will be released back to the + /// pool after this callback returns. /// /*--cef()--*/ virtual void OnAcceleratedPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, - void* shared_handle) {} + const CefAcceleratedPaintInfo& info) {} /// /// Called to retrieve the size of the touch handle for the specified diff --git a/CefGlue.Interop.Gen/include/cef_request.h b/CefGlue.Interop.Gen/include/cef_request.h index 5f5a440f..73610d98 100644 --- a/CefGlue.Interop.Gen/include/cef_request.h +++ b/CefGlue.Interop.Gen/include/cef_request.h @@ -40,6 +40,7 @@ #include #include + #include "include/cef_base.h" class CefPostData; diff --git a/CefGlue.Interop.Gen/include/cef_request_context.h b/CefGlue.Interop.Gen/include/cef_request_context.h index 1ecaf44f..21b2698a 100644 --- a/CefGlue.Interop.Gen/include/cef_request_context.h +++ b/CefGlue.Interop.Gen/include/cef_request_context.h @@ -266,6 +266,8 @@ class CefRequestContext : public CefPreferenceManager { /// See https://developer.chrome.com/extensions for extension implementation /// and usage documentation. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef(optional_param=manifest,optional_param=handler)--*/ virtual void LoadExtension(const CefString& root_directory, CefRefPtr manifest, @@ -277,6 +279,8 @@ class CefRequestContext : public CefPreferenceManager { /// access to the extension (see HasExtension). This method must be called on /// the browser process UI thread. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual bool DidLoadExtension(const CefString& extension_id) = 0; @@ -286,6 +290,8 @@ class CefRequestContext : public CefPreferenceManager { /// extension (see DidLoadExtension). This method must be called on the /// browser process UI thread. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual bool HasExtension(const CefString& extension_id) = 0; @@ -295,6 +301,8 @@ class CefRequestContext : public CefPreferenceManager { /// extension ID values. Returns true on success. This method must be called /// on the browser process UI thread. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual bool GetExtensions(std::vector& extension_ids) = 0; @@ -303,6 +311,8 @@ class CefRequestContext : public CefPreferenceManager { /// extension is accessible in this context (see HasExtension). This method /// must be called on the browser process UI thread. /// + /// WARNING: This method is deprecated and will be removed in ~M127. + /// /*--cef()--*/ virtual CefRefPtr GetExtension( const CefString& extension_id) = 0; @@ -381,6 +391,38 @@ class CefRequestContext : public CefPreferenceManager { const CefString& top_level_url, cef_content_setting_types_t content_type, cef_content_setting_values_t value) = 0; + + /// + /// Sets the Chrome color scheme for all browsers that share this request + /// context. |variant| values of SYSTEM, LIGHT and DARK change the underlying + /// color mode (e.g. light vs dark). Other |variant| values determine how + /// |user_color| will be applied in the current color mode. If |user_color| is + /// transparent (0) the default color will be used. + /// + /*--cef()--*/ + virtual void SetChromeColorScheme(cef_color_variant_t variant, + cef_color_t user_color) = 0; + + /// + /// Returns the current Chrome color scheme mode (SYSTEM, LIGHT or DARK). Must + /// be called on the browser process UI thread. + /// + /*--cef(default_retval=CEF_COLOR_VARIANT_SYSTEM)--*/ + virtual cef_color_variant_t GetChromeColorSchemeMode() = 0; + + /// + /// Returns the current Chrome color scheme color, or transparent (0) for the + /// default color. Must be called on the browser process UI thread. + /// + /*--cef(default_retval=0)--*/ + virtual cef_color_t GetChromeColorSchemeColor() = 0; + + /// + /// Returns the current Chrome color scheme variant. Must be called on the + /// browser process UI thread. + /// + /*--cef(default_retval=CEF_COLOR_VARIANT_SYSTEM)--*/ + virtual cef_color_variant_t GetChromeColorSchemeVariant() = 0; }; #endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_ diff --git a/CefGlue.Interop.Gen/include/cef_request_handler.h b/CefGlue.Interop.Gen/include/cef_request_handler.h index edeefbd1..8c24ec7b 100644 --- a/CefGlue.Interop.Gen/include/cef_request_handler.h +++ b/CefGlue.Interop.Gen/include/cef_request_handler.h @@ -48,6 +48,7 @@ #include "include/cef_request.h" #include "include/cef_resource_request_handler.h" #include "include/cef_ssl_info.h" +#include "include/cef_unresponsive_process_callback.h" #include "include/cef_x509_certificate.h" /// @@ -221,14 +222,52 @@ class CefRequestHandler : public virtual CefBaseRefCounted { /*--cef()--*/ virtual void OnRenderViewReady(CefRefPtr browser) {} + /// + /// Called on the browser process UI thread when the render process is + /// unresponsive as indicated by a lack of input event processing for at + /// least 15 seconds. Return false for the default behavior which is an + /// indefinite wait with the Alloy runtime or display of the "Page + /// unresponsive" dialog with the Chrome runtime. Return true and don't + /// execute the callback for an indefinite wait without display of the Chrome + /// runtime dialog. Return true and call CefUnresponsiveProcessCallback::Wait + /// either in this method or at a later time to reset the wait timer, + /// potentially triggering another call to this method if the process remains + /// unresponsive. Return true and call CefUnresponsiveProcessCallback:: + /// Terminate either in this method or at a later time to terminate the + /// unresponsive process, resulting in a call to OnRenderProcessTerminated. + /// OnRenderProcessResponsive will be called if the process becomes responsive + /// after this method is called. This functionality depends on the hang + /// monitor which can be disabled by passing the `--disable-hang-monitor` + /// command-line flag. + /// + /*--cef()--*/ + virtual bool OnRenderProcessUnresponsive( + CefRefPtr browser, + CefRefPtr callback) { + return false; + } + + /// + /// Called on the browser process UI thread when the render process becomes + /// responsive after previously being unresponsive. See documentation on + /// OnRenderProcessUnresponsive. + /// + /*--cef()--*/ + virtual void OnRenderProcessResponsive(CefRefPtr browser) {} + /// /// Called on the browser process UI thread when the render process - /// terminates unexpectedly. |status| indicates how the process - /// terminated. + /// terminates unexpectedly. |status| indicates how the process terminated. + /// |error_code| and |error_string| represent the error that would be + /// displayed in Chrome's "Aw, Snap!" view. Possible |error_code| values + /// include cef_resultcode_t non-normal exit values and platform-specific + /// crash values (for example, a Posix signal or Windows hardware exception). /// /*--cef()--*/ virtual void OnRenderProcessTerminated(CefRefPtr browser, - TerminationStatus status) {} + TerminationStatus status, + int error_code, + const CefString& error_string) {} /// /// Called on the browser process UI thread when the window.document object of diff --git a/CefGlue.Interop.Gen/include/cef_response.h b/CefGlue.Interop.Gen/include/cef_response.h index 571998a4..81d2e821 100644 --- a/CefGlue.Interop.Gen/include/cef_response.h +++ b/CefGlue.Interop.Gen/include/cef_response.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" /// diff --git a/CefGlue.Interop.Gen/include/cef_server.h b/CefGlue.Interop.Gen/include/cef_server.h index b868581f..07b603e1 100644 --- a/CefGlue.Interop.Gen/include/cef_server.h +++ b/CefGlue.Interop.Gen/include/cef_server.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_callback.h" #include "include/cef_request.h" diff --git a/CefGlue.Interop.Gen/include/cef_ssl_info.h b/CefGlue.Interop.Gen/include/cef_ssl_info.h index 67b9cdfd..f3f04e9d 100644 --- a/CefGlue.Interop.Gen/include/cef_ssl_info.h +++ b/CefGlue.Interop.Gen/include/cef_ssl_info.h @@ -40,7 +40,6 @@ #include "include/cef_base.h" #include "include/cef_values.h" - #include "include/cef_x509_certificate.h" /// diff --git a/CefGlue.Interop.Gen/include/cef_unresponsive_process_callback.h b/CefGlue.Interop.Gen/include/cef_unresponsive_process_callback.h new file mode 100644 index 00000000..436e4a1b --- /dev/null +++ b/CefGlue.Interop.Gen/include/cef_unresponsive_process_callback.h @@ -0,0 +1,62 @@ +// Copyright (c) 2024 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. +// +// --------------------------------------------------------------------------- +// +// The contents of this file must follow a specific format in order to +// support the CEF translator tool. See the translator.README.txt file in the +// tools directory for more information. +// + +#ifndef CEF_INCLUDE_CEF_UNRESPONSIVE_PROCESS_CALLBACK_H_ +#define CEF_INCLUDE_CEF_UNRESPONSIVE_PROCESS_CALLBACK_H_ +#pragma once + +#include "include/cef_base.h" + +/// +/// Callback interface for asynchronous handling of an unresponsive process. +/// +/*--cef(source=library)--*/ +class CefUnresponsiveProcessCallback : public virtual CefBaseRefCounted { + public: + /// + /// Reset the timeout for the unresponsive process. + /// + /*--cef()--*/ + virtual void Wait() = 0; + + /// + /// Terminate the unresponsive process. + /// + /*--cef()--*/ + virtual void Terminate() = 0; +}; + +#endif // CEF_INCLUDE_CEF_UNRESPONSIVE_PROCESS_CALLBACK_H_ diff --git a/CefGlue.Interop.Gen/include/cef_v8.h b/CefGlue.Interop.Gen/include/cef_v8.h index f6a01c1e..520444cb 100644 --- a/CefGlue.Interop.Gen/include/cef_v8.h +++ b/CefGlue.Interop.Gen/include/cef_v8.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" #include "include/cef_browser.h" #include "include/cef_frame.h" @@ -434,7 +435,6 @@ class CefV8ArrayBufferReleaseCallback : public virtual CefBaseRefCounted { /*--cef(source=library,no_debugct_check)--*/ class CefV8Value : public virtual CefBaseRefCounted { public: - typedef cef_v8_accesscontrol_t AccessControl; typedef cef_v8_propertyattribute_t PropertyAttribute; /// @@ -793,9 +793,7 @@ class CefV8Value : public virtual CefBaseRefCounted { /// will return true even though assignment failed. /// /*--cef(capi_name=set_value_byaccessor,optional_param=key)--*/ - virtual bool SetValue(const CefString& key, - AccessControl settings, - PropertyAttribute attribute) = 0; + virtual bool SetValue(const CefString& key, PropertyAttribute attribute) = 0; /// /// Read the keys for the object's values into the specified vector. Integer- diff --git a/CefGlue.Interop.Gen/include/cef_values.h b/CefGlue.Interop.Gen/include/cef_values.h index f7bcb79c..98bd3b38 100644 --- a/CefGlue.Interop.Gen/include/cef_values.h +++ b/CefGlue.Interop.Gen/include/cef_values.h @@ -39,6 +39,7 @@ #pragma once #include + #include "include/cef_base.h" class CefBinaryValue; diff --git a/CefGlue.Interop.Gen/include/cef_version.h b/CefGlue.Interop.Gen/include/cef_version.h index bde35633..2188a990 100644 --- a/CefGlue.Interop.Gen/include/cef_version.h +++ b/CefGlue.Interop.Gen/include/cef_version.h @@ -1,4 +1,4 @@ -// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2024 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 @@ -35,18 +35,18 @@ #ifndef CEF_INCLUDE_CEF_VERSION_H_ #define CEF_INCLUDE_CEF_VERSION_H_ -#define CEF_VERSION "120.1.8+ge6b45b0+chromium-120.0.6099.109" -#define CEF_VERSION_MAJOR 120 -#define CEF_VERSION_MINOR 1 -#define CEF_VERSION_PATCH 8 -#define CEF_COMMIT_NUMBER 2877 -#define CEF_COMMIT_HASH "e6b45b0c88512b3f5e24bc9007e019c5bee77819" -#define COPYRIGHT_YEAR 2023 +#define CEF_VERSION "126.2.18+g3647d39+chromium-126.0.6478.183" +#define CEF_VERSION_MAJOR 126 +#define CEF_VERSION_MINOR 2 +#define CEF_VERSION_PATCH 18 +#define CEF_COMMIT_NUMBER 3019 +#define CEF_COMMIT_HASH "3647d39e700c215bd78172c5964eb1c550950f0f" +#define COPYRIGHT_YEAR 2024 -#define CHROME_VERSION_MAJOR 120 +#define CHROME_VERSION_MAJOR 126 #define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 6099 -#define CHROME_VERSION_PATCH 109 +#define CHROME_VERSION_BUILD 6478 +#define CHROME_VERSION_PATCH 183 #define DO_MAKE_STRING(p) #p #define MAKE_STRING(p) DO_MAKE_STRING(p) diff --git a/CefGlue.Interop.Gen/include/internal/cef_string_wrappers.h b/CefGlue.Interop.Gen/include/internal/cef_string_wrappers.h index 44efeff1..7d20eef2 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_string_wrappers.h +++ b/CefGlue.Interop.Gen/include/internal/cef_string_wrappers.h @@ -31,7 +31,7 @@ #define CEF_INCLUDE_INTERNAL_CEF_STRING_WRAPPERS_H_ #pragma once -#include +#include #include #include "include/internal/cef_string_types.h" @@ -99,7 +99,7 @@ struct CefStringTraitsWide { static inline bool from_wstring(const std::wstring& str, struct_type* s) { return from_wstring(str.data(), str.length(), s); } -#if defined(WCHAR_T_IS_UTF32) +#if defined(WCHAR_T_IS_32_BIT) static inline std::u16string to_string16(const struct_type* s) { cef_string_utf16_t cstr; memset(&cstr, 0, sizeof(cstr)); @@ -120,7 +120,7 @@ struct CefStringTraitsWide { ? true : false; } -#else // WCHAR_T_IS_UTF32 +#elif defined(WCHAR_T_IS_16_BIT) static inline std::u16string to_string16(const struct_type* s) { return std::u16string( reinterpret_cast(s->str), s->length); @@ -133,7 +133,7 @@ struct CefStringTraitsWide { ? true : false; } -#endif // WCHAR_T_IS_UTF32 +#endif // WCHAR_T_IS_16_BIT static inline bool from_string16(const std::u16string& str, struct_type* s) { return from_string16(str.data(), str.length(), s); } @@ -271,7 +271,7 @@ struct CefStringTraitsUTF16 { static inline bool from_string(const std::string& str, struct_type* s) { return from_string(str.data(), str.length(), s); } -#if defined(WCHAR_T_IS_UTF32) +#if defined(WCHAR_T_IS_32_BIT) static inline std::wstring to_wstring(const struct_type* s) { cef_string_wide_t cstr; memset(&cstr, 0, sizeof(cstr)); @@ -288,7 +288,7 @@ struct CefStringTraitsUTF16 { struct_type* s) { return cef_string_wide_to_utf16(data, length, s) ? true : false; } -#else // WCHAR_T_IS_UTF32 +#elif defined(WCHAR_T_IS_16_BIT) static inline std::wstring to_wstring(const struct_type* s) { return std::wstring(reinterpret_cast(s->str), s->length); } @@ -300,7 +300,7 @@ struct CefStringTraitsUTF16 { ? true : false; } -#endif // WCHAR_T_IS_UTF32 +#endif // WCHAR_T_IS_16_BIT static inline bool from_wstring(const std::wstring& str, struct_type* s) { return from_wstring(str.data(), str.length(), s); } diff --git a/CefGlue.Interop.Gen/include/internal/cef_types.h b/CefGlue.Interop.Gen/include/internal/cef_types.h index a31d163f..9e41bcb9 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_types.h +++ b/CefGlue.Interop.Gen/include/internal/cef_types.h @@ -235,12 +235,14 @@ typedef struct _cef_settings_t { /// cef_string_t main_bundle_path; +#if !defined(DISABLE_ALLOY_BOOTSTRAP) /// /// Set to true (1) to enable use of the Chrome runtime in CEF. This feature /// is considered experimental and is not recommended for most users at this /// time. See issue #2969 for details. /// int chrome_runtime; +#endif /// /// Set to true (1) to have the browser process message loop run in a separate @@ -433,10 +435,14 @@ typedef struct _cef_settings_t { /// /// 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. 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. + /// 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 + /// /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; @@ -913,6 +919,16 @@ typedef enum { /// 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; /// @@ -1023,6 +1039,100 @@ typedef enum { CERT_STATUS_CT_COMPLIANCE_FAILED = 1 << 20, } cef_cert_status_t; +/// +/// Process result codes. This is not a comprehensive list, as result codes +/// might also include platform-specific crash values (Posix signal or Windows +/// hardware exception), or internal-only implementation values. +/// +typedef enum { + // The following values should be kept in sync with Chromium's + // content::ResultCode type. + + CEF_RESULT_CODE_NORMAL_EXIT, + + /// Process was killed by user or system. + CEF_RESULT_CODE_KILLED, + + /// Process hung. + CEF_RESULT_CODE_HUNG, + + /// A bad message caused the process termination. + CEF_RESULT_CODE_KILLED_BAD_MESSAGE, + + /// The GPU process exited because initialization failed. + CEF_RESULT_CODE_GPU_DEAD_ON_ARRIVAL, + + // The following values should be kept in sync with Chromium's + // chrome::ResultCode type. Unused chrome values are excluded. + + CEF_RESULT_CODE_CHROME_FIRST, + + /// A critical chrome file is missing. + CEF_RESULT_CODE_MISSING_DATA = 7, + + /// Command line parameter is not supported. + CEF_RESULT_CODE_UNSUPPORTED_PARAM = 13, + + /// The profile was in use on another host. + CEF_RESULT_CODE_PROFILE_IN_USE = 21, + + /// Failed to pack an extension via the command line. + CEF_RESULT_CODE_PACK_EXTENSION_ERROR = 22, + + /// The browser process exited early by passing the command line to another + /// running browser. + CEF_RESULT_CODE_NORMAL_EXIT_PROCESS_NOTIFIED = 24, + + /// A browser process was sandboxed. This should never happen. + CEF_RESULT_CODE_INVALID_SANDBOX_STATE = 31, + + /// Cloud policy enrollment failed or was given up by user. + CEF_RESULT_CODE_CLOUD_POLICY_ENROLLMENT_FAILED = 32, + + /// The GPU process was terminated due to context lost. + CEF_RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST = 34, + + /// An early startup command was executed and the browser must exit. + CEF_RESULT_CODE_NORMAL_EXIT_PACK_EXTENSION_SUCCESS = 36, + + /// The browser process exited because system resources are exhausted. The + /// system state can't be recovered and will be unstable. + CEF_RESULT_CODE_SYSTEM_RESOURCE_EXHAUSTED = 37, + + CEF_RESULT_CODE_CHROME_LAST = 39, + + // The following values should be kept in sync with Chromium's + // sandbox::TerminationCodes type. + + CEF_RESULT_CODE_SANDBOX_FATAL_FIRST = 7006, + + /// Windows sandbox could not set the integrity level. + CEF_RESULT_CODE_SANDBOX_FATAL_INTEGRITY = CEF_RESULT_CODE_SANDBOX_FATAL_FIRST, + + /// Windows sandbox could not lower the token. + CEF_RESULT_CODE_SANDBOX_FATAL_DROPTOKEN, + + /// Windows sandbox failed to flush registry handles. + CEF_RESULT_CODE_SANDBOX_FATAL_FLUSHANDLES, + + /// Windows sandbox failed to forbid HCKU caching. + CEF_RESULT_CODE_SANDBOX_FATAL_CACHEDISABLE, + + /// Windows sandbox failed to close pending handles. + CEF_RESULT_CODE_SANDBOX_FATAL_CLOSEHANDLES, + + /// Windows sandbox could not set the mitigation policy. + CEF_RESULT_CODE_SANDBOX_FATAL_MITIGATION, + + /// Windows sandbox exceeded the job memory limit. + CEF_RESULT_CODE_SANDBOX_FATAL_MEMORY_EXCEEDED, + + /// Windows sandbox failed to warmup. + CEF_RESULT_CODE_SANDBOX_FATAL_WARMUP, + + CEF_RESULT_CODE_SANDBOX_FATAL_LAST, +} cef_resultcode_t; + /// /// The manner in which a link click should be opened. These constants match /// their equivalents in Chromium's window_open_disposition.h and should not be @@ -1129,16 +1239,6 @@ typedef enum { CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH, } cef_text_input_mode_t; -/// -/// V8 access control values. -/// -typedef enum { - V8_ACCESS_CONTROL_DEFAULT = 0, - V8_ACCESS_CONTROL_ALL_CAN_READ = 1, - V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, - V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 -} cef_v8_accesscontrol_t; - /// /// V8 property attribute values. /// @@ -2332,6 +2432,7 @@ typedef enum { DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT, DOM_FORM_CONTROL_TYPE_BUTTON_RESET, DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST, + DOM_FORM_CONTROL_TYPE_BUTTON_POPOVER, DOM_FORM_CONTROL_TYPE_FIELDSET, DOM_FORM_CONTROL_TYPE_INPUT_BUTTON, DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX, @@ -2708,6 +2809,11 @@ typedef struct _cef_pdf_print_settings_t { /// Set to true (1) to generate tagged (accessible) PDF. /// int generate_tagged_pdf; + + /// + /// Set to true (1) to generate a document outline. + /// + int generate_document_outline; } cef_pdf_print_settings_t; /// @@ -2811,21 +2917,6 @@ typedef enum { RESPONSE_FILTER_ERROR } cef_response_filter_status_t; -/// -/// Describes how to interpret the components of a pixel. -/// -typedef enum { - /// - /// RGBA with 8 bits per pixel (32bits total). - /// - CEF_COLOR_TYPE_RGBA_8888, - - /// - /// BGRA with 8 bits per pixel (32bits total). - /// - CEF_COLOR_TYPE_BGRA_8888, -} cef_color_type_t; - /// /// Describes how to interpret the alpha component of a pixel. /// @@ -2858,51 +2949,22 @@ typedef enum { } cef_text_style_t; /// -/// Specifies where along the main axis the CefBoxLayout child views should be -/// laid out. +/// Specifies where along the axis the CefBoxLayout child views should be laid +/// out. Should be kept in sync with Chromium's views::LayoutAlignment type. /// typedef enum { - /// - /// Child views will be left-aligned. - /// - CEF_MAIN_AXIS_ALIGNMENT_START, + /// Child views will be left/top-aligned. + CEF_AXIS_ALIGNMENT_START, - /// /// Child views will be center-aligned. - /// - CEF_MAIN_AXIS_ALIGNMENT_CENTER, + CEF_AXIS_ALIGNMENT_CENTER, - /// - /// Child views will be right-aligned. - /// - CEF_MAIN_AXIS_ALIGNMENT_END, -} cef_main_axis_alignment_t; + /// Child views will be right/bottom-aligned. + CEF_AXIS_ALIGNMENT_END, -/// -/// Specifies where along the cross axis the CefBoxLayout child views should be -/// laid out. -/// -typedef enum { - /// /// Child views will be stretched to fit. - /// - CEF_CROSS_AXIS_ALIGNMENT_STRETCH, - - /// - /// Child views will be left-aligned. - /// - CEF_CROSS_AXIS_ALIGNMENT_START, - - /// - /// Child views will be center-aligned. - /// - CEF_CROSS_AXIS_ALIGNMENT_CENTER, - - /// - /// Child views will be right-aligned. - /// - CEF_CROSS_AXIS_ALIGNMENT_END, -} cef_cross_axis_alignment_t; + CEF_AXIS_ALIGNMENT_STRETCH, +} cef_axis_alignment_t; /// /// Settings used when initializing a CefBoxLayout. @@ -2939,12 +3001,12 @@ typedef struct _cef_box_layout_settings_t { /// /// Specifies where along the main axis the child views should be laid out. /// - cef_main_axis_alignment_t main_axis_alignment; + cef_axis_alignment_t main_axis_alignment; /// /// Specifies where along the cross axis the child views should be laid out. /// - cef_cross_axis_alignment_t cross_axis_alignment; + cef_axis_alignment_t cross_axis_alignment; /// /// Minimum cross axis size. @@ -3213,64 +3275,65 @@ typedef enum { /// Front L, Front R, Front C, LFE, Back L, Back R CEF_CHANNEL_LAYOUT_5_1_BACK = 12, - /// Front L, Front R, Front C, Side L, Side R, Back L, Back R + /// Front L, Front R, Front C, Back L, Back R, Side L, Side R CEF_CHANNEL_LAYOUT_7_0 = 13, - /// Front L, Front R, Front C, LFE, Side L, Side R, Back L, Back R + /// Front L, Front R, Front C, LFE, Back L, Back R, Side L, Side R CEF_CHANNEL_LAYOUT_7_1 = 14, - /// Front L, Front R, Front C, LFE, Side L, Side R, Front LofC, Front RofC + /// Front L, Front R, Front C, LFE, Front LofC, Front RofC, Side L, Side R CEF_CHANNEL_LAYOUT_7_1_WIDE = 15, - /// Stereo L, Stereo R + /// Front L, Front R CEF_CHANNEL_LAYOUT_STEREO_DOWNMIX = 16, - /// Stereo L, Stereo R, LFE + /// Front L, Front R, LFE CEF_CHANNEL_LAYOUT_2POINT1 = 17, - /// Stereo L, Stereo R, Front C, LFE + /// Front L, Front R, Front C, LFE CEF_CHANNEL_LAYOUT_3_1 = 18, - /// Stereo L, Stereo R, Front C, Rear C, LFE + /// Front L, Front R, Front C, LFE, Back C CEF_CHANNEL_LAYOUT_4_1 = 19, - /// Stereo L, Stereo R, Front C, Side L, Side R, Back C + /// Front L, Front R, Front C, Back C, Side L, Side R CEF_CHANNEL_LAYOUT_6_0 = 20, - /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC + /// Front L, Front R, Front LofC, Front RofC, Side L, Side R CEF_CHANNEL_LAYOUT_6_0_FRONT = 21, - /// Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C + /// Front L, Front R, Front C, Back L, Back R, Back C CEF_CHANNEL_LAYOUT_HEXAGONAL = 22, - /// Stereo L, Stereo R, Front C, LFE, Side L, Side R, Rear Center + /// Front L, Front R, Front C, LFE, Back C, Side L, Side R CEF_CHANNEL_LAYOUT_6_1 = 23, - /// Stereo L, Stereo R, Front C, LFE, Back L, Back R, Rear Center + /// Front L, Front R, Front C, LFE, Back L, Back R, Back C CEF_CHANNEL_LAYOUT_6_1_BACK = 24, - /// Stereo L, Stereo R, Side L, Side R, Front LofC, Front RofC, LFE + /// Front L, Front R, LFE, Front LofC, Front RofC, Side L, Side R CEF_CHANNEL_LAYOUT_6_1_FRONT = 25, - /// Front L, Front R, Front C, Side L, Side R, Front LofC, Front RofC + /// Front L, Front R, Front C, Front LofC, Front RofC, Side L, Side R CEF_CHANNEL_LAYOUT_7_0_FRONT = 26, /// Front L, Front R, Front C, LFE, Back L, Back R, Front LofC, Front RofC CEF_CHANNEL_LAYOUT_7_1_WIDE_BACK = 27, - /// Front L, Front R, Front C, Side L, Side R, Rear L, Back R, Back C. + /// Front L, Front R, Front C, Back L, Back R, Back C, Side L, Side R CEF_CHANNEL_LAYOUT_OCTAGONAL = 28, /// Channels are not explicitly mapped to speakers. CEF_CHANNEL_LAYOUT_DISCRETE = 29, + /// Deprecated, but keeping the enum value for UMA consistency. /// Front L, Front R, Front C. Front C contains the keyboard mic audio. This /// layout is only intended for input for WebRTC. The Front C channel /// is stripped away in the WebRTC audio input pipeline and never seen outside /// of that. CEF_CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30, - /// Front L, Front R, Side L, Side R, LFE + /// Front L, Front R, LFE, Side L, Side R CEF_CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31, /// Actual channel layout is specified in the bitstream and the actual channel @@ -3284,8 +3347,14 @@ typedef enum { /// kMaxConcurrentChannels CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX = 33, + /// Front C, LFE + CEF_CHANNEL_LAYOUT_1_1 = 34, + + /// Front L, Front R, LFE, Back C + CEF_CHANNEL_LAYOUT_3_1_BACK = 35, + /// Max value, must always equal the largest entry ever logged. - CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_5_1_4_DOWNMIX + CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_3_1_BACK } cef_channel_layout_t; /// @@ -3394,18 +3463,18 @@ typedef enum { CEF_CPAIT_COOKIE_CONTROLS, CEF_CPAIT_FILE_SYSTEM_ACCESS, CEF_CPAIT_FIND, - CEF_CPAIT_HIGH_EFFICIENCY, + CEF_CPAIT_MEMORY_SAVER, CEF_CPAIT_INTENT_PICKER, CEF_CPAIT_LOCAL_CARD_MIGRATION, CEF_CPAIT_MANAGE_PASSWORDS, CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION, CEF_CPAIT_PRICE_TRACKING, CEF_CPAIT_PWA_INSTALL, - CEF_CPAIT_QR_CODE_GENERATOR, - CEF_CPAIT_READER_MODE, + CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED, + CEF_CPAIT_READER_MODE_DEPRECATED, CEF_CPAIT_SAVE_AUTOFILL_ADDRESS, CEF_CPAIT_SAVE_CARD, - CEF_CPAIT_SEND_TAB_TO_SELF, + CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED, CEF_CPAIT_SHARING_HUB, CEF_CPAIT_SIDE_SEARCH, CEF_CPAIT_SMS_REMOTE_FETCHER, @@ -3416,7 +3485,10 @@ typedef enum { CEF_CPAIT_SAVE_IBAN, CEF_CPAIT_MANDATORY_REAUTH, CEF_CPAIT_PRICE_INSIGHTS, - CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_INSIGHTS, + CEF_CPAIT_PRICE_READ_ANYTHING, + CEF_CPAIT_PRODUCT_SPECIFICATIONS, + CEF_CPAIT_LENS_OVERLAY, + CEF_CPAIT_MAX_VALUE = CEF_CPAIT_LENS_OVERLAY, } cef_chrome_page_action_icon_type_t; /// @@ -3446,10 +3518,21 @@ typedef enum { /// Show states supported by CefWindowDelegate::GetInitialShowState. /// typedef enum { + // Show the window as normal. CEF_SHOW_STATE_NORMAL = 1, + + // Show the window as minimized. CEF_SHOW_STATE_MINIMIZED, + + // Show the window as maximized. CEF_SHOW_STATE_MAXIMIZED, + + // Show the window as fullscreen. CEF_SHOW_STATE_FULLSCREEN, + + // Show the window as hidden (no dock thumbnail). + // Only supported on MacOS. + CEF_SHOW_STATE_HIDDEN, } cef_show_state_t; /// @@ -3539,23 +3622,26 @@ typedef enum { CEF_PERMISSION_TYPE_AR_SESSION = 1 << 1, CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2, CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3, - CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4, - CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5, - CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6, - CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7, - CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8, - CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9, - CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10, - CEF_PERMISSION_TYPE_MIDI = 1 << 11, - CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 12, - CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 13, - CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 14, - CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 15, - CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 16, - CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17, - CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18, - CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19, - CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 20, + CEF_PERMISSION_TYPE_CAPTURED_SURFACE_CONTROL = 1 << 4, + CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 5, + CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 6, + CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 7, + CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 8, + CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 9, + CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 << 10, + CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 11, + CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 12, + CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 13, + CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 14, + CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 15, + CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 << 16, + CEF_PERMISSION_TYPE_POINTER_LOCK = 1 << 17, + CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 18, + CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 19, + CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 20, + CEF_PERMISSION_TYPE_VR_SESSION = 1 << 21, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 22, + CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 23, } cef_permission_request_types_t; /// @@ -3749,6 +3835,20 @@ typedef enum { CEF_ZOOM_COMMAND_IN, } cef_zoom_command_t; +/// +/// Specifies the color variants supported by +/// CefRequestContext::SetChromeThemeColor. +/// +typedef enum { + CEF_COLOR_VARIANT_SYSTEM, + CEF_COLOR_VARIANT_LIGHT, + CEF_COLOR_VARIANT_DARK, + CEF_COLOR_VARIANT_TONAL_SPOT, + CEF_COLOR_VARIANT_NEUTRAL, + CEF_COLOR_VARIANT_VIBRANT, + CEF_COLOR_VARIANT_EXPRESSIVE, +} cef_color_variant_t; + #ifdef __cplusplus } #endif diff --git a/CefGlue.Interop.Gen/include/internal/cef_types_color.h b/CefGlue.Interop.Gen/include/internal/cef_types_color.h new file mode 100644 index 00000000..e01b25aa --- /dev/null +++ b/CefGlue.Interop.Gen/include/internal/cef_types_color.h @@ -0,0 +1,57 @@ +// Copyright (c) 2024 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_COLOR_H_ +#define CEF_INCLUDE_INTERNAL_CEF_TYPES_COLOR_H_ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/// +/// Describes how to interpret the components of a pixel. +/// +typedef enum { + /// + /// RGBA with 8 bits per pixel (32bits total). + /// + CEF_COLOR_TYPE_RGBA_8888, + + /// + /// BGRA with 8 bits per pixel (32bits total). + /// + CEF_COLOR_TYPE_BGRA_8888, +} cef_color_type_t; + +#ifdef __cplusplus +} +#endif + +#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_COLOR_H_ diff --git a/CefGlue.Interop.Gen/include/internal/cef_types_content_settings.h b/CefGlue.Interop.Gen/include/internal/cef_types_content_settings.h index a8289bfd..1e669dcd 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_types_content_settings.h +++ b/CefGlue.Interop.Gen/include/internal/cef_types_content_settings.h @@ -251,8 +251,7 @@ typedef enum { /// use by the File System Access API. CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_LAST_PICKED_DIRECTORY, - /// Controls access to the getDisplayMedia API when {preferCurrentTab: true} - /// is specified. + /// Controls access to the getDisplayMedia API. CEF_CONTENT_SETTING_TYPE_DISPLAY_CAPTURE, /// Website setting to store permissions metadata granted to paths on the @@ -289,7 +288,8 @@ typedef enum { /// a specified account. When this is present it allows access to session /// management capabilities between the sites. This setting is associated /// with the relying party's origin. - CEF_CONTENT_SETTING_TYPE_FEDERATED_IDENTITY_ACTIVE_SESSION, + // Obsolete on Nov 2023. + CEF_CONTENT_SETTING_TYPE_DEPRECATED_FEDERATED_IDENTITY_ACTIVE_SESSION, /// Setting to indicate whether Chrome should automatically apply darkening to /// web content. @@ -362,29 +362,88 @@ typedef enum { /// Stores per origin metadata for cookie controls. CEF_CONTENT_SETTING_TYPE_COOKIE_CONTROLS_METADATA, - /// Content Setting for 3PC accesses granted via 3PC deprecation trial. - CEF_CONTENT_SETTING_TYPE_TPCD_SUPPORT, - - /// Content setting used to indicate whether entering picture-in-picture - /// automatically should be enabled. - CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE, + /// Content Setting for temporary 3PC accesses granted by user behavior + /// heuristics. + CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS, /// Content Setting for 3PC accesses granted by metadata delivered via the /// component updater service. This type will only be used when /// `net::features::kTpcdMetadataGrants` is enabled. CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS, + /// Content Setting for 3PC accesses granted via 3PC deprecation trial. + CEF_CONTENT_SETTING_TYPE_TPCD_TRIAL, + + /// Content Setting for 3PC accesses granted via top-level 3PC deprecation + /// trial. Similar to TPCD_TRIAL, but applicable at the page-level for the + /// lifetime of the page that served the token, rather than being specific to + /// a requesting-origin/top-level-site combination and persistent. + CEF_CONTENT_SETTING_TYPE_TOP_LEVEL_TPCD_TRIAL, + + /// Content Setting for a first-party origin trial that allows websites to + /// enable third-party cookie deprecation. + /// ALLOW (default): no effect (e.g. third-party cookies allowed, if not + /// blocked otherwise). + /// BLOCK: third-party cookies blocked, but 3PCD mitigations enabled. + CEF_CONTENT_SETTING_TOP_LEVEL_TPCD_ORIGIN_TRIAL, + + /// Content setting used to indicate whether entering picture-in-picture + /// automatically should be enabled. + CEF_CONTENT_SETTING_TYPE_AUTO_PICTURE_IN_PICTURE, + /// Whether user has opted into keeping file/directory permissions persistent /// between visits for a given origin. When enabled, permission metadata /// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming /// permission request. CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION, - /// Content Setting for temporary 3PC accesses granted by user behavior - /// heuristics. - CEF_CONTENT_SETTING_TYPE_TPCD_HEURISTICS_GRANTS, + /// Whether the FSA Persistent Permissions restore prompt is eligible to be + /// shown to the user, for a given origin. + CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, + + /// Whether an application capturing another tab, may scroll and zoom + /// the captured tab. + CEF_CONTENT_SETTING_TYPE_CAPTURED_SURFACE_CONTROL, + + /// Content setting for access to smart card readers. + /// The "guard" content setting stores whether to allow sites to access the + /// Smart Card API. + CEF_CONTENT_SETTING_TYPE_SMART_CARD_GUARD, + CEF_CONTENT_SETTING_TYPE_SMART_CARD_DATA, + + /// Content settings for access to printers for the Web Printing API. + CEF_CONTENT_SETTING_TYPE_WEB_PRINTING, + + /// Content setting used to indicate whether entering HTML Fullscreen + /// automatically (i.e. without transient activation) should be enabled. + CEF_CONTENT_SETTING_TYPE_AUTOMATIC_FULLSCREEN, + + /// Content settings used to indicate that a web app is allowed to prompt the + /// user for the installation of sub apps. + CEF_CONTENT_SETTING_TYPE_SUB_APP_INSTALLATION_PROMPTS, + + /// Whether an application can enumerate audio output device. + CEF_CONTENT_SETTING_TYPE_SPEAKER_SELECTION, + + /// Content settings for access to the Direct Sockets API. + CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS, + + /// Keyboard Lock API allows a site to capture keyboard inputs that would + /// otherwise be handled by the OS or the browser. + CEF_CONTENT_SETTING_TYPE_KEYBOARD_LOCK, + + /// Pointer Lock API allows a site to hide the cursor and have exclusive + /// access to mouse inputs. + CEF_CONTENT_SETTING_TYPE_POINTER_LOCK, + + /// Website setting which is used for UnusedSitePermissionsService to store + /// auto-revoked notification permissions from abusive sites. + REVOKED_ABUSIVE_NOTIFICATION_PERMISSIONS, - CEF_CONTENT_SETTING_TYPE_NUM_TYPES, + /// Content setting that controls tracking protection status per site. + /// BLOCK: Protections enabled. This is the default state. + /// ALLOW: Protections disabled. + TRACKING_PROTECTION, } cef_content_setting_types_t; /// diff --git a/CefGlue.Interop.Gen/include/internal/cef_types_runtime.h b/CefGlue.Interop.Gen/include/internal/cef_types_runtime.h new file mode 100644 index 00000000..20871b3f --- /dev/null +++ b/CefGlue.Interop.Gen/include/internal/cef_types_runtime.h @@ -0,0 +1,88 @@ +// Copyright (c) 2024 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_RUNTIME_H_ +#define CEF_INCLUDE_INTERNAL_CEF_TYPES_RUNTIME_H_ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/// +/// CEF supports both a Chrome runtime (based on the Chrome UI layer) and an +/// Alloy runtime (based on the Chromium content layer). The Chrome runtime +/// provides the full Chrome UI and browser functionality whereas the Alloy +/// runtime provides less default browser functionality but adds additional +/// client callbacks and support for windowless (off-screen) rendering. For +/// additional comparative details on runtime types see +/// https://bitbucket.org/chromiumembedded/cef/wiki/Architecture.md#markdown-header-cef3 +/// +/// Each runtime is composed of a bootstrap component and a style component. The +/// bootstrap component is configured via CefSettings.chrome_runtime and cannot +/// be changed after CefInitialize. The style component is individually +/// configured for each window/browser at creation time and, in combination with +/// the Chrome bootstrap, different styles can be mixed during runtime. +/// +/// Windowless rendering will always use Alloy style. Windowed rendering with a +/// default window or client-provided parent window can configure the style via +/// CefWindowInfo.runtime_style. Windowed rendering with the Views framework can +/// configure the style via CefWindowDelegate::GetWindowRuntimeStyle and +/// CefBrowserViewDelegate::GetBrowserRuntimeStyle. Alloy style Windows with the +/// Views framework can host only Alloy style BrowserViews but Chrome style +/// Windows can host both style BrowserViews. Additionally, a Chrome style +/// Window can host at most one Chrome style BrowserView but potentially +/// multiple Alloy style BrowserViews. See CefWindowInfo.runtime_style +/// documentation for any additional platform-specific limitations. +/// +typedef enum { + /// + /// Use the default runtime style. The default style will match the + /// CefSettings.chrome_runtime value in most cases. See above documentation + /// for exceptions. + /// + CEF_RUNTIME_STYLE_DEFAULT, + + /// + /// Use the Chrome runtime style. Only supported with the Chrome runtime. + /// + CEF_RUNTIME_STYLE_CHROME, + + /// + /// Use the Alloy runtime style. Supported with both the Alloy and Chrome + /// runtime. + /// + CEF_RUNTIME_STYLE_ALLOY, +} cef_runtime_style_t; + +#ifdef __cplusplus +} +#endif + +#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_RUNTIME_H_ diff --git a/CefGlue.Interop.Gen/include/internal/cef_types_win.h b/CefGlue.Interop.Gen/include/internal/cef_types_win.h index abf80c7d..eeb3a069 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_types_win.h +++ b/CefGlue.Interop.Gen/include/internal/cef_types_win.h @@ -37,12 +37,15 @@ #include #include "include/internal/cef_string.h" +#include "include/internal/cef_types_color.h" #include "include/internal/cef_types_geometry.h" +#include "include/internal/cef_types_runtime.h" // Handle types. #define cef_cursor_handle_t HCURSOR #define cef_event_handle_t MSG* #define cef_window_handle_t HWND +#define cef_shared_texture_handle_t HANDLE #define kNullCursorHandle NULL #define kNullEventHandle NULL @@ -102,8 +105,33 @@ typedef struct _cef_window_info_t { /// Handle for the new browser window. Only used with windowed rendering. /// cef_window_handle_t window; + + /// + /// Optionally change the runtime style. Alloy style will always be used if + /// |windowless_rendering_enabled| is true. See cef_runtime_style_t + /// documentation for details. + /// + cef_runtime_style_t runtime_style; } cef_window_info_t; +/// +/// Structure containing shared texture information for the OnAcceleratedPaint +/// callback. Resources will be released to the underlying pool for reuse when +/// the callback returns from client code. +/// +typedef struct _cef_accelerated_paint_info_t { + /// + /// Handle for the shared texture. The shared texture is instantiated + /// without a keyed mutex. + /// + cef_shared_texture_handle_t shared_texture_handle; + + /// + /// The pixel format of the texture. + /// + cef_color_type_t format; +} cef_accelerated_paint_info_t; + #ifdef __cplusplus } #endif diff --git a/CefGlue.Interop.Gen/include/internal/cef_types_wrappers.h b/CefGlue.Interop.Gen/include/internal/cef_types_wrappers.h index 233e7900..9cc58f6c 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_types_wrappers.h +++ b/CefGlue.Interop.Gen/include/internal/cef_types_wrappers.h @@ -387,7 +387,9 @@ struct CefSettingsTraits { &target->framework_dir_path, copy); cef_string_set(src->main_bundle_path.str, src->main_bundle_path.length, &target->main_bundle_path, copy); +#if !defined(DISABLE_ALLOY_BOOTSTRAP) target->chrome_runtime = src->chrome_runtime; +#endif target->multi_threaded_message_loop = src->multi_threaded_message_loop; target->external_message_pump = src->external_message_pump; target->windowless_rendering_enabled = src->windowless_rendering_enabled; @@ -683,6 +685,7 @@ struct CefPdfPrintSettingsTraits { &target->footer_template, copy); target->generate_tagged_pdf = src->generate_tagged_pdf; + target->generate_document_outline = src->generate_document_outline; } }; @@ -696,7 +699,9 @@ using CefPdfPrintSettings = CefStructBase; /// class CefBoxLayoutSettings : public cef_box_layout_settings_t { public: - CefBoxLayoutSettings() : cef_box_layout_settings_t{} {} + CefBoxLayoutSettings() : cef_box_layout_settings_t{} { + cross_axis_alignment = CEF_AXIS_ALIGNMENT_STRETCH; + } CefBoxLayoutSettings(const cef_box_layout_settings_t& r) : cef_box_layout_settings_t(r) {} }; @@ -747,4 +752,14 @@ struct CefMediaSinkDeviceInfoTraits { /// using CefMediaSinkDeviceInfo = CefStructBase; +/// +/// Class representing accelerated paint info. +/// +class CefAcceleratedPaintInfo : public cef_accelerated_paint_info_t { + public: + CefAcceleratedPaintInfo() : cef_accelerated_paint_info_t{} {} + CefAcceleratedPaintInfo(const cef_accelerated_paint_info_t& r) + : cef_accelerated_paint_info_t(r) {} +}; + #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ diff --git a/CefGlue.Interop.Gen/include/internal/cef_win.h b/CefGlue.Interop.Gen/include/internal/cef_win.h index a37d21c5..8844cfd7 100644 --- a/CefGlue.Interop.Gen/include/internal/cef_win.h +++ b/CefGlue.Interop.Gen/include/internal/cef_win.h @@ -73,6 +73,7 @@ struct CefWindowInfoTraits { target->shared_texture_enabled = src->shared_texture_enabled; target->external_begin_frame_enabled = src->external_begin_frame_enabled; target->window = src->window; + target->runtime_style = src->runtime_style; } }; @@ -130,6 +131,7 @@ class CefWindowInfo : public CefStructBase { void SetAsWindowless(CefWindowHandle parent) { windowless_rendering_enabled = TRUE; parent_window = parent; + runtime_style = CEF_RUNTIME_STYLE_ALLOY; } }; diff --git a/CefGlue.Interop.Gen/include/wrapper/cef_byte_read_handler.h b/CefGlue.Interop.Gen/include/wrapper/cef_byte_read_handler.h index 5dd04162..bb1f84fb 100644 --- a/CefGlue.Interop.Gen/include/wrapper/cef_byte_read_handler.h +++ b/CefGlue.Interop.Gen/include/wrapper/cef_byte_read_handler.h @@ -60,16 +60,16 @@ class CefByteReadHandler : public CefReadHandler { CefByteReadHandler& operator=(const CefByteReadHandler&) = delete; // CefReadHandler methods. - virtual size_t Read(void* ptr, size_t size, size_t n) override; - virtual int Seek(int64_t offset, int whence) override; - virtual int64_t Tell() override; - virtual int Eof() override; - virtual bool MayBlock() override { return false; } + size_t Read(void* ptr, size_t size, size_t n) override; + int Seek(int64_t offset, int whence) override; + int64_t Tell() override; + int Eof() override; + bool MayBlock() override { return false; } private: const unsigned char* bytes_; int64_t size_; - int64_t offset_; + int64_t offset_ = 0; CefRefPtr source_; base::Lock lock_; diff --git a/CefGlue.Interop.Gen/include/wrapper/cef_helpers.h b/CefGlue.Interop.Gen/include/wrapper/cef_helpers.h index 4917c88a..38048800 100644 --- a/CefGlue.Interop.Gen/include/wrapper/cef_helpers.h +++ b/CefGlue.Interop.Gen/include/wrapper/cef_helpers.h @@ -144,7 +144,7 @@ class CefScopedArgArray { values_[i] = argv[i]; array_[i] = const_cast(values_[i].c_str()); } - array_[argc] = NULL; + array_[argc] = nullptr; } CefScopedArgArray(const CefScopedArgArray&) = delete; diff --git a/CefGlue.Interop.Gen/include/wrapper/cef_message_router.h b/CefGlue.Interop.Gen/include/wrapper/cef_message_router.h index 6897603f..6c1a96a1 100644 --- a/CefGlue.Interop.Gen/include/wrapper/cef_message_router.h +++ b/CefGlue.Interop.Gen/include/wrapper/cef_message_router.h @@ -347,7 +347,7 @@ class CefMessageRouterBrowserSide CefRefPtr frame, int64_t query_id) {} - virtual ~Handler() {} + virtual ~Handler() = default; }; /// @@ -435,7 +435,7 @@ class CefMessageRouterBrowserSide protected: // Protect against accidental deletion of this object. friend class base::RefCountedThreadSafe; - virtual ~CefMessageRouterBrowserSide() {} + virtual ~CefMessageRouterBrowserSide() = default; }; /// @@ -491,7 +491,7 @@ class CefMessageRouterRendererSide protected: // Protect against accidental deletion of this object. friend class base::RefCountedThreadSafe; - virtual ~CefMessageRouterRendererSide() {} + virtual ~CefMessageRouterRendererSide() = default; }; #endif // CEF_INCLUDE_WRAPPER_CEF_MESSAGE_ROUTER_H_ diff --git a/CefGlue.Interop.Gen/include/wrapper/cef_resource_manager.h b/CefGlue.Interop.Gen/include/wrapper/cef_resource_manager.h index f524b714..5cb01fea 100644 --- a/CefGlue.Interop.Gen/include/wrapper/cef_resource_manager.h +++ b/CefGlue.Interop.Gen/include/wrapper/cef_resource_manager.h @@ -206,7 +206,7 @@ class CefResourceManager /// virtual void OnRequestCanceled(scoped_refptr request) {} - virtual ~Provider() {} + virtual ~Provider() = default; }; CefResourceManager(); diff --git a/CefGlue.Interop.Gen/include/wrapper/cef_xml_object.h b/CefGlue.Interop.Gen/include/wrapper/cef_xml_object.h index 36130984..61731cc1 100644 --- a/CefGlue.Interop.Gen/include/wrapper/cef_xml_object.h +++ b/CefGlue.Interop.Gen/include/wrapper/cef_xml_object.h @@ -184,7 +184,7 @@ class CefXmlObject : public base::RefCountedThreadSafe { void SetParent(CefXmlObject* parent); CefString name_; - CefXmlObject* parent_; + CefXmlObject* parent_ = nullptr; CefString value_; AttributeMap attributes_; ObjectVector children_; diff --git a/CefGlue.Interop.Gen/schema.py b/CefGlue.Interop.Gen/schema.py index 3877a40a..a54766cf 100644 --- a/CefGlue.Interop.Gen/schema.py +++ b/CefGlue.Interop.Gen/schema.py @@ -86,6 +86,7 @@ 'cef_touch_handle_state_t': 'cef_touch_handle_state_t', 'cef_basetime_t': 'CefBaseTime', 'cef_time_t': 'CefTime', + 'cef_accelerated_paint_info_t': 'cef_accelerated_paint_info_t', # platform dependend structs 'cef_main_args_t': 'cef_main_args_t', @@ -98,7 +99,7 @@ 'cef_cursor_type_t': 'CefCursorType', - 'cef_range_t': 'cef_range_t', + 'cef_range_t': 'cef_range_t', 'cef_channel_layout_t': 'CefChannelLayout', 'cef_text_input_mode_t': 'CefTextInputMode', } @@ -154,16 +155,16 @@ 'cef_json_writer_options_t': 'CefJsonWriterOptions', 'cef_json_parser_error_t': 'CefJsonParserError', 'cef_pdf_print_margin_type_t': 'CefPdfPrintMarginType', - 'cef_scale_factor_t': 'CefScaleFactor', - 'cef_plugin_policy_t': 'CefPluginPolicy', + 'cef_scale_factor_t': 'CefScaleFactor', + 'cef_plugin_policy_t': 'CefPluginPolicy', 'cef_cert_status_t': 'CefCertStatus', 'cef_response_filter_status_t': 'CefResponseFilterStatus', 'cef_referrer_policy_t': 'CefReferrerPolicy', - 'cef_color_type_t': 'CefColorType', - 'cef_alpha_type_t': 'CefAlphaType', + 'cef_color_type_t': 'CefColorType', + 'cef_alpha_type_t': 'CefAlphaType', 'cef_cdm_registration_error_t': 'CefCdmRegistrationError', - 'cef_ssl_version_t': 'CefSslVersion', - 'cef_ssl_content_status_t': 'CefSslContentStatus', + 'cef_ssl_version_t': 'CefSslVersion', + 'cef_ssl_content_status_t': 'CefSslContentStatus', 'cef_menu_color_type_t': 'CefMenuColorType', 'cef_state_t': 'CefState', 'cef_media_route_connection_state_t': 'CefMediaRouteConnectionState', @@ -182,7 +183,9 @@ 'cef_content_setting_types_t': 'CefContentSettingType', 'cef_content_setting_values_t': 'CefContentSettingValue', 'cef_zoom_command_t': 'CefZoomCommand', - 'cef_dom_form_control_type_t': 'CefDomFormControlType' + 'cef_dom_form_control_type_t': 'CefDomFormControlType', + 'cef_runtime_style_t': 'CefRuntimeStyle', + 'cef_color_variant_t': 'CefColorVariant' } c2cs_structtypes = { } diff --git a/CefGlue.Interop.Gen/schema_cef3.py b/CefGlue.Interop.Gen/schema_cef3.py index 5e1fcb4c..cdb91ef7 100644 --- a/CefGlue.Interop.Gen/schema_cef3.py +++ b/CefGlue.Interop.Gen/schema_cef3.py @@ -185,4 +185,6 @@ # 108 'CefPreferenceRegistrar': { 'role': ROLE_PROXY }, 'CefPreferenceManager': { 'role': ROLE_PROXY, 'abstract': True }, + # 126 + 'CefUnresponsiveProcessCallback': { 'role': ROLE_PROXY }, } diff --git a/CefGlue/CefGlue.g.props b/CefGlue/CefGlue.g.props new file mode 100644 index 00000000..77cc9fe0 --- /dev/null +++ b/CefGlue/CefGlue.g.props @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CefGlue/Classes.Handlers/CefBrowserProcessHandler.cs b/CefGlue/Classes.Handlers/CefBrowserProcessHandler.cs index b82f12b1..dc74f13d 100644 --- a/CefGlue/Classes.Handlers/CefBrowserProcessHandler.cs +++ b/CefGlue/Classes.Handlers/CefBrowserProcessHandler.cs @@ -1,9 +1,5 @@ namespace Xilium.CefGlue { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -71,7 +67,7 @@ private void on_before_child_process_launch(cef_browser_process_handler_t* self, { CheckSelf(self); - using (var m_commandLine = CefCommandLine.FromNative(command_line)) + using (var m_commandLine = CefCommandLine.FromNative(command_line)) { OnBeforeChildProcessLaunch(m_commandLine); } @@ -92,7 +88,7 @@ private int on_already_running_app_relaunch(cef_browser_process_handler_t* self, { CheckSelf(self); - using (var m_commandLine = CefCommandLine.FromNative(command_line)) + using (var m_commandLine = CefCommandLine.FromNative(command_line)) { return OnAlreadyRunningAppRelaunch(m_commandLine, cef_string_t.ToString(current_directory)) ? 1 : 0; } @@ -142,7 +138,6 @@ private void on_schedule_message_pump_work(cef_browser_process_handler_t* self, /// protected virtual void OnScheduleMessagePumpWork(long delayMs) { } - private cef_client_t* get_default_client(cef_browser_process_handler_t* self) { CheckSelf(self); @@ -159,6 +154,26 @@ protected virtual void OnScheduleMessagePumpWork(long delayMs) { } /// the browser window is closed manually. This method is currently only used /// with the chrome runtime. /// - protected virtual CefClient GetDefaultClient() => null; + protected virtual CefClient GetDefaultClient() => null; + + private cef_request_context_handler_t* get_default_request_context_handler(cef_browser_process_handler_t* self) + { + CheckSelf(self); + + var result = GetDefaultRequestContextHandler(); + return result != null ? result.ToNative() : null; + } + + /// + /// Return the default handler for use with a new user or incognito profile + /// (CefRequestContext object). If null is returned the CefRequestContext will + /// be unmanaged (no callbacks will be executed for that CefRequestContext). + /// This method is currently only used with the Chrome runtime when creating + /// new browser windows via Chrome UI. + /// + protected virtual CefRequestContextHandler GetDefaultRequestContextHandler() + { + return null; + } } } diff --git a/CefGlue/Classes.Handlers/CefDialogHandler.cs b/CefGlue/Classes.Handlers/CefDialogHandler.cs index 8125ac81..dc40c12c 100644 --- a/CefGlue/Classes.Handlers/CefDialogHandler.cs +++ b/CefGlue/Classes.Handlers/CefDialogHandler.cs @@ -1,9 +1,5 @@ namespace Xilium.CefGlue { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -12,7 +8,7 @@ /// public abstract unsafe partial class CefDialogHandler { - private int on_file_dialog(cef_dialog_handler_t* self, cef_browser_t* browser, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_file_dialog_callback_t* callback) + private int on_file_dialog(cef_dialog_handler_t* self, cef_browser_t* browser, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_string_list* accept_extensions, cef_string_list* accept_descriptions, cef_file_dialog_callback_t* callback) { CheckSelf(self); @@ -20,28 +16,37 @@ private int on_file_dialog(cef_dialog_handler_t* self, cef_browser_t* browser, C var mTitle = cef_string_t.ToString(title); var mDefaultFilePath = cef_string_t.ToString(default_file_path); var mAcceptFilters = cef_string_list.ToArray(accept_filters); + var mAcceptExtensions = cef_string_list.ToArray(accept_extensions); + var mAcceptDescriptions = cef_string_list.ToArray(accept_descriptions); var mCallback = CefFileDialogCallback.FromNative(callback); - var result = OnFileDialog(mBrowser, mode, mTitle, mDefaultFilePath, mAcceptFilters, mCallback); + var result = OnFileDialog(mBrowser, mode, mTitle, mDefaultFilePath, mAcceptFilters, mAcceptExtensions, mAcceptDescriptions, mCallback); return result ? 1 : 0; - } - + } + /// /// Called to run a file chooser dialog. |mode| represents the type of dialog /// to display. |title| to the title to be used for the dialog and may be /// empty to show the default title ("Open" or "Save" depending on the mode). /// |default_file_path| is the path with optional directory and/or file name /// component that should be initially selected in the dialog. - /// |accept_filters| are used to restrict the selectable file types and may - /// any combination of (a) valid lower-cased MIME types (e.g. "text/*" or - /// "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) - /// combined description and file extension delimited using "|" and ";" (e.g. - /// "Image Types|.png;.gif;.jpg"). To display a custom dialog return true and - /// execute |callback| either inline or at a later time. To display the - /// default dialog return false. + /// |accept_filters| are used to restrict the selectable file types and may be + /// any combination of valid lower-cased MIME types (e.g. "text/*" or + /// "image/*") and individual file extensions (e.g. ".txt" or ".png"). + /// |accept_extensions| provides the semicolon-delimited expansion of MIME + /// types to file extensions (if known, or empty string otherwise). + /// |accept_descriptions| provides the descriptions for MIME types (if known, + /// or empty string otherwise). For example, the "image/*" mime type might + /// have extensions ".png;.jpg;.bmp;..." and description "Image Files". + /// |accept_filters|, |accept_extensions| and |accept_descriptions| will all + /// be the same size. To display a custom dialog return true and execute + /// |callback| either inline or at a later time. To display the default dialog + /// return false. If this method returns false it may be called an additional + /// time for the same dialog (both before and after MIME type expansion). + /// /// - protected virtual bool OnFileDialog(CefBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, string[] acceptFilters, CefFileDialogCallback callback) + protected virtual bool OnFileDialog(CefBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, string[] acceptFilters, string[] acceptExtensions, string[] acceptDescriptions, CefFileDialogCallback callback) => false; } } diff --git a/CefGlue/Classes.Handlers/CefDownloadHandler.cs b/CefGlue/Classes.Handlers/CefDownloadHandler.cs index 8dcfd305..544fae65 100644 --- a/CefGlue/Classes.Handlers/CefDownloadHandler.cs +++ b/CefGlue/Classes.Handlers/CefDownloadHandler.cs @@ -1,9 +1,5 @@ namespace Xilium.CefGlue { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -33,7 +29,7 @@ protected virtual bool CanDownload(CefBrowser browser, string url, string reques => true; - private void on_before_download(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_string_t* suggested_name, cef_before_download_callback_t* callback) + private int on_before_download(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_string_t* suggested_name, cef_before_download_callback_t* callback) { CheckSelf(self); @@ -43,7 +39,7 @@ private void on_before_download(cef_download_handler_t* self, cef_browser_t* bro var m_suggested_name = cef_string_t.ToString(suggested_name); var m_callback = CefBeforeDownloadCallback.FromNative(callback); - OnBeforeDownload(m_browser, m_download_item, m_suggested_name, m_callback); + return OnBeforeDownload(m_browser, m_download_item, m_suggested_name, m_callback); } } @@ -54,8 +50,9 @@ private void on_before_download(cef_download_handler_t* self, cef_browser_t* bro /// download if desired. Do not keep a reference to |download_item| outside of /// this method. /// - protected virtual void OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback) + protected virtual int OnBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, string suggestedName, CefBeforeDownloadCallback callback) { + return 0; } diff --git a/CefGlue/Classes.Handlers/CefRenderHandler.cs b/CefGlue/Classes.Handlers/CefRenderHandler.cs index d2f0a4cd..a55ededb 100644 --- a/CefGlue/Classes.Handlers/CefRenderHandler.cs +++ b/CefGlue/Classes.Handlers/CefRenderHandler.cs @@ -1,9 +1,7 @@ namespace Xilium.CefGlue -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; +{ + using global::CefGlue.Structs; + using System; using Xilium.CefGlue.Interop; /// @@ -215,7 +213,7 @@ private void on_paint(cef_render_handler_t* self, cef_browser_t* browser, CefPai protected abstract void OnPaint(CefBrowser browser, CefPaintElementType type, CefRectangle[] dirtyRects, IntPtr buffer, int width, int height); - private void on_accelerated_paint(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, void* shared_handle) + private void on_accelerated_paint(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, cef_accelerated_paint_info_t* shared_handle) { CheckSelf(self); @@ -236,19 +234,35 @@ private void on_accelerated_paint(cef_render_handler_t* self, cef_browser_t* bro rect++; } - OnAcceleratedPaint(m_browser, type, m_dirtyRects, (IntPtr)shared_handle); + var m_info = new CefAcceleratedPaintInfo + { + format = shared_handle->format, + shared_texture_handle = shared_handle->shared_texture_handle, + }; + + OnAcceleratedPaint(m_browser, type, m_dirtyRects, m_info); } /// /// Called when an element has been rendered to the shared texture handle. /// |type| indicates whether the element is the view or the popup widget. /// |dirtyRects| contains the set of rectangles in pixel coordinates that need - /// to be repainted. |shared_handle| is the handle for a D3D11 Texture2D that - /// can be accessed via ID3D11Device using the OpenSharedResource method. This - /// method is only called when CefWindowInfo::SharedTextureEnabled is set to - /// true, and is currently only supported on Windows. + /// to be repainted. |info| contains the shared handle; on Windows it is a + /// HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on + /// macOS it is an IOSurface pointer that can be opened with Metal or OpenGL, + /// and on Linux it contains several planes, each with an fd to the underlying + /// system native buffer. + /// + /// The underlying implementation uses a pool to deliver frames. As a result, + /// the handle may differ every frame depending on how many frames are + /// in-progress. The handle's resource cannot be cached and cannot be accessed + /// outside of this callback. It should be reopened each time this callback is + /// executed and the contents should be copied to a texture owned by the + /// client application. The contents of |info| will be released back to the + /// pool after this callback returns. + /// /// - protected abstract void OnAcceleratedPaint(CefBrowser browser, CefPaintElementType type, CefRectangle[] dirtyRects, IntPtr sharedHandle); + protected abstract void OnAcceleratedPaint(CefBrowser browser, CefPaintElementType type, CefRectangle[] dirtyRects, CefAcceleratedPaintInfo sharedHandle); private void get_touch_handle_size(cef_render_handler_t* self, cef_browser_t* browser, CefHorizontalAlignment orientation, cef_size_t* size) diff --git a/CefGlue/Classes.Handlers/CefRequestHandler.cs b/CefGlue/Classes.Handlers/CefRequestHandler.cs index 9180a74d..a753bd22 100644 --- a/CefGlue/Classes.Handlers/CefRequestHandler.cs +++ b/CefGlue/Classes.Handlers/CefRequestHandler.cs @@ -1,9 +1,6 @@ namespace Xilium.CefGlue { using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -244,24 +241,74 @@ protected virtual void OnRenderViewReady(CefBrowser browser) } - private void on_render_process_terminated(cef_request_handler_t* self, cef_browser_t* browser, CefTerminationStatus status) + private void on_render_process_terminated(cef_request_handler_t* self, cef_browser_t* browser, CefTerminationStatus status, int error_code, cef_string_t* error_string) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); - OnRenderProcessTerminated(m_browser, status); - } - + OnRenderProcessTerminated(m_browser, status, error_code, cef_string_t.ToString(error_string)); + } + /// - /// Called on the browser process UI thread when the render process - /// terminates unexpectedly. |status| indicates how the process - /// terminated. + /// Called on the browser process UI thread when the render process + /// terminates unexpectedly. |status| indicates how the process terminated. + /// |error_code| and |error_string| represent the error that would be + /// displayed in Chrome's "Aw, Snap!" view. Possible |error_code| values + /// include cef_resultcode_t non-normal exit values and platform-specific + /// crash values (for example, a Posix signal or Windows hardware exception). /// - protected virtual void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status) + protected virtual void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status, int errorCode, string errorString) + { + } + + private int on_render_process_unresponsive(cef_request_handler_t* self, cef_browser_t* browser, cef_unresponsive_process_callback_t* callback) + { + var mBrowser = CefBrowser.FromNative(browser); + var mCallback = CefUnresponsiveProcessCallback.FromNative(callback); + + return OnRenderProcessUnresponsive(mBrowser, mCallback); + } + + /// + /// Called on the browser process UI thread when the render process is + /// unresponsive as indicated by a lack of input event processing for at + /// least 15 seconds. Return false for the default behavior which is an + /// indefinite wait with the Alloy runtime or display of the "Page + /// unresponsive" dialog with the Chrome runtime. Return true and don't + /// execute the callback for an indefinite wait without display of the Chrome + /// runtime dialog. Return true and call CefUnresponsiveProcessCallback::Wait + /// either in this method or at a later time to reset the wait timer, + /// potentially triggering another call to this method if the process remains + /// unresponsive. Return true and call CefUnresponsiveProcessCallback:: + /// Terminate either in this method or at a later time to terminate the + /// unresponsive process, resulting in a call to OnRenderProcessTerminated. + /// OnRenderProcessResponsive will be called if the process becomes responsive + /// after this method is called. This functionality depends on the hang + /// monitor which can be disabled by passing the `--disable-hang-monitor` + /// command-line flag. + /// + protected virtual int OnRenderProcessUnresponsive(CefBrowser browser, CefUnresponsiveProcessCallback callback) + { + return 0; + } + + private void on_render_process_responsive(cef_request_handler_t* self, cef_browser_t* browser) + { + CheckSelf(self); + + OnRenderProcessResponsive(CefBrowser.FromNative(browser)); + } + + /// + /// Called on the browser process UI thread when the render process becomes + /// responsive after previously being unresponsive. See documentation on + /// OnRenderProcessUnresponsive. + /// + protected virtual void OnRenderProcessResponsive(CefBrowser browser) { - } + } private void on_document_available_in_main_frame(cef_request_handler_t* self, cef_browser_t* browser) { @@ -278,6 +325,6 @@ private void on_document_available_in_main_frame(cef_request_handler_t* self, ce /// protected virtual void OnDocumentAvailableInMainFrame(CefBrowser browser) { - } + } } } diff --git a/CefGlue/Classes.Proxies/CefBrowser.cs b/CefGlue/Classes.Proxies/CefBrowser.cs index fd5329c9..ff369d8a 100644 --- a/CefGlue/Classes.Proxies/CefBrowser.cs +++ b/CefGlue/Classes.Proxies/CefBrowser.cs @@ -1,9 +1,6 @@ namespace Xilium.CefGlue { using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -159,24 +156,29 @@ public CefFrame GetFocusedFrame() /// /// Returns the frame with the specified identifier, or NULL if not found. /// - public CefFrame GetFrame(long identifier) - { - return CefFrame.FromNativeOrNull( - cef_browser_t.get_frame_byident(_self, identifier) - ); + public CefFrame GetFrameByIdentifier(string identifier) + { + fixed (char* identifier_str = identifier) + { + var n_identifier = new cef_string_t(identifier_str, identifier.Length); + + return CefFrame.FromNativeOrNull( + cef_browser_t.get_frame_by_identifier(_self, &n_identifier) + ); + } } /// /// Returns the frame with the specified name, or NULL if not found. /// - public CefFrame GetFrame(string name) + public CefFrame GetFrameByName(string name) { fixed (char* name_str = name) { var n_name = new cef_string_t(name_str, name.Length); return CefFrame.FromNativeOrNull( - cef_browser_t.get_frame(_self, &n_name) + cef_browser_t.get_frame_by_name(_self, &n_name) ); } } @@ -192,16 +194,15 @@ public int FrameCount /// /// Returns the identifiers of all existing frames. /// - public long[] GetFrameIdentifiers() + public string[] GetFrameIdentifiers() { var frameCount = FrameCount; - var identifiers = new long[frameCount * 2]; - UIntPtr n_count = (UIntPtr)frameCount; - - fixed (long* identifiers_ptr = identifiers) - { - cef_browser_t.get_frame_identifiers(_self, &n_count, identifiers_ptr); - } + UIntPtr n_count = (UIntPtr)frameCount; + + var list = libcef.string_list_alloc(); + cef_browser_t.get_frame_identifiers(_self, list); + var identifiers = cef_string_list.ToArray(list); + libcef.string_list_free(list); if ((int)n_count < 0) { diff --git a/CefGlue/Classes.Proxies/CefFrame.cs b/CefGlue/Classes.Proxies/CefFrame.cs index e0741ead..390d415c 100644 --- a/CefGlue/Classes.Proxies/CefFrame.cs +++ b/CefGlue/Classes.Proxies/CefFrame.cs @@ -1,9 +1,6 @@ namespace Xilium.CefGlue { using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// @@ -183,15 +180,15 @@ public string Name var n_result = cef_frame_t.get_name(_self); return cef_string_userfree.ToString(n_result); } - } - + } + /// - /// Returns the globally unique identifier for this frame or < 0 if the + /// Returns the globally unique identifier for this frame or empty if the /// underlying frame does not yet exist. /// - public long Identifier + public string Identifier { - get { return cef_frame_t.get_identifier(_self); } + get { return cef_string_userfree.ToString(cef_frame_t.get_identifier(_self)); } } /// diff --git a/CefGlue/Classes.Proxies/CefV8Value.cs b/CefGlue/Classes.Proxies/CefV8Value.cs index c2f2c8a7..a9bc52d9 100644 --- a/CefGlue/Classes.Proxies/CefV8Value.cs +++ b/CefGlue/Classes.Proxies/CefV8Value.cs @@ -1,10 +1,6 @@ namespace Xilium.CefGlue { using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; - using System.Xml.Linq; using Xilium.CefGlue.Interop; @@ -531,7 +527,7 @@ public bool SetValue(string key, CefV8AccessControl settings, CefV8PropertyAttri fixed (char* key_str = key) { var n_key = new cef_string_t(key_str, key != null ? key.Length : 0); - return cef_v8value_t.set_value_byaccessor(_self, &n_key, settings, attribute) != 0; + return cef_v8value_t.set_value_byaccessor(_self, &n_key, attribute) != 0; } } diff --git a/CefGlue/Classes.g/CefBrowserProcessHandler.g.cs b/CefGlue/Classes.g/CefBrowserProcessHandler.g.cs index 3b43e42f..ef689bfd 100644 --- a/CefGlue/Classes.g/CefBrowserProcessHandler.g.cs +++ b/CefGlue/Classes.g/CefBrowserProcessHandler.g.cs @@ -1,123 +1,126 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; - using System.Threading; - using Xilium.CefGlue.Interop; - - // Role: HANDLER - public abstract unsafe partial class CefBrowserProcessHandler - { - private static Dictionary _roots = new Dictionary(); - - private int _refct; - private cef_browser_process_handler_t* _self; - - protected object SyncRoot { get { return this; } } - - private cef_browser_process_handler_t.add_ref_delegate _ds0; - private cef_browser_process_handler_t.release_delegate _ds1; - private cef_browser_process_handler_t.has_one_ref_delegate _ds2; - private cef_browser_process_handler_t.has_at_least_one_ref_delegate _ds3; - private cef_browser_process_handler_t.on_register_custom_preferences_delegate _ds4; - private cef_browser_process_handler_t.on_context_initialized_delegate _ds5; - private cef_browser_process_handler_t.on_before_child_process_launch_delegate _ds6; - private cef_browser_process_handler_t.on_already_running_app_relaunch_delegate _ds7; - private cef_browser_process_handler_t.on_schedule_message_pump_work_delegate _ds8; - private cef_browser_process_handler_t.get_default_client_delegate _ds9; - - protected CefBrowserProcessHandler() - { - _self = cef_browser_process_handler_t.Alloc(); - - _ds0 = new cef_browser_process_handler_t.add_ref_delegate(add_ref); - _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); - _ds1 = new cef_browser_process_handler_t.release_delegate(release); - _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); - _ds2 = new cef_browser_process_handler_t.has_one_ref_delegate(has_one_ref); - _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); - _ds3 = new cef_browser_process_handler_t.has_at_least_one_ref_delegate(has_at_least_one_ref); - _self->_base._has_at_least_one_ref = Marshal.GetFunctionPointerForDelegate(_ds3); - _ds4 = new cef_browser_process_handler_t.on_register_custom_preferences_delegate(on_register_custom_preferences); - _self->_on_register_custom_preferences = Marshal.GetFunctionPointerForDelegate(_ds4); - _ds5 = new cef_browser_process_handler_t.on_context_initialized_delegate(on_context_initialized); - _self->_on_context_initialized = Marshal.GetFunctionPointerForDelegate(_ds5); - _ds6 = new cef_browser_process_handler_t.on_before_child_process_launch_delegate(on_before_child_process_launch); - _self->_on_before_child_process_launch = Marshal.GetFunctionPointerForDelegate(_ds6); - _ds7 = new cef_browser_process_handler_t.on_already_running_app_relaunch_delegate(on_already_running_app_relaunch); - _self->_on_already_running_app_relaunch = Marshal.GetFunctionPointerForDelegate(_ds7); - _ds8 = new cef_browser_process_handler_t.on_schedule_message_pump_work_delegate(on_schedule_message_pump_work); - _self->_on_schedule_message_pump_work = Marshal.GetFunctionPointerForDelegate(_ds8); - _ds9 = new cef_browser_process_handler_t.get_default_client_delegate(get_default_client); - _self->_get_default_client = Marshal.GetFunctionPointerForDelegate(_ds9); - } - - ~CefBrowserProcessHandler() - { - Dispose(false); - } - - protected virtual void Dispose(bool disposing) - { - if (_self != null) - { - cef_browser_process_handler_t.Free(_self); - _self = null; - } - } - - private void add_ref(cef_browser_process_handler_t* self) - { - lock (SyncRoot) - { - var result = ++_refct; - if (result == 1) - { - lock (_roots) { _roots.Add((IntPtr)_self, this); } - } - } - } - - private int release(cef_browser_process_handler_t* self) - { - lock (SyncRoot) - { - var result = --_refct; - if (result == 0) - { - lock (_roots) { _roots.Remove((IntPtr)_self); } - return 1; - } - return 0; - } - } - - private int has_one_ref(cef_browser_process_handler_t* self) - { - lock (SyncRoot) { return _refct == 1 ? 1 : 0; } - } - - private int has_at_least_one_ref(cef_browser_process_handler_t* self) - { - lock (SyncRoot) { return _refct != 0 ? 1 : 0; } - } - - internal cef_browser_process_handler_t* ToNative() - { - add_ref(_self); - return _self; - } - - [Conditional("DEBUG")] - private void CheckSelf(cef_browser_process_handler_t* self) - { - if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using System.Threading; + using Xilium.CefGlue.Interop; + + // Role: HANDLER + public abstract unsafe partial class CefBrowserProcessHandler + { + private static Dictionary _roots = new Dictionary(); + + private int _refct; + private cef_browser_process_handler_t* _self; + + protected object SyncRoot { get { return this; } } + + private cef_browser_process_handler_t.add_ref_delegate _ds0; + private cef_browser_process_handler_t.release_delegate _ds1; + private cef_browser_process_handler_t.has_one_ref_delegate _ds2; + private cef_browser_process_handler_t.has_at_least_one_ref_delegate _ds3; + private cef_browser_process_handler_t.on_register_custom_preferences_delegate _ds4; + private cef_browser_process_handler_t.on_context_initialized_delegate _ds5; + private cef_browser_process_handler_t.on_before_child_process_launch_delegate _ds6; + private cef_browser_process_handler_t.on_already_running_app_relaunch_delegate _ds7; + private cef_browser_process_handler_t.on_schedule_message_pump_work_delegate _ds8; + private cef_browser_process_handler_t.get_default_client_delegate _ds9; + private cef_browser_process_handler_t.get_default_request_context_handler_delegate _dsa; + + protected CefBrowserProcessHandler() + { + _self = cef_browser_process_handler_t.Alloc(); + + _ds0 = new cef_browser_process_handler_t.add_ref_delegate(add_ref); + _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); + _ds1 = new cef_browser_process_handler_t.release_delegate(release); + _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); + _ds2 = new cef_browser_process_handler_t.has_one_ref_delegate(has_one_ref); + _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); + _ds3 = new cef_browser_process_handler_t.has_at_least_one_ref_delegate(has_at_least_one_ref); + _self->_base._has_at_least_one_ref = Marshal.GetFunctionPointerForDelegate(_ds3); + _ds4 = new cef_browser_process_handler_t.on_register_custom_preferences_delegate(on_register_custom_preferences); + _self->_on_register_custom_preferences = Marshal.GetFunctionPointerForDelegate(_ds4); + _ds5 = new cef_browser_process_handler_t.on_context_initialized_delegate(on_context_initialized); + _self->_on_context_initialized = Marshal.GetFunctionPointerForDelegate(_ds5); + _ds6 = new cef_browser_process_handler_t.on_before_child_process_launch_delegate(on_before_child_process_launch); + _self->_on_before_child_process_launch = Marshal.GetFunctionPointerForDelegate(_ds6); + _ds7 = new cef_browser_process_handler_t.on_already_running_app_relaunch_delegate(on_already_running_app_relaunch); + _self->_on_already_running_app_relaunch = Marshal.GetFunctionPointerForDelegate(_ds7); + _ds8 = new cef_browser_process_handler_t.on_schedule_message_pump_work_delegate(on_schedule_message_pump_work); + _self->_on_schedule_message_pump_work = Marshal.GetFunctionPointerForDelegate(_ds8); + _ds9 = new cef_browser_process_handler_t.get_default_client_delegate(get_default_client); + _self->_get_default_client = Marshal.GetFunctionPointerForDelegate(_ds9); + _dsa = new cef_browser_process_handler_t.get_default_request_context_handler_delegate(get_default_request_context_handler); + _self->_get_default_request_context_handler = Marshal.GetFunctionPointerForDelegate(_dsa); + } + + ~CefBrowserProcessHandler() + { + Dispose(false); + } + + protected virtual void Dispose(bool disposing) + { + if (_self != null) + { + cef_browser_process_handler_t.Free(_self); + _self = null; + } + } + + private void add_ref(cef_browser_process_handler_t* self) + { + lock (SyncRoot) + { + var result = ++_refct; + if (result == 1) + { + lock (_roots) { _roots.Add((IntPtr)_self, this); } + } + } + } + + private int release(cef_browser_process_handler_t* self) + { + lock (SyncRoot) + { + var result = --_refct; + if (result == 0) + { + lock (_roots) { _roots.Remove((IntPtr)_self); } + return 1; + } + return 0; + } + } + + private int has_one_ref(cef_browser_process_handler_t* self) + { + lock (SyncRoot) { return _refct == 1 ? 1 : 0; } + } + + private int has_at_least_one_ref(cef_browser_process_handler_t* self) + { + lock (SyncRoot) { return _refct != 0 ? 1 : 0; } + } + + internal cef_browser_process_handler_t* ToNative() + { + add_ref(_self); + return _self; + } + + [Conditional("DEBUG")] + private void CheckSelf(cef_browser_process_handler_t* self) + { + if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); + } + + } +} diff --git a/CefGlue/Classes.g/CefRequestHandler.g.cs b/CefGlue/Classes.g/CefRequestHandler.g.cs index 4e28ff34..89938064 100644 --- a/CefGlue/Classes.g/CefRequestHandler.g.cs +++ b/CefGlue/Classes.g/CefRequestHandler.g.cs @@ -1,132 +1,138 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Runtime.InteropServices; - using System.Threading; - using Xilium.CefGlue.Interop; - - // Role: HANDLER - public abstract unsafe partial class CefRequestHandler - { - private static Dictionary _roots = new Dictionary(); - - private int _refct; - private cef_request_handler_t* _self; - - protected object SyncRoot { get { return this; } } - - private cef_request_handler_t.add_ref_delegate _ds0; - private cef_request_handler_t.release_delegate _ds1; - private cef_request_handler_t.has_one_ref_delegate _ds2; - private cef_request_handler_t.has_at_least_one_ref_delegate _ds3; - private cef_request_handler_t.on_before_browse_delegate _ds4; - private cef_request_handler_t.on_open_urlfrom_tab_delegate _ds5; - private cef_request_handler_t.get_resource_request_handler_delegate _ds6; - private cef_request_handler_t.get_auth_credentials_delegate _ds7; - private cef_request_handler_t.on_certificate_error_delegate _ds8; - private cef_request_handler_t.on_select_client_certificate_delegate _ds9; - private cef_request_handler_t.on_render_view_ready_delegate _dsa; - private cef_request_handler_t.on_render_process_terminated_delegate _dsb; - private cef_request_handler_t.on_document_available_in_main_frame_delegate _dsc; - - protected CefRequestHandler() - { - _self = cef_request_handler_t.Alloc(); - - _ds0 = new cef_request_handler_t.add_ref_delegate(add_ref); - _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); - _ds1 = new cef_request_handler_t.release_delegate(release); - _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); - _ds2 = new cef_request_handler_t.has_one_ref_delegate(has_one_ref); - _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); - _ds3 = new cef_request_handler_t.has_at_least_one_ref_delegate(has_at_least_one_ref); - _self->_base._has_at_least_one_ref = Marshal.GetFunctionPointerForDelegate(_ds3); - _ds4 = new cef_request_handler_t.on_before_browse_delegate(on_before_browse); - _self->_on_before_browse = Marshal.GetFunctionPointerForDelegate(_ds4); - _ds5 = new cef_request_handler_t.on_open_urlfrom_tab_delegate(on_open_urlfrom_tab); - _self->_on_open_urlfrom_tab = Marshal.GetFunctionPointerForDelegate(_ds5); - _ds6 = new cef_request_handler_t.get_resource_request_handler_delegate(get_resource_request_handler); - _self->_get_resource_request_handler = Marshal.GetFunctionPointerForDelegate(_ds6); - _ds7 = new cef_request_handler_t.get_auth_credentials_delegate(get_auth_credentials); - _self->_get_auth_credentials = Marshal.GetFunctionPointerForDelegate(_ds7); - _ds8 = new cef_request_handler_t.on_certificate_error_delegate(on_certificate_error); - _self->_on_certificate_error = Marshal.GetFunctionPointerForDelegate(_ds8); - _ds9 = new cef_request_handler_t.on_select_client_certificate_delegate(on_select_client_certificate); - _self->_on_select_client_certificate = Marshal.GetFunctionPointerForDelegate(_ds9); - _dsa = new cef_request_handler_t.on_render_view_ready_delegate(on_render_view_ready); - _self->_on_render_view_ready = Marshal.GetFunctionPointerForDelegate(_dsa); - _dsb = new cef_request_handler_t.on_render_process_terminated_delegate(on_render_process_terminated); - _self->_on_render_process_terminated = Marshal.GetFunctionPointerForDelegate(_dsb); - _dsc = new cef_request_handler_t.on_document_available_in_main_frame_delegate(on_document_available_in_main_frame); - _self->_on_document_available_in_main_frame = Marshal.GetFunctionPointerForDelegate(_dsc); - } - - ~CefRequestHandler() - { - Dispose(false); - } - - protected virtual void Dispose(bool disposing) - { - if (_self != null) - { - cef_request_handler_t.Free(_self); - _self = null; - } - } - - private void add_ref(cef_request_handler_t* self) - { - lock (SyncRoot) - { - var result = ++_refct; - if (result == 1) - { - lock (_roots) { _roots.Add((IntPtr)_self, this); } - } - } - } - - private int release(cef_request_handler_t* self) - { - lock (SyncRoot) - { - var result = --_refct; - if (result == 0) - { - lock (_roots) { _roots.Remove((IntPtr)_self); } - return 1; - } - return 0; - } - } - - private int has_one_ref(cef_request_handler_t* self) - { - lock (SyncRoot) { return _refct == 1 ? 1 : 0; } - } - - private int has_at_least_one_ref(cef_request_handler_t* self) - { - lock (SyncRoot) { return _refct != 0 ? 1 : 0; } - } - - internal cef_request_handler_t* ToNative() - { - add_ref(_self); - return _self; - } - - [Conditional("DEBUG")] - private void CheckSelf(cef_request_handler_t* self) - { - if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using System.Threading; + using Xilium.CefGlue.Interop; + + // Role: HANDLER + public abstract unsafe partial class CefRequestHandler + { + private static Dictionary _roots = new Dictionary(); + + private int _refct; + private cef_request_handler_t* _self; + + protected object SyncRoot { get { return this; } } + + private cef_request_handler_t.add_ref_delegate _ds0; + private cef_request_handler_t.release_delegate _ds1; + private cef_request_handler_t.has_one_ref_delegate _ds2; + private cef_request_handler_t.has_at_least_one_ref_delegate _ds3; + private cef_request_handler_t.on_before_browse_delegate _ds4; + private cef_request_handler_t.on_open_urlfrom_tab_delegate _ds5; + private cef_request_handler_t.get_resource_request_handler_delegate _ds6; + private cef_request_handler_t.get_auth_credentials_delegate _ds7; + private cef_request_handler_t.on_certificate_error_delegate _ds8; + private cef_request_handler_t.on_select_client_certificate_delegate _ds9; + private cef_request_handler_t.on_render_view_ready_delegate _dsa; + private cef_request_handler_t.on_render_process_unresponsive_delegate _dsb; + private cef_request_handler_t.on_render_process_responsive_delegate _dsc; + private cef_request_handler_t.on_render_process_terminated_delegate _dsd; + private cef_request_handler_t.on_document_available_in_main_frame_delegate _dse; + + protected CefRequestHandler() + { + _self = cef_request_handler_t.Alloc(); + + _ds0 = new cef_request_handler_t.add_ref_delegate(add_ref); + _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); + _ds1 = new cef_request_handler_t.release_delegate(release); + _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); + _ds2 = new cef_request_handler_t.has_one_ref_delegate(has_one_ref); + _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); + _ds3 = new cef_request_handler_t.has_at_least_one_ref_delegate(has_at_least_one_ref); + _self->_base._has_at_least_one_ref = Marshal.GetFunctionPointerForDelegate(_ds3); + _ds4 = new cef_request_handler_t.on_before_browse_delegate(on_before_browse); + _self->_on_before_browse = Marshal.GetFunctionPointerForDelegate(_ds4); + _ds5 = new cef_request_handler_t.on_open_urlfrom_tab_delegate(on_open_urlfrom_tab); + _self->_on_open_urlfrom_tab = Marshal.GetFunctionPointerForDelegate(_ds5); + _ds6 = new cef_request_handler_t.get_resource_request_handler_delegate(get_resource_request_handler); + _self->_get_resource_request_handler = Marshal.GetFunctionPointerForDelegate(_ds6); + _ds7 = new cef_request_handler_t.get_auth_credentials_delegate(get_auth_credentials); + _self->_get_auth_credentials = Marshal.GetFunctionPointerForDelegate(_ds7); + _ds8 = new cef_request_handler_t.on_certificate_error_delegate(on_certificate_error); + _self->_on_certificate_error = Marshal.GetFunctionPointerForDelegate(_ds8); + _ds9 = new cef_request_handler_t.on_select_client_certificate_delegate(on_select_client_certificate); + _self->_on_select_client_certificate = Marshal.GetFunctionPointerForDelegate(_ds9); + _dsa = new cef_request_handler_t.on_render_view_ready_delegate(on_render_view_ready); + _self->_on_render_view_ready = Marshal.GetFunctionPointerForDelegate(_dsa); + _dsb = new cef_request_handler_t.on_render_process_unresponsive_delegate(on_render_process_unresponsive); + _self->_on_render_process_unresponsive = Marshal.GetFunctionPointerForDelegate(_dsb); + _dsc = new cef_request_handler_t.on_render_process_responsive_delegate(on_render_process_responsive); + _self->_on_render_process_responsive = Marshal.GetFunctionPointerForDelegate(_dsc); + _dsd = new cef_request_handler_t.on_render_process_terminated_delegate(on_render_process_terminated); + _self->_on_render_process_terminated = Marshal.GetFunctionPointerForDelegate(_dsd); + _dse = new cef_request_handler_t.on_document_available_in_main_frame_delegate(on_document_available_in_main_frame); + _self->_on_document_available_in_main_frame = Marshal.GetFunctionPointerForDelegate(_dse); + } + + ~CefRequestHandler() + { + Dispose(false); + } + + protected virtual void Dispose(bool disposing) + { + if (_self != null) + { + cef_request_handler_t.Free(_self); + _self = null; + } + } + + private void add_ref(cef_request_handler_t* self) + { + lock (SyncRoot) + { + var result = ++_refct; + if (result == 1) + { + lock (_roots) { _roots.Add((IntPtr)_self, this); } + } + } + } + + private int release(cef_request_handler_t* self) + { + lock (SyncRoot) + { + var result = --_refct; + if (result == 0) + { + lock (_roots) { _roots.Remove((IntPtr)_self); } + return 1; + } + return 0; + } + } + + private int has_one_ref(cef_request_handler_t* self) + { + lock (SyncRoot) { return _refct == 1 ? 1 : 0; } + } + + private int has_at_least_one_ref(cef_request_handler_t* self) + { + lock (SyncRoot) { return _refct != 0 ? 1 : 0; } + } + + internal cef_request_handler_t* ToNative() + { + add_ref(_self); + return _self; + } + + [Conditional("DEBUG")] + private void CheckSelf(cef_request_handler_t* self) + { + if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); + } + + } +} diff --git a/CefGlue/Classes.g/CefUnresponsiveProcessCallback.g.cs b/CefGlue/Classes.g/CefUnresponsiveProcessCallback.g.cs new file mode 100644 index 00000000..ba7cdd39 --- /dev/null +++ b/CefGlue/Classes.g/CefUnresponsiveProcessCallback.g.cs @@ -0,0 +1,83 @@ +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using System.Threading; + using Xilium.CefGlue.Interop; + + // Role: PROXY + public sealed unsafe partial class CefUnresponsiveProcessCallback : IDisposable + { + internal static CefUnresponsiveProcessCallback FromNative(cef_unresponsive_process_callback_t* ptr) + { + return new CefUnresponsiveProcessCallback(ptr); + } + + internal static CefUnresponsiveProcessCallback FromNativeOrNull(cef_unresponsive_process_callback_t* ptr) + { + if (ptr == null) return null; + return new CefUnresponsiveProcessCallback(ptr); + } + + private cef_unresponsive_process_callback_t* _self; + private int _disposed = 0; + + private CefUnresponsiveProcessCallback(cef_unresponsive_process_callback_t* ptr) + { + if (ptr == null) throw new ArgumentNullException("ptr"); + _self = ptr; + CefObjectTracker.Track(this); + } + + ~CefUnresponsiveProcessCallback() + { + if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0) + { + Release(); + _self = null; + } + } + + public void Dispose() + { + if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0) + { + Release(); + _self = null; + } + CefObjectTracker.Untrack(this); + GC.SuppressFinalize(this); + } + + internal void AddRef() + { + cef_unresponsive_process_callback_t.add_ref(_self); + } + + internal bool Release() + { + return cef_unresponsive_process_callback_t.release(_self) != 0; + } + + internal bool HasOneRef + { + get { return cef_unresponsive_process_callback_t.has_one_ref(_self) != 0; } + } + + internal bool HasAtLeastOneRef + { + get { return cef_unresponsive_process_callback_t.has_at_least_one_ref(_self) != 0; } + } + + internal cef_unresponsive_process_callback_t* ToNative() + { + AddRef(); + return _self; + } + } +} diff --git a/CefGlue/Enums/CefColorVariant.cs b/CefGlue/Enums/CefColorVariant.cs new file mode 100644 index 00000000..e00d9dab --- /dev/null +++ b/CefGlue/Enums/CefColorVariant.cs @@ -0,0 +1,21 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// C API name: cef_color_variant_t. +// +namespace Xilium.CefGlue +{ + /// + /// Specifies the color variants supported by + /// CefRequestContext::SetChromeThemeColor. + /// + public enum CefColorVariant + { + System, + Light, + Dark, + TonalSpot, + Neutral, + Vibrant, + Expressive + } +} diff --git a/CefGlue/Enums/CefRuntimeStyle.cs b/CefGlue/Enums/CefRuntimeStyle.cs new file mode 100644 index 00000000..2c2f68b1 --- /dev/null +++ b/CefGlue/Enums/CefRuntimeStyle.cs @@ -0,0 +1,27 @@ +// +// This file manually written from cef/include/internal/cef_types_runtime.h. +// C API name: cef_runtime_style_t. +// +namespace Xilium.CefGlue +{ + public enum CefRuntimeStyle + { + /// + /// Use the default runtime style. The default style will match the + /// CefSettings.chrome_runtime value in most cases. See above documentation + /// for exceptions. + /// + Default, + + /// + /// Use the Chrome runtime style. Only supported with the Chrome runtime. + /// + Chrome, + + /// + /// Use the Alloy runtime style. Supported with both the Alloy and Chrome + /// runtime. + /// + Alloy + } +} diff --git a/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs b/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs index a518f762..150bbbb9 100644 --- a/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs @@ -1,1702 +1,1750 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_browser_host_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _get_browser; - internal IntPtr _close_browser; - internal IntPtr _try_close_browser; - internal IntPtr _set_focus; - internal IntPtr _get_window_handle; - internal IntPtr _get_opener_window_handle; - internal IntPtr _has_view; - internal IntPtr _get_client; - internal IntPtr _get_request_context; - internal IntPtr _can_zoom; - internal IntPtr _zoom; - internal IntPtr _get_default_zoom_level; - internal IntPtr _get_zoom_level; - internal IntPtr _set_zoom_level; - internal IntPtr _run_file_dialog; - internal IntPtr _start_download; - internal IntPtr _download_image; - internal IntPtr _print; - internal IntPtr _print_to_pdf; - internal IntPtr _find; - internal IntPtr _stop_finding; - internal IntPtr _show_dev_tools; - internal IntPtr _close_dev_tools; - internal IntPtr _has_dev_tools; - internal IntPtr _send_dev_tools_message; - internal IntPtr _execute_dev_tools_method; - internal IntPtr _add_dev_tools_message_observer; - internal IntPtr _get_navigation_entries; - internal IntPtr _replace_misspelling; - internal IntPtr _add_word_to_dictionary; - internal IntPtr _is_window_rendering_disabled; - internal IntPtr _was_resized; - internal IntPtr _was_hidden; - internal IntPtr _notify_screen_info_changed; - internal IntPtr _invalidate; - internal IntPtr _send_external_begin_frame; - internal IntPtr _send_key_event; - internal IntPtr _send_mouse_click_event; - internal IntPtr _send_mouse_move_event; - internal IntPtr _send_mouse_wheel_event; - internal IntPtr _send_touch_event; - internal IntPtr _send_capture_lost_event; - internal IntPtr _notify_move_or_resize_started; - internal IntPtr _get_windowless_frame_rate; - internal IntPtr _set_windowless_frame_rate; - internal IntPtr _ime_set_composition; - internal IntPtr _ime_commit_text; - internal IntPtr _ime_finish_composing_text; - internal IntPtr _ime_cancel_composition; - internal IntPtr _drag_target_drag_enter; - internal IntPtr _drag_target_drag_over; - internal IntPtr _drag_target_drag_leave; - internal IntPtr _drag_target_drop; - internal IntPtr _drag_source_ended_at; - internal IntPtr _drag_source_system_drag_ended; - internal IntPtr _get_visible_navigation_entry; - internal IntPtr _set_accessibility_state; - internal IntPtr _set_auto_resize_enabled; - internal IntPtr _get_extension; - internal IntPtr _is_background_host; - internal IntPtr _set_audio_muted; - internal IntPtr _is_audio_muted; - internal IntPtr _is_fullscreen; - internal IntPtr _exit_fullscreen; - internal IntPtr _can_execute_chrome_command; - internal IntPtr _execute_chrome_command; - - // CreateBrowser - [DllImport(libcef.DllName, EntryPoint = "cef_browser_host_create_browser", CallingConvention = libcef.CEF_CALL)] - public static extern int create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_dictionary_value_t* extra_info, cef_request_context_t* request_context); - - // CreateBrowserSync - [DllImport(libcef.DllName, EntryPoint = "cef_browser_host_create_browser_sync", CallingConvention = libcef.CEF_CALL)] - public static extern cef_browser_t* create_browser_sync(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_dictionary_value_t* extra_info, cef_request_context_t* request_context); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_ref_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int release_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_one_ref_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_at_least_one_ref_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_browser_t* get_browser_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void close_browser_delegate(cef_browser_host_t* self, int force_close); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int try_close_browser_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_focus_delegate(cef_browser_host_t* self, int focus); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate IntPtr get_window_handle_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate IntPtr get_opener_window_handle_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_view_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_client_t* get_client_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_request_context_t* get_request_context_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int can_zoom_delegate(cef_browser_host_t* self, CefZoomCommand command); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void zoom_delegate(cef_browser_host_t* self, CefZoomCommand command); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate double get_default_zoom_level_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate double get_zoom_level_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_zoom_level_delegate(cef_browser_host_t* self, double zoomLevel); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void run_file_dialog_delegate(cef_browser_host_t* self, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_run_file_dialog_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void start_download_delegate(cef_browser_host_t* self, cef_string_t* url); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void download_image_delegate(cef_browser_host_t* self, cef_string_t* image_url, int is_favicon, uint max_image_size, int bypass_cache, cef_download_image_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void print_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void print_to_pdf_delegate(cef_browser_host_t* self, cef_string_t* path, cef_pdf_print_settings_t* settings, cef_pdf_print_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void find_delegate(cef_browser_host_t* self, cef_string_t* searchText, int forward, int matchCase, int findNext); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void stop_finding_delegate(cef_browser_host_t* self, int clearSelection); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void show_dev_tools_delegate(cef_browser_host_t* self, cef_window_info_t* windowInfo, cef_client_t* client, cef_browser_settings_t* settings, cef_point_t* inspect_element_at); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void close_dev_tools_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_dev_tools_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int send_dev_tools_message_delegate(cef_browser_host_t* self, void* message, UIntPtr message_size); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int execute_dev_tools_method_delegate(cef_browser_host_t* self, int message_id, cef_string_t* method, cef_dictionary_value_t* @params); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_registration_t* add_dev_tools_message_observer_delegate(cef_browser_host_t* self, cef_dev_tools_message_observer_t* observer); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void get_navigation_entries_delegate(cef_browser_host_t* self, cef_navigation_entry_visitor_t* visitor, int current_only); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void replace_misspelling_delegate(cef_browser_host_t* self, cef_string_t* word); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_word_to_dictionary_delegate(cef_browser_host_t* self, cef_string_t* word); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_window_rendering_disabled_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void was_resized_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void was_hidden_delegate(cef_browser_host_t* self, int hidden); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void notify_screen_info_changed_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void invalidate_delegate(cef_browser_host_t* self, CefPaintElementType type); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_external_begin_frame_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_key_event_delegate(cef_browser_host_t* self, cef_key_event_t* @event); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_mouse_click_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, CefMouseButtonType type, int mouseUp, int clickCount); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_mouse_move_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, int mouseLeave); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_mouse_wheel_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, int deltaX, int deltaY); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_touch_event_delegate(cef_browser_host_t* self, cef_touch_event_t* @event); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_capture_lost_event_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void notify_move_or_resize_started_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_windowless_frame_rate_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_windowless_frame_rate_delegate(cef_browser_host_t* self, int frame_rate); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void ime_set_composition_delegate(cef_browser_host_t* self, cef_string_t* text, UIntPtr underlinesCount, cef_composition_underline_t* underlines, cef_range_t* replacement_range, cef_range_t* selection_range); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void ime_commit_text_delegate(cef_browser_host_t* self, cef_string_t* text, cef_range_t* replacement_range, int relative_cursor_pos); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void ime_finish_composing_text_delegate(cef_browser_host_t* self, int keep_selection); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void ime_cancel_composition_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_target_drag_enter_delegate(cef_browser_host_t* self, cef_drag_data_t* drag_data, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_target_drag_over_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_target_drag_leave_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_target_drop_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_source_ended_at_delegate(cef_browser_host_t* self, int x, int y, CefDragOperationsMask op); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void drag_source_system_drag_ended_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_navigation_entry_t* get_visible_navigation_entry_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_accessibility_state_delegate(cef_browser_host_t* self, CefState accessibility_state); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_auto_resize_enabled_delegate(cef_browser_host_t* self, int enabled, cef_size_t* min_size, cef_size_t* max_size); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_extension_t* get_extension_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_background_host_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_audio_muted_delegate(cef_browser_host_t* self, int mute); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_audio_muted_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_fullscreen_delegate(cef_browser_host_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void exit_fullscreen_delegate(cef_browser_host_t* self, int will_cause_resize); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int can_execute_chrome_command_delegate(cef_browser_host_t* self, int command_id); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void execute_chrome_command_delegate(cef_browser_host_t* self, int command_id, CefWindowOpenDisposition disposition); - - // AddRef - private static IntPtr _p0; - private static add_ref_delegate _d0; - - public static void add_ref(cef_browser_host_t* self) - { - add_ref_delegate d; - var p = self->_base._add_ref; - if (p == _p0) { d = _d0; } - else - { - d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); - if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } - } - d(self); - } - - // Release - private static IntPtr _p1; - private static release_delegate _d1; - - public static int release(cef_browser_host_t* self) - { - release_delegate d; - var p = self->_base._release; - if (p == _p1) { d = _d1; } - else - { - d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); - if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } - } - return d(self); - } - - // HasOneRef - private static IntPtr _p2; - private static has_one_ref_delegate _d2; - - public static int has_one_ref(cef_browser_host_t* self) - { - has_one_ref_delegate d; - var p = self->_base._has_one_ref; - if (p == _p2) { d = _d2; } - else - { - d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); - if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } - } - return d(self); - } - - // HasAtLeastOneRef - private static IntPtr _p3; - private static has_at_least_one_ref_delegate _d3; - - public static int has_at_least_one_ref(cef_browser_host_t* self) - { - has_at_least_one_ref_delegate d; - var p = self->_base._has_at_least_one_ref; - if (p == _p3) { d = _d3; } - else - { - d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); - if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } - } - return d(self); - } - - // GetBrowser - private static IntPtr _p4; - private static get_browser_delegate _d4; - - public static cef_browser_t* get_browser(cef_browser_host_t* self) - { - get_browser_delegate d; - var p = self->_get_browser; - if (p == _p4) { d = _d4; } - else - { - d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate)); - if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } - } - return d(self); - } - - // CloseBrowser - private static IntPtr _p5; - private static close_browser_delegate _d5; - - public static void close_browser(cef_browser_host_t* self, int force_close) - { - close_browser_delegate d; - var p = self->_close_browser; - if (p == _p5) { d = _d5; } - else - { - d = (close_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_browser_delegate)); - if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } - } - d(self, force_close); - } - - // TryCloseBrowser - private static IntPtr _p6; - private static try_close_browser_delegate _d6; - - public static int try_close_browser(cef_browser_host_t* self) - { - try_close_browser_delegate d; - var p = self->_try_close_browser; - if (p == _p6) { d = _d6; } - else - { - d = (try_close_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(try_close_browser_delegate)); - if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } - } - return d(self); - } - - // SetFocus - private static IntPtr _p7; - private static set_focus_delegate _d7; - - public static void set_focus(cef_browser_host_t* self, int focus) - { - set_focus_delegate d; - var p = self->_set_focus; - if (p == _p7) { d = _d7; } - else - { - d = (set_focus_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_focus_delegate)); - if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } - } - d(self, focus); - } - - // GetWindowHandle - private static IntPtr _p8; - private static get_window_handle_delegate _d8; - - public static IntPtr get_window_handle(cef_browser_host_t* self) - { - get_window_handle_delegate d; - var p = self->_get_window_handle; - if (p == _p8) { d = _d8; } - else - { - d = (get_window_handle_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_window_handle_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } - } - return d(self); - } - - // GetOpenerWindowHandle - private static IntPtr _p9; - private static get_opener_window_handle_delegate _d9; - - public static IntPtr get_opener_window_handle(cef_browser_host_t* self) - { - get_opener_window_handle_delegate d; - var p = self->_get_opener_window_handle; - if (p == _p9) { d = _d9; } - else - { - d = (get_opener_window_handle_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_opener_window_handle_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } - } - return d(self); - } - - // HasView - private static IntPtr _pa; - private static has_view_delegate _da; - - public static int has_view(cef_browser_host_t* self) - { - has_view_delegate d; - var p = self->_has_view; - if (p == _pa) { d = _da; } - else - { - d = (has_view_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_view_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } - } - return d(self); - } - - // GetClient - private static IntPtr _pb; - private static get_client_delegate _db; - - public static cef_client_t* get_client(cef_browser_host_t* self) - { - get_client_delegate d; - var p = self->_get_client; - if (p == _pb) { d = _db; } - else - { - d = (get_client_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_client_delegate)); - if (_pb == IntPtr.Zero) { _db = d; _pb = p; } - } - return d(self); - } - - // GetRequestContext - private static IntPtr _pc; - private static get_request_context_delegate _dc; - - public static cef_request_context_t* get_request_context(cef_browser_host_t* self) - { - get_request_context_delegate d; - var p = self->_get_request_context; - if (p == _pc) { d = _dc; } - else - { - d = (get_request_context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_request_context_delegate)); - if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } - } - return d(self); - } - - // CanZoom - private static IntPtr _pd; - private static can_zoom_delegate _dd; - - public static int can_zoom(cef_browser_host_t* self, CefZoomCommand command) - { - can_zoom_delegate d; - var p = self->_can_zoom; - if (p == _pd) { d = _dd; } - else - { - d = (can_zoom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_zoom_delegate)); - if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } - } - return d(self, command); - } - - // Zoom - private static IntPtr _pe; - private static zoom_delegate _de; - - public static void zoom(cef_browser_host_t* self, CefZoomCommand command) - { - zoom_delegate d; - var p = self->_zoom; - if (p == _pe) { d = _de; } - else - { - d = (zoom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(zoom_delegate)); - if (_pe == IntPtr.Zero) { _de = d; _pe = p; } - } - d(self, command); - } - - // GetDefaultZoomLevel - private static IntPtr _pf; - private static get_default_zoom_level_delegate _df; - - public static double get_default_zoom_level(cef_browser_host_t* self) - { - get_default_zoom_level_delegate d; - var p = self->_get_default_zoom_level; - if (p == _pf) { d = _df; } - else - { - d = (get_default_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_default_zoom_level_delegate)); - if (_pf == IntPtr.Zero) { _df = d; _pf = p; } - } - return d(self); - } - - // GetZoomLevel - private static IntPtr _p10; - private static get_zoom_level_delegate _d10; - - public static double get_zoom_level(cef_browser_host_t* self) - { - get_zoom_level_delegate d; - var p = self->_get_zoom_level; - if (p == _p10) { d = _d10; } - else - { - d = (get_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_zoom_level_delegate)); - if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } - } - return d(self); - } - - // SetZoomLevel - private static IntPtr _p11; - private static set_zoom_level_delegate _d11; - - public static void set_zoom_level(cef_browser_host_t* self, double zoomLevel) - { - set_zoom_level_delegate d; - var p = self->_set_zoom_level; - if (p == _p11) { d = _d11; } - else - { - d = (set_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_zoom_level_delegate)); - if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } - } - d(self, zoomLevel); - } - - // RunFileDialog - private static IntPtr _p12; - private static run_file_dialog_delegate _d12; - - public static void run_file_dialog(cef_browser_host_t* self, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_run_file_dialog_callback_t* callback) - { - run_file_dialog_delegate d; - var p = self->_run_file_dialog; - if (p == _p12) { d = _d12; } - else - { - d = (run_file_dialog_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(run_file_dialog_delegate)); - if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } - } - d(self, mode, title, default_file_path, accept_filters, callback); - } - - // StartDownload - private static IntPtr _p13; - private static start_download_delegate _d13; - - public static void start_download(cef_browser_host_t* self, cef_string_t* url) - { - start_download_delegate d; - var p = self->_start_download; - if (p == _p13) { d = _d13; } - else - { - d = (start_download_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(start_download_delegate)); - if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } - } - d(self, url); - } - - // DownloadImage - private static IntPtr _p14; - private static download_image_delegate _d14; - - public static void download_image(cef_browser_host_t* self, cef_string_t* image_url, int is_favicon, uint max_image_size, int bypass_cache, cef_download_image_callback_t* callback) - { - download_image_delegate d; - var p = self->_download_image; - if (p == _p14) { d = _d14; } - else - { - d = (download_image_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(download_image_delegate)); - if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } - } - d(self, image_url, is_favicon, max_image_size, bypass_cache, callback); - } - - // Print - private static IntPtr _p15; - private static print_delegate _d15; - - public static void print(cef_browser_host_t* self) - { - print_delegate d; - var p = self->_print; - if (p == _p15) { d = _d15; } - else - { - d = (print_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(print_delegate)); - if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } - } - d(self); - } - - // PrintToPDF - private static IntPtr _p16; - private static print_to_pdf_delegate _d16; - - public static void print_to_pdf(cef_browser_host_t* self, cef_string_t* path, cef_pdf_print_settings_t* settings, cef_pdf_print_callback_t* callback) - { - print_to_pdf_delegate d; - var p = self->_print_to_pdf; - if (p == _p16) { d = _d16; } - else - { - d = (print_to_pdf_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(print_to_pdf_delegate)); - if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } - } - d(self, path, settings, callback); - } - - // Find - private static IntPtr _p17; - private static find_delegate _d17; - - public static void find(cef_browser_host_t* self, cef_string_t* searchText, int forward, int matchCase, int findNext) - { - find_delegate d; - var p = self->_find; - if (p == _p17) { d = _d17; } - else - { - d = (find_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(find_delegate)); - if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } - } - d(self, searchText, forward, matchCase, findNext); - } - - // StopFinding - private static IntPtr _p18; - private static stop_finding_delegate _d18; - - public static void stop_finding(cef_browser_host_t* self, int clearSelection) - { - stop_finding_delegate d; - var p = self->_stop_finding; - if (p == _p18) { d = _d18; } - else - { - d = (stop_finding_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(stop_finding_delegate)); - if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } - } - d(self, clearSelection); - } - - // ShowDevTools - private static IntPtr _p19; - private static show_dev_tools_delegate _d19; - - public static void show_dev_tools(cef_browser_host_t* self, cef_window_info_t* windowInfo, cef_client_t* client, cef_browser_settings_t* settings, cef_point_t* inspect_element_at) - { - show_dev_tools_delegate d; - var p = self->_show_dev_tools; - if (p == _p19) { d = _d19; } - else - { - d = (show_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(show_dev_tools_delegate)); - if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } - } - d(self, windowInfo, client, settings, inspect_element_at); - } - - // CloseDevTools - private static IntPtr _p1a; - private static close_dev_tools_delegate _d1a; - - public static void close_dev_tools(cef_browser_host_t* self) - { - close_dev_tools_delegate d; - var p = self->_close_dev_tools; - if (p == _p1a) { d = _d1a; } - else - { - d = (close_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_dev_tools_delegate)); - if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } - } - d(self); - } - - // HasDevTools - private static IntPtr _p1b; - private static has_dev_tools_delegate _d1b; - - public static int has_dev_tools(cef_browser_host_t* self) - { - has_dev_tools_delegate d; - var p = self->_has_dev_tools; - if (p == _p1b) { d = _d1b; } - else - { - d = (has_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_dev_tools_delegate)); - if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } - } - return d(self); - } - - // SendDevToolsMessage - private static IntPtr _p1c; - private static send_dev_tools_message_delegate _d1c; - - public static int send_dev_tools_message(cef_browser_host_t* self, void* message, UIntPtr message_size) - { - send_dev_tools_message_delegate d; - var p = self->_send_dev_tools_message; - if (p == _p1c) { d = _d1c; } - else - { - d = (send_dev_tools_message_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_dev_tools_message_delegate)); - if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } - } - return d(self, message, message_size); - } - - // ExecuteDevToolsMethod - private static IntPtr _p1d; - private static execute_dev_tools_method_delegate _d1d; - - public static int execute_dev_tools_method(cef_browser_host_t* self, int message_id, cef_string_t* method, cef_dictionary_value_t* @params) - { - execute_dev_tools_method_delegate d; - var p = self->_execute_dev_tools_method; - if (p == _p1d) { d = _d1d; } - else - { - d = (execute_dev_tools_method_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_dev_tools_method_delegate)); - if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } - } - return d(self, message_id, method, @params); - } - - // AddDevToolsMessageObserver - private static IntPtr _p1e; - private static add_dev_tools_message_observer_delegate _d1e; - - public static cef_registration_t* add_dev_tools_message_observer(cef_browser_host_t* self, cef_dev_tools_message_observer_t* observer) - { - add_dev_tools_message_observer_delegate d; - var p = self->_add_dev_tools_message_observer; - if (p == _p1e) { d = _d1e; } - else - { - d = (add_dev_tools_message_observer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_dev_tools_message_observer_delegate)); - if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } - } - return d(self, observer); - } - - // GetNavigationEntries - private static IntPtr _p1f; - private static get_navigation_entries_delegate _d1f; - - public static void get_navigation_entries(cef_browser_host_t* self, cef_navigation_entry_visitor_t* visitor, int current_only) - { - get_navigation_entries_delegate d; - var p = self->_get_navigation_entries; - if (p == _p1f) { d = _d1f; } - else - { - d = (get_navigation_entries_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_navigation_entries_delegate)); - if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } - } - d(self, visitor, current_only); - } - - // ReplaceMisspelling - private static IntPtr _p20; - private static replace_misspelling_delegate _d20; - - public static void replace_misspelling(cef_browser_host_t* self, cef_string_t* word) - { - replace_misspelling_delegate d; - var p = self->_replace_misspelling; - if (p == _p20) { d = _d20; } - else - { - d = (replace_misspelling_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(replace_misspelling_delegate)); - if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } - } - d(self, word); - } - - // AddWordToDictionary - private static IntPtr _p21; - private static add_word_to_dictionary_delegate _d21; - - public static void add_word_to_dictionary(cef_browser_host_t* self, cef_string_t* word) - { - add_word_to_dictionary_delegate d; - var p = self->_add_word_to_dictionary; - if (p == _p21) { d = _d21; } - else - { - d = (add_word_to_dictionary_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_word_to_dictionary_delegate)); - if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } - } - d(self, word); - } - - // IsWindowRenderingDisabled - private static IntPtr _p22; - private static is_window_rendering_disabled_delegate _d22; - - public static int is_window_rendering_disabled(cef_browser_host_t* self) - { - is_window_rendering_disabled_delegate d; - var p = self->_is_window_rendering_disabled; - if (p == _p22) { d = _d22; } - else - { - d = (is_window_rendering_disabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_window_rendering_disabled_delegate)); - if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } - } - return d(self); - } - - // WasResized - private static IntPtr _p23; - private static was_resized_delegate _d23; - - public static void was_resized(cef_browser_host_t* self) - { - was_resized_delegate d; - var p = self->_was_resized; - if (p == _p23) { d = _d23; } - else - { - d = (was_resized_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_resized_delegate)); - if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } - } - d(self); - } - - // WasHidden - private static IntPtr _p24; - private static was_hidden_delegate _d24; - - public static void was_hidden(cef_browser_host_t* self, int hidden) - { - was_hidden_delegate d; - var p = self->_was_hidden; - if (p == _p24) { d = _d24; } - else - { - d = (was_hidden_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_hidden_delegate)); - if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } - } - d(self, hidden); - } - - // NotifyScreenInfoChanged - private static IntPtr _p25; - private static notify_screen_info_changed_delegate _d25; - - public static void notify_screen_info_changed(cef_browser_host_t* self) - { - notify_screen_info_changed_delegate d; - var p = self->_notify_screen_info_changed; - if (p == _p25) { d = _d25; } - else - { - d = (notify_screen_info_changed_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_screen_info_changed_delegate)); - if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } - } - d(self); - } - - // Invalidate - private static IntPtr _p26; - private static invalidate_delegate _d26; - - public static void invalidate(cef_browser_host_t* self, CefPaintElementType type) - { - invalidate_delegate d; - var p = self->_invalidate; - if (p == _p26) { d = _d26; } - else - { - d = (invalidate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(invalidate_delegate)); - if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } - } - d(self, type); - } - - // SendExternalBeginFrame - private static IntPtr _p27; - private static send_external_begin_frame_delegate _d27; - - public static void send_external_begin_frame(cef_browser_host_t* self) - { - send_external_begin_frame_delegate d; - var p = self->_send_external_begin_frame; - if (p == _p27) { d = _d27; } - else - { - d = (send_external_begin_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_external_begin_frame_delegate)); - if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } - } - d(self); - } - - // SendKeyEvent - private static IntPtr _p28; - private static send_key_event_delegate _d28; - - public static void send_key_event(cef_browser_host_t* self, cef_key_event_t* @event) - { - send_key_event_delegate d; - var p = self->_send_key_event; - if (p == _p28) { d = _d28; } - else - { - d = (send_key_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_key_event_delegate)); - if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } - } - d(self, @event); - } - - // SendMouseClickEvent - private static IntPtr _p29; - private static send_mouse_click_event_delegate _d29; - - public static void send_mouse_click_event(cef_browser_host_t* self, cef_mouse_event_t* @event, CefMouseButtonType type, int mouseUp, int clickCount) - { - send_mouse_click_event_delegate d; - var p = self->_send_mouse_click_event; - if (p == _p29) { d = _d29; } - else - { - d = (send_mouse_click_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_click_event_delegate)); - if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } - } - d(self, @event, type, mouseUp, clickCount); - } - - // SendMouseMoveEvent - private static IntPtr _p2a; - private static send_mouse_move_event_delegate _d2a; - - public static void send_mouse_move_event(cef_browser_host_t* self, cef_mouse_event_t* @event, int mouseLeave) - { - send_mouse_move_event_delegate d; - var p = self->_send_mouse_move_event; - if (p == _p2a) { d = _d2a; } - else - { - d = (send_mouse_move_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_move_event_delegate)); - if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } - } - d(self, @event, mouseLeave); - } - - // SendMouseWheelEvent - private static IntPtr _p2b; - private static send_mouse_wheel_event_delegate _d2b; - - public static void send_mouse_wheel_event(cef_browser_host_t* self, cef_mouse_event_t* @event, int deltaX, int deltaY) - { - send_mouse_wheel_event_delegate d; - var p = self->_send_mouse_wheel_event; - if (p == _p2b) { d = _d2b; } - else - { - d = (send_mouse_wheel_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_wheel_event_delegate)); - if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } - } - d(self, @event, deltaX, deltaY); - } - - // SendTouchEvent - private static IntPtr _p2c; - private static send_touch_event_delegate _d2c; - - public static void send_touch_event(cef_browser_host_t* self, cef_touch_event_t* @event) - { - send_touch_event_delegate d; - var p = self->_send_touch_event; - if (p == _p2c) { d = _d2c; } - else - { - d = (send_touch_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_touch_event_delegate)); - if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } - } - d(self, @event); - } - - // SendCaptureLostEvent - private static IntPtr _p2d; - private static send_capture_lost_event_delegate _d2d; - - public static void send_capture_lost_event(cef_browser_host_t* self) - { - send_capture_lost_event_delegate d; - var p = self->_send_capture_lost_event; - if (p == _p2d) { d = _d2d; } - else - { - d = (send_capture_lost_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_capture_lost_event_delegate)); - if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } - } - d(self); - } - - // NotifyMoveOrResizeStarted - private static IntPtr _p2e; - private static notify_move_or_resize_started_delegate _d2e; - - public static void notify_move_or_resize_started(cef_browser_host_t* self) - { - notify_move_or_resize_started_delegate d; - var p = self->_notify_move_or_resize_started; - if (p == _p2e) { d = _d2e; } - else - { - d = (notify_move_or_resize_started_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_move_or_resize_started_delegate)); - if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } - } - d(self); - } - - // GetWindowlessFrameRate - private static IntPtr _p2f; - private static get_windowless_frame_rate_delegate _d2f; - - public static int get_windowless_frame_rate(cef_browser_host_t* self) - { - get_windowless_frame_rate_delegate d; - var p = self->_get_windowless_frame_rate; - if (p == _p2f) { d = _d2f; } - else - { - d = (get_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_windowless_frame_rate_delegate)); - if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } - } - return d(self); - } - - // SetWindowlessFrameRate - private static IntPtr _p30; - private static set_windowless_frame_rate_delegate _d30; - - public static void set_windowless_frame_rate(cef_browser_host_t* self, int frame_rate) - { - set_windowless_frame_rate_delegate d; - var p = self->_set_windowless_frame_rate; - if (p == _p30) { d = _d30; } - else - { - d = (set_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_windowless_frame_rate_delegate)); - if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } - } - d(self, frame_rate); - } - - // ImeSetComposition - private static IntPtr _p31; - private static ime_set_composition_delegate _d31; - - public static void ime_set_composition(cef_browser_host_t* self, cef_string_t* text, UIntPtr underlinesCount, cef_composition_underline_t* underlines, cef_range_t* replacement_range, cef_range_t* selection_range) - { - ime_set_composition_delegate d; - var p = self->_ime_set_composition; - if (p == _p31) { d = _d31; } - else - { - d = (ime_set_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_set_composition_delegate)); - if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } - } - d(self, text, underlinesCount, underlines, replacement_range, selection_range); - } - - // ImeCommitText - private static IntPtr _p32; - private static ime_commit_text_delegate _d32; - - public static void ime_commit_text(cef_browser_host_t* self, cef_string_t* text, cef_range_t* replacement_range, int relative_cursor_pos) - { - ime_commit_text_delegate d; - var p = self->_ime_commit_text; - if (p == _p32) { d = _d32; } - else - { - d = (ime_commit_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_commit_text_delegate)); - if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } - } - d(self, text, replacement_range, relative_cursor_pos); - } - - // ImeFinishComposingText - private static IntPtr _p33; - private static ime_finish_composing_text_delegate _d33; - - public static void ime_finish_composing_text(cef_browser_host_t* self, int keep_selection) - { - ime_finish_composing_text_delegate d; - var p = self->_ime_finish_composing_text; - if (p == _p33) { d = _d33; } - else - { - d = (ime_finish_composing_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_finish_composing_text_delegate)); - if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } - } - d(self, keep_selection); - } - - // ImeCancelComposition - private static IntPtr _p34; - private static ime_cancel_composition_delegate _d34; - - public static void ime_cancel_composition(cef_browser_host_t* self) - { - ime_cancel_composition_delegate d; - var p = self->_ime_cancel_composition; - if (p == _p34) { d = _d34; } - else - { - d = (ime_cancel_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_cancel_composition_delegate)); - if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } - } - d(self); - } - - // DragTargetDragEnter - private static IntPtr _p35; - private static drag_target_drag_enter_delegate _d35; - - public static void drag_target_drag_enter(cef_browser_host_t* self, cef_drag_data_t* drag_data, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops) - { - drag_target_drag_enter_delegate d; - var p = self->_drag_target_drag_enter; - if (p == _p35) { d = _d35; } - else - { - d = (drag_target_drag_enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_enter_delegate)); - if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } - } - d(self, drag_data, @event, allowed_ops); - } - - // DragTargetDragOver - private static IntPtr _p36; - private static drag_target_drag_over_delegate _d36; - - public static void drag_target_drag_over(cef_browser_host_t* self, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops) - { - drag_target_drag_over_delegate d; - var p = self->_drag_target_drag_over; - if (p == _p36) { d = _d36; } - else - { - d = (drag_target_drag_over_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_over_delegate)); - if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } - } - d(self, @event, allowed_ops); - } - - // DragTargetDragLeave - private static IntPtr _p37; - private static drag_target_drag_leave_delegate _d37; - - public static void drag_target_drag_leave(cef_browser_host_t* self) - { - drag_target_drag_leave_delegate d; - var p = self->_drag_target_drag_leave; - if (p == _p37) { d = _d37; } - else - { - d = (drag_target_drag_leave_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_leave_delegate)); - if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } - } - d(self); - } - - // DragTargetDrop - private static IntPtr _p38; - private static drag_target_drop_delegate _d38; - - public static void drag_target_drop(cef_browser_host_t* self, cef_mouse_event_t* @event) - { - drag_target_drop_delegate d; - var p = self->_drag_target_drop; - if (p == _p38) { d = _d38; } - else - { - d = (drag_target_drop_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drop_delegate)); - if (_p38 == IntPtr.Zero) { _d38 = d; _p38 = p; } - } - d(self, @event); - } - - // DragSourceEndedAt - private static IntPtr _p39; - private static drag_source_ended_at_delegate _d39; - - public static void drag_source_ended_at(cef_browser_host_t* self, int x, int y, CefDragOperationsMask op) - { - drag_source_ended_at_delegate d; - var p = self->_drag_source_ended_at; - if (p == _p39) { d = _d39; } - else - { - d = (drag_source_ended_at_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_ended_at_delegate)); - if (_p39 == IntPtr.Zero) { _d39 = d; _p39 = p; } - } - d(self, x, y, op); - } - - // DragSourceSystemDragEnded - private static IntPtr _p3a; - private static drag_source_system_drag_ended_delegate _d3a; - - public static void drag_source_system_drag_ended(cef_browser_host_t* self) - { - drag_source_system_drag_ended_delegate d; - var p = self->_drag_source_system_drag_ended; - if (p == _p3a) { d = _d3a; } - else - { - d = (drag_source_system_drag_ended_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_system_drag_ended_delegate)); - if (_p3a == IntPtr.Zero) { _d3a = d; _p3a = p; } - } - d(self); - } - - // GetVisibleNavigationEntry - private static IntPtr _p3b; - private static get_visible_navigation_entry_delegate _d3b; - - public static cef_navigation_entry_t* get_visible_navigation_entry(cef_browser_host_t* self) - { - get_visible_navigation_entry_delegate d; - var p = self->_get_visible_navigation_entry; - if (p == _p3b) { d = _d3b; } - else - { - d = (get_visible_navigation_entry_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_visible_navigation_entry_delegate)); - if (_p3b == IntPtr.Zero) { _d3b = d; _p3b = p; } - } - return d(self); - } - - // SetAccessibilityState - private static IntPtr _p3c; - private static set_accessibility_state_delegate _d3c; - - public static void set_accessibility_state(cef_browser_host_t* self, CefState accessibility_state) - { - set_accessibility_state_delegate d; - var p = self->_set_accessibility_state; - if (p == _p3c) { d = _d3c; } - else - { - d = (set_accessibility_state_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_accessibility_state_delegate)); - if (_p3c == IntPtr.Zero) { _d3c = d; _p3c = p; } - } - d(self, accessibility_state); - } - - // SetAutoResizeEnabled - private static IntPtr _p3d; - private static set_auto_resize_enabled_delegate _d3d; - - public static void set_auto_resize_enabled(cef_browser_host_t* self, int enabled, cef_size_t* min_size, cef_size_t* max_size) - { - set_auto_resize_enabled_delegate d; - var p = self->_set_auto_resize_enabled; - if (p == _p3d) { d = _d3d; } - else - { - d = (set_auto_resize_enabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_auto_resize_enabled_delegate)); - if (_p3d == IntPtr.Zero) { _d3d = d; _p3d = p; } - } - d(self, enabled, min_size, max_size); - } - - // GetExtension - private static IntPtr _p3e; - private static get_extension_delegate _d3e; - - public static cef_extension_t* get_extension(cef_browser_host_t* self) - { - get_extension_delegate d; - var p = self->_get_extension; - if (p == _p3e) { d = _d3e; } - else - { - d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate)); - if (_p3e == IntPtr.Zero) { _d3e = d; _p3e = p; } - } - return d(self); - } - - // IsBackgroundHost - private static IntPtr _p3f; - private static is_background_host_delegate _d3f; - - public static int is_background_host(cef_browser_host_t* self) - { - is_background_host_delegate d; - var p = self->_is_background_host; - if (p == _p3f) { d = _d3f; } - else - { - d = (is_background_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_background_host_delegate)); - if (_p3f == IntPtr.Zero) { _d3f = d; _p3f = p; } - } - return d(self); - } - - // SetAudioMuted - private static IntPtr _p40; - private static set_audio_muted_delegate _d40; - - public static void set_audio_muted(cef_browser_host_t* self, int mute) - { - set_audio_muted_delegate d; - var p = self->_set_audio_muted; - if (p == _p40) { d = _d40; } - else - { - d = (set_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_audio_muted_delegate)); - if (_p40 == IntPtr.Zero) { _d40 = d; _p40 = p; } - } - d(self, mute); - } - - // IsAudioMuted - private static IntPtr _p41; - private static is_audio_muted_delegate _d41; - - public static int is_audio_muted(cef_browser_host_t* self) - { - is_audio_muted_delegate d; - var p = self->_is_audio_muted; - if (p == _p41) { d = _d41; } - else - { - d = (is_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_audio_muted_delegate)); - if (_p41 == IntPtr.Zero) { _d41 = d; _p41 = p; } - } - return d(self); - } - - // IsFullscreen - private static IntPtr _p42; - private static is_fullscreen_delegate _d42; - - public static int is_fullscreen(cef_browser_host_t* self) - { - is_fullscreen_delegate d; - var p = self->_is_fullscreen; - if (p == _p42) { d = _d42; } - else - { - d = (is_fullscreen_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_fullscreen_delegate)); - if (_p42 == IntPtr.Zero) { _d42 = d; _p42 = p; } - } - return d(self); - } - - // ExitFullscreen - private static IntPtr _p43; - private static exit_fullscreen_delegate _d43; - - public static void exit_fullscreen(cef_browser_host_t* self, int will_cause_resize) - { - exit_fullscreen_delegate d; - var p = self->_exit_fullscreen; - if (p == _p43) { d = _d43; } - else - { - d = (exit_fullscreen_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(exit_fullscreen_delegate)); - if (_p43 == IntPtr.Zero) { _d43 = d; _p43 = p; } - } - d(self, will_cause_resize); - } - - // CanExecuteChromeCommand - private static IntPtr _p44; - private static can_execute_chrome_command_delegate _d44; - - public static int can_execute_chrome_command(cef_browser_host_t* self, int command_id) - { - can_execute_chrome_command_delegate d; - var p = self->_can_execute_chrome_command; - if (p == _p44) { d = _d44; } - else - { - d = (can_execute_chrome_command_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_execute_chrome_command_delegate)); - if (_p44 == IntPtr.Zero) { _d44 = d; _p44 = p; } - } - return d(self, command_id); - } - - // ExecuteChromeCommand - private static IntPtr _p45; - private static execute_chrome_command_delegate _d45; - - public static void execute_chrome_command(cef_browser_host_t* self, int command_id, CefWindowOpenDisposition disposition) - { - execute_chrome_command_delegate d; - var p = self->_execute_chrome_command; - if (p == _p45) { d = _d45; } - else - { - d = (execute_chrome_command_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_chrome_command_delegate)); - if (_p45 == IntPtr.Zero) { _d45 = d; _p45 = p; } - } - d(self, command_id, disposition); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_browser_host_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _get_browser; + internal IntPtr _close_browser; + internal IntPtr _try_close_browser; + internal IntPtr _set_focus; + internal IntPtr _get_window_handle; + internal IntPtr _get_opener_window_handle; + internal IntPtr _has_view; + internal IntPtr _get_client; + internal IntPtr _get_request_context; + internal IntPtr _can_zoom; + internal IntPtr _zoom; + internal IntPtr _get_default_zoom_level; + internal IntPtr _get_zoom_level; + internal IntPtr _set_zoom_level; + internal IntPtr _run_file_dialog; + internal IntPtr _start_download; + internal IntPtr _download_image; + internal IntPtr _print; + internal IntPtr _print_to_pdf; + internal IntPtr _find; + internal IntPtr _stop_finding; + internal IntPtr _show_dev_tools; + internal IntPtr _close_dev_tools; + internal IntPtr _has_dev_tools; + internal IntPtr _send_dev_tools_message; + internal IntPtr _execute_dev_tools_method; + internal IntPtr _add_dev_tools_message_observer; + internal IntPtr _get_navigation_entries; + internal IntPtr _replace_misspelling; + internal IntPtr _add_word_to_dictionary; + internal IntPtr _is_window_rendering_disabled; + internal IntPtr _was_resized; + internal IntPtr _was_hidden; + internal IntPtr _notify_screen_info_changed; + internal IntPtr _invalidate; + internal IntPtr _send_external_begin_frame; + internal IntPtr _send_key_event; + internal IntPtr _send_mouse_click_event; + internal IntPtr _send_mouse_move_event; + internal IntPtr _send_mouse_wheel_event; + internal IntPtr _send_touch_event; + internal IntPtr _send_capture_lost_event; + internal IntPtr _notify_move_or_resize_started; + internal IntPtr _get_windowless_frame_rate; + internal IntPtr _set_windowless_frame_rate; + internal IntPtr _ime_set_composition; + internal IntPtr _ime_commit_text; + internal IntPtr _ime_finish_composing_text; + internal IntPtr _ime_cancel_composition; + internal IntPtr _drag_target_drag_enter; + internal IntPtr _drag_target_drag_over; + internal IntPtr _drag_target_drag_leave; + internal IntPtr _drag_target_drop; + internal IntPtr _drag_source_ended_at; + internal IntPtr _drag_source_system_drag_ended; + internal IntPtr _get_visible_navigation_entry; + internal IntPtr _set_accessibility_state; + internal IntPtr _set_auto_resize_enabled; + internal IntPtr _get_extension; + internal IntPtr _is_background_host; + internal IntPtr _set_audio_muted; + internal IntPtr _is_audio_muted; + internal IntPtr _is_fullscreen; + internal IntPtr _exit_fullscreen; + internal IntPtr _can_execute_chrome_command; + internal IntPtr _execute_chrome_command; + internal IntPtr _is_render_process_unresponsive; + internal IntPtr _get_runtime_style; + + // CreateBrowser + [DllImport(libcef.DllName, EntryPoint = "cef_browser_host_create_browser", CallingConvention = libcef.CEF_CALL)] + public static extern int create_browser(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_dictionary_value_t* extra_info, cef_request_context_t* request_context); + + // CreateBrowserSync + [DllImport(libcef.DllName, EntryPoint = "cef_browser_host_create_browser_sync", CallingConvention = libcef.CEF_CALL)] + public static extern cef_browser_t* create_browser_sync(cef_window_info_t* windowInfo, cef_client_t* client, cef_string_t* url, cef_browser_settings_t* settings, cef_dictionary_value_t* extra_info, cef_request_context_t* request_context); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_browser_t* get_browser_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void close_browser_delegate(cef_browser_host_t* self, int force_close); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int try_close_browser_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_focus_delegate(cef_browser_host_t* self, int focus); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate IntPtr get_window_handle_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate IntPtr get_opener_window_handle_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_view_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_client_t* get_client_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_request_context_t* get_request_context_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int can_zoom_delegate(cef_browser_host_t* self, CefZoomCommand command); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void zoom_delegate(cef_browser_host_t* self, CefZoomCommand command); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate double get_default_zoom_level_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate double get_zoom_level_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_zoom_level_delegate(cef_browser_host_t* self, double zoomLevel); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void run_file_dialog_delegate(cef_browser_host_t* self, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_run_file_dialog_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void start_download_delegate(cef_browser_host_t* self, cef_string_t* url); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void download_image_delegate(cef_browser_host_t* self, cef_string_t* image_url, int is_favicon, uint max_image_size, int bypass_cache, cef_download_image_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void print_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void print_to_pdf_delegate(cef_browser_host_t* self, cef_string_t* path, cef_pdf_print_settings_t* settings, cef_pdf_print_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void find_delegate(cef_browser_host_t* self, cef_string_t* searchText, int forward, int matchCase, int findNext); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void stop_finding_delegate(cef_browser_host_t* self, int clearSelection); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void show_dev_tools_delegate(cef_browser_host_t* self, cef_window_info_t* windowInfo, cef_client_t* client, cef_browser_settings_t* settings, cef_point_t* inspect_element_at); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void close_dev_tools_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_dev_tools_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int send_dev_tools_message_delegate(cef_browser_host_t* self, void* message, UIntPtr message_size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int execute_dev_tools_method_delegate(cef_browser_host_t* self, int message_id, cef_string_t* method, cef_dictionary_value_t* @params); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_registration_t* add_dev_tools_message_observer_delegate(cef_browser_host_t* self, cef_dev_tools_message_observer_t* observer); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_navigation_entries_delegate(cef_browser_host_t* self, cef_navigation_entry_visitor_t* visitor, int current_only); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void replace_misspelling_delegate(cef_browser_host_t* self, cef_string_t* word); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_word_to_dictionary_delegate(cef_browser_host_t* self, cef_string_t* word); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_window_rendering_disabled_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void was_resized_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void was_hidden_delegate(cef_browser_host_t* self, int hidden); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void notify_screen_info_changed_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void invalidate_delegate(cef_browser_host_t* self, CefPaintElementType type); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_external_begin_frame_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_key_event_delegate(cef_browser_host_t* self, cef_key_event_t* @event); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_mouse_click_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, CefMouseButtonType type, int mouseUp, int clickCount); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_mouse_move_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, int mouseLeave); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_mouse_wheel_event_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, int deltaX, int deltaY); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_touch_event_delegate(cef_browser_host_t* self, cef_touch_event_t* @event); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_capture_lost_event_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void notify_move_or_resize_started_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_windowless_frame_rate_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_windowless_frame_rate_delegate(cef_browser_host_t* self, int frame_rate); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void ime_set_composition_delegate(cef_browser_host_t* self, cef_string_t* text, UIntPtr underlinesCount, cef_composition_underline_t* underlines, cef_range_t* replacement_range, cef_range_t* selection_range); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void ime_commit_text_delegate(cef_browser_host_t* self, cef_string_t* text, cef_range_t* replacement_range, int relative_cursor_pos); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void ime_finish_composing_text_delegate(cef_browser_host_t* self, int keep_selection); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void ime_cancel_composition_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_target_drag_enter_delegate(cef_browser_host_t* self, cef_drag_data_t* drag_data, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_target_drag_over_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_target_drag_leave_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_target_drop_delegate(cef_browser_host_t* self, cef_mouse_event_t* @event); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_source_ended_at_delegate(cef_browser_host_t* self, int x, int y, CefDragOperationsMask op); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void drag_source_system_drag_ended_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_navigation_entry_t* get_visible_navigation_entry_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_accessibility_state_delegate(cef_browser_host_t* self, CefState accessibility_state); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_auto_resize_enabled_delegate(cef_browser_host_t* self, int enabled, cef_size_t* min_size, cef_size_t* max_size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_extension_t* get_extension_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_background_host_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_audio_muted_delegate(cef_browser_host_t* self, int mute); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_audio_muted_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_fullscreen_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void exit_fullscreen_delegate(cef_browser_host_t* self, int will_cause_resize); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int can_execute_chrome_command_delegate(cef_browser_host_t* self, int command_id); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void execute_chrome_command_delegate(cef_browser_host_t* self, int command_id, CefWindowOpenDisposition disposition); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_render_process_unresponsive_delegate(cef_browser_host_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefRuntimeStyle get_runtime_style_delegate(cef_browser_host_t* self); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_browser_host_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_browser_host_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_browser_host_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_browser_host_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // GetBrowser + private static IntPtr _p4; + private static get_browser_delegate _d4; + + public static cef_browser_t* get_browser(cef_browser_host_t* self) + { + get_browser_delegate d; + var p = self->_get_browser; + if (p == _p4) { d = _d4; } + else + { + d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + return d(self); + } + + // CloseBrowser + private static IntPtr _p5; + private static close_browser_delegate _d5; + + public static void close_browser(cef_browser_host_t* self, int force_close) + { + close_browser_delegate d; + var p = self->_close_browser; + if (p == _p5) { d = _d5; } + else + { + d = (close_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_browser_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + d(self, force_close); + } + + // TryCloseBrowser + private static IntPtr _p6; + private static try_close_browser_delegate _d6; + + public static int try_close_browser(cef_browser_host_t* self) + { + try_close_browser_delegate d; + var p = self->_try_close_browser; + if (p == _p6) { d = _d6; } + else + { + d = (try_close_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(try_close_browser_delegate)); + if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } + } + return d(self); + } + + // SetFocus + private static IntPtr _p7; + private static set_focus_delegate _d7; + + public static void set_focus(cef_browser_host_t* self, int focus) + { + set_focus_delegate d; + var p = self->_set_focus; + if (p == _p7) { d = _d7; } + else + { + d = (set_focus_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_focus_delegate)); + if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } + } + d(self, focus); + } + + // GetWindowHandle + private static IntPtr _p8; + private static get_window_handle_delegate _d8; + + public static IntPtr get_window_handle(cef_browser_host_t* self) + { + get_window_handle_delegate d; + var p = self->_get_window_handle; + if (p == _p8) { d = _d8; } + else + { + d = (get_window_handle_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_window_handle_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + return d(self); + } + + // GetOpenerWindowHandle + private static IntPtr _p9; + private static get_opener_window_handle_delegate _d9; + + public static IntPtr get_opener_window_handle(cef_browser_host_t* self) + { + get_opener_window_handle_delegate d; + var p = self->_get_opener_window_handle; + if (p == _p9) { d = _d9; } + else + { + d = (get_opener_window_handle_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_opener_window_handle_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + return d(self); + } + + // HasView + private static IntPtr _pa; + private static has_view_delegate _da; + + public static int has_view(cef_browser_host_t* self) + { + has_view_delegate d; + var p = self->_has_view; + if (p == _pa) { d = _da; } + else + { + d = (has_view_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_view_delegate)); + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + } + return d(self); + } + + // GetClient + private static IntPtr _pb; + private static get_client_delegate _db; + + public static cef_client_t* get_client(cef_browser_host_t* self) + { + get_client_delegate d; + var p = self->_get_client; + if (p == _pb) { d = _db; } + else + { + d = (get_client_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_client_delegate)); + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } + } + return d(self); + } + + // GetRequestContext + private static IntPtr _pc; + private static get_request_context_delegate _dc; + + public static cef_request_context_t* get_request_context(cef_browser_host_t* self) + { + get_request_context_delegate d; + var p = self->_get_request_context; + if (p == _pc) { d = _dc; } + else + { + d = (get_request_context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_request_context_delegate)); + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } + } + return d(self); + } + + // CanZoom + private static IntPtr _pd; + private static can_zoom_delegate _dd; + + public static int can_zoom(cef_browser_host_t* self, CefZoomCommand command) + { + can_zoom_delegate d; + var p = self->_can_zoom; + if (p == _pd) { d = _dd; } + else + { + d = (can_zoom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_zoom_delegate)); + if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } + } + return d(self, command); + } + + // Zoom + private static IntPtr _pe; + private static zoom_delegate _de; + + public static void zoom(cef_browser_host_t* self, CefZoomCommand command) + { + zoom_delegate d; + var p = self->_zoom; + if (p == _pe) { d = _de; } + else + { + d = (zoom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(zoom_delegate)); + if (_pe == IntPtr.Zero) { _de = d; _pe = p; } + } + d(self, command); + } + + // GetDefaultZoomLevel + private static IntPtr _pf; + private static get_default_zoom_level_delegate _df; + + public static double get_default_zoom_level(cef_browser_host_t* self) + { + get_default_zoom_level_delegate d; + var p = self->_get_default_zoom_level; + if (p == _pf) { d = _df; } + else + { + d = (get_default_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_default_zoom_level_delegate)); + if (_pf == IntPtr.Zero) { _df = d; _pf = p; } + } + return d(self); + } + + // GetZoomLevel + private static IntPtr _p10; + private static get_zoom_level_delegate _d10; + + public static double get_zoom_level(cef_browser_host_t* self) + { + get_zoom_level_delegate d; + var p = self->_get_zoom_level; + if (p == _p10) { d = _d10; } + else + { + d = (get_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_zoom_level_delegate)); + if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } + } + return d(self); + } + + // SetZoomLevel + private static IntPtr _p11; + private static set_zoom_level_delegate _d11; + + public static void set_zoom_level(cef_browser_host_t* self, double zoomLevel) + { + set_zoom_level_delegate d; + var p = self->_set_zoom_level; + if (p == _p11) { d = _d11; } + else + { + d = (set_zoom_level_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_zoom_level_delegate)); + if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } + } + d(self, zoomLevel); + } + + // RunFileDialog + private static IntPtr _p12; + private static run_file_dialog_delegate _d12; + + public static void run_file_dialog(cef_browser_host_t* self, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_run_file_dialog_callback_t* callback) + { + run_file_dialog_delegate d; + var p = self->_run_file_dialog; + if (p == _p12) { d = _d12; } + else + { + d = (run_file_dialog_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(run_file_dialog_delegate)); + if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } + } + d(self, mode, title, default_file_path, accept_filters, callback); + } + + // StartDownload + private static IntPtr _p13; + private static start_download_delegate _d13; + + public static void start_download(cef_browser_host_t* self, cef_string_t* url) + { + start_download_delegate d; + var p = self->_start_download; + if (p == _p13) { d = _d13; } + else + { + d = (start_download_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(start_download_delegate)); + if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } + } + d(self, url); + } + + // DownloadImage + private static IntPtr _p14; + private static download_image_delegate _d14; + + public static void download_image(cef_browser_host_t* self, cef_string_t* image_url, int is_favicon, uint max_image_size, int bypass_cache, cef_download_image_callback_t* callback) + { + download_image_delegate d; + var p = self->_download_image; + if (p == _p14) { d = _d14; } + else + { + d = (download_image_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(download_image_delegate)); + if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } + } + d(self, image_url, is_favicon, max_image_size, bypass_cache, callback); + } + + // Print + private static IntPtr _p15; + private static print_delegate _d15; + + public static void print(cef_browser_host_t* self) + { + print_delegate d; + var p = self->_print; + if (p == _p15) { d = _d15; } + else + { + d = (print_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(print_delegate)); + if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } + } + d(self); + } + + // PrintToPDF + private static IntPtr _p16; + private static print_to_pdf_delegate _d16; + + public static void print_to_pdf(cef_browser_host_t* self, cef_string_t* path, cef_pdf_print_settings_t* settings, cef_pdf_print_callback_t* callback) + { + print_to_pdf_delegate d; + var p = self->_print_to_pdf; + if (p == _p16) { d = _d16; } + else + { + d = (print_to_pdf_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(print_to_pdf_delegate)); + if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } + } + d(self, path, settings, callback); + } + + // Find + private static IntPtr _p17; + private static find_delegate _d17; + + public static void find(cef_browser_host_t* self, cef_string_t* searchText, int forward, int matchCase, int findNext) + { + find_delegate d; + var p = self->_find; + if (p == _p17) { d = _d17; } + else + { + d = (find_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(find_delegate)); + if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } + } + d(self, searchText, forward, matchCase, findNext); + } + + // StopFinding + private static IntPtr _p18; + private static stop_finding_delegate _d18; + + public static void stop_finding(cef_browser_host_t* self, int clearSelection) + { + stop_finding_delegate d; + var p = self->_stop_finding; + if (p == _p18) { d = _d18; } + else + { + d = (stop_finding_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(stop_finding_delegate)); + if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } + } + d(self, clearSelection); + } + + // ShowDevTools + private static IntPtr _p19; + private static show_dev_tools_delegate _d19; + + public static void show_dev_tools(cef_browser_host_t* self, cef_window_info_t* windowInfo, cef_client_t* client, cef_browser_settings_t* settings, cef_point_t* inspect_element_at) + { + show_dev_tools_delegate d; + var p = self->_show_dev_tools; + if (p == _p19) { d = _d19; } + else + { + d = (show_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(show_dev_tools_delegate)); + if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + } + d(self, windowInfo, client, settings, inspect_element_at); + } + + // CloseDevTools + private static IntPtr _p1a; + private static close_dev_tools_delegate _d1a; + + public static void close_dev_tools(cef_browser_host_t* self) + { + close_dev_tools_delegate d; + var p = self->_close_dev_tools; + if (p == _p1a) { d = _d1a; } + else + { + d = (close_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_dev_tools_delegate)); + if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + } + d(self); + } + + // HasDevTools + private static IntPtr _p1b; + private static has_dev_tools_delegate _d1b; + + public static int has_dev_tools(cef_browser_host_t* self) + { + has_dev_tools_delegate d; + var p = self->_has_dev_tools; + if (p == _p1b) { d = _d1b; } + else + { + d = (has_dev_tools_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_dev_tools_delegate)); + if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + } + return d(self); + } + + // SendDevToolsMessage + private static IntPtr _p1c; + private static send_dev_tools_message_delegate _d1c; + + public static int send_dev_tools_message(cef_browser_host_t* self, void* message, UIntPtr message_size) + { + send_dev_tools_message_delegate d; + var p = self->_send_dev_tools_message; + if (p == _p1c) { d = _d1c; } + else + { + d = (send_dev_tools_message_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_dev_tools_message_delegate)); + if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } + } + return d(self, message, message_size); + } + + // ExecuteDevToolsMethod + private static IntPtr _p1d; + private static execute_dev_tools_method_delegate _d1d; + + public static int execute_dev_tools_method(cef_browser_host_t* self, int message_id, cef_string_t* method, cef_dictionary_value_t* @params) + { + execute_dev_tools_method_delegate d; + var p = self->_execute_dev_tools_method; + if (p == _p1d) { d = _d1d; } + else + { + d = (execute_dev_tools_method_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_dev_tools_method_delegate)); + if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } + } + return d(self, message_id, method, @params); + } + + // AddDevToolsMessageObserver + private static IntPtr _p1e; + private static add_dev_tools_message_observer_delegate _d1e; + + public static cef_registration_t* add_dev_tools_message_observer(cef_browser_host_t* self, cef_dev_tools_message_observer_t* observer) + { + add_dev_tools_message_observer_delegate d; + var p = self->_add_dev_tools_message_observer; + if (p == _p1e) { d = _d1e; } + else + { + d = (add_dev_tools_message_observer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_dev_tools_message_observer_delegate)); + if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } + } + return d(self, observer); + } + + // GetNavigationEntries + private static IntPtr _p1f; + private static get_navigation_entries_delegate _d1f; + + public static void get_navigation_entries(cef_browser_host_t* self, cef_navigation_entry_visitor_t* visitor, int current_only) + { + get_navigation_entries_delegate d; + var p = self->_get_navigation_entries; + if (p == _p1f) { d = _d1f; } + else + { + d = (get_navigation_entries_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_navigation_entries_delegate)); + if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } + } + d(self, visitor, current_only); + } + + // ReplaceMisspelling + private static IntPtr _p20; + private static replace_misspelling_delegate _d20; + + public static void replace_misspelling(cef_browser_host_t* self, cef_string_t* word) + { + replace_misspelling_delegate d; + var p = self->_replace_misspelling; + if (p == _p20) { d = _d20; } + else + { + d = (replace_misspelling_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(replace_misspelling_delegate)); + if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } + } + d(self, word); + } + + // AddWordToDictionary + private static IntPtr _p21; + private static add_word_to_dictionary_delegate _d21; + + public static void add_word_to_dictionary(cef_browser_host_t* self, cef_string_t* word) + { + add_word_to_dictionary_delegate d; + var p = self->_add_word_to_dictionary; + if (p == _p21) { d = _d21; } + else + { + d = (add_word_to_dictionary_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_word_to_dictionary_delegate)); + if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } + } + d(self, word); + } + + // IsWindowRenderingDisabled + private static IntPtr _p22; + private static is_window_rendering_disabled_delegate _d22; + + public static int is_window_rendering_disabled(cef_browser_host_t* self) + { + is_window_rendering_disabled_delegate d; + var p = self->_is_window_rendering_disabled; + if (p == _p22) { d = _d22; } + else + { + d = (is_window_rendering_disabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_window_rendering_disabled_delegate)); + if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } + } + return d(self); + } + + // WasResized + private static IntPtr _p23; + private static was_resized_delegate _d23; + + public static void was_resized(cef_browser_host_t* self) + { + was_resized_delegate d; + var p = self->_was_resized; + if (p == _p23) { d = _d23; } + else + { + d = (was_resized_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_resized_delegate)); + if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } + } + d(self); + } + + // WasHidden + private static IntPtr _p24; + private static was_hidden_delegate _d24; + + public static void was_hidden(cef_browser_host_t* self, int hidden) + { + was_hidden_delegate d; + var p = self->_was_hidden; + if (p == _p24) { d = _d24; } + else + { + d = (was_hidden_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_hidden_delegate)); + if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } + } + d(self, hidden); + } + + // NotifyScreenInfoChanged + private static IntPtr _p25; + private static notify_screen_info_changed_delegate _d25; + + public static void notify_screen_info_changed(cef_browser_host_t* self) + { + notify_screen_info_changed_delegate d; + var p = self->_notify_screen_info_changed; + if (p == _p25) { d = _d25; } + else + { + d = (notify_screen_info_changed_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_screen_info_changed_delegate)); + if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } + } + d(self); + } + + // Invalidate + private static IntPtr _p26; + private static invalidate_delegate _d26; + + public static void invalidate(cef_browser_host_t* self, CefPaintElementType type) + { + invalidate_delegate d; + var p = self->_invalidate; + if (p == _p26) { d = _d26; } + else + { + d = (invalidate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(invalidate_delegate)); + if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } + } + d(self, type); + } + + // SendExternalBeginFrame + private static IntPtr _p27; + private static send_external_begin_frame_delegate _d27; + + public static void send_external_begin_frame(cef_browser_host_t* self) + { + send_external_begin_frame_delegate d; + var p = self->_send_external_begin_frame; + if (p == _p27) { d = _d27; } + else + { + d = (send_external_begin_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_external_begin_frame_delegate)); + if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } + } + d(self); + } + + // SendKeyEvent + private static IntPtr _p28; + private static send_key_event_delegate _d28; + + public static void send_key_event(cef_browser_host_t* self, cef_key_event_t* @event) + { + send_key_event_delegate d; + var p = self->_send_key_event; + if (p == _p28) { d = _d28; } + else + { + d = (send_key_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_key_event_delegate)); + if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } + } + d(self, @event); + } + + // SendMouseClickEvent + private static IntPtr _p29; + private static send_mouse_click_event_delegate _d29; + + public static void send_mouse_click_event(cef_browser_host_t* self, cef_mouse_event_t* @event, CefMouseButtonType type, int mouseUp, int clickCount) + { + send_mouse_click_event_delegate d; + var p = self->_send_mouse_click_event; + if (p == _p29) { d = _d29; } + else + { + d = (send_mouse_click_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_click_event_delegate)); + if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } + } + d(self, @event, type, mouseUp, clickCount); + } + + // SendMouseMoveEvent + private static IntPtr _p2a; + private static send_mouse_move_event_delegate _d2a; + + public static void send_mouse_move_event(cef_browser_host_t* self, cef_mouse_event_t* @event, int mouseLeave) + { + send_mouse_move_event_delegate d; + var p = self->_send_mouse_move_event; + if (p == _p2a) { d = _d2a; } + else + { + d = (send_mouse_move_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_move_event_delegate)); + if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } + } + d(self, @event, mouseLeave); + } + + // SendMouseWheelEvent + private static IntPtr _p2b; + private static send_mouse_wheel_event_delegate _d2b; + + public static void send_mouse_wheel_event(cef_browser_host_t* self, cef_mouse_event_t* @event, int deltaX, int deltaY) + { + send_mouse_wheel_event_delegate d; + var p = self->_send_mouse_wheel_event; + if (p == _p2b) { d = _d2b; } + else + { + d = (send_mouse_wheel_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_wheel_event_delegate)); + if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } + } + d(self, @event, deltaX, deltaY); + } + + // SendTouchEvent + private static IntPtr _p2c; + private static send_touch_event_delegate _d2c; + + public static void send_touch_event(cef_browser_host_t* self, cef_touch_event_t* @event) + { + send_touch_event_delegate d; + var p = self->_send_touch_event; + if (p == _p2c) { d = _d2c; } + else + { + d = (send_touch_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_touch_event_delegate)); + if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } + } + d(self, @event); + } + + // SendCaptureLostEvent + private static IntPtr _p2d; + private static send_capture_lost_event_delegate _d2d; + + public static void send_capture_lost_event(cef_browser_host_t* self) + { + send_capture_lost_event_delegate d; + var p = self->_send_capture_lost_event; + if (p == _p2d) { d = _d2d; } + else + { + d = (send_capture_lost_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_capture_lost_event_delegate)); + if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } + } + d(self); + } + + // NotifyMoveOrResizeStarted + private static IntPtr _p2e; + private static notify_move_or_resize_started_delegate _d2e; + + public static void notify_move_or_resize_started(cef_browser_host_t* self) + { + notify_move_or_resize_started_delegate d; + var p = self->_notify_move_or_resize_started; + if (p == _p2e) { d = _d2e; } + else + { + d = (notify_move_or_resize_started_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_move_or_resize_started_delegate)); + if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } + } + d(self); + } + + // GetWindowlessFrameRate + private static IntPtr _p2f; + private static get_windowless_frame_rate_delegate _d2f; + + public static int get_windowless_frame_rate(cef_browser_host_t* self) + { + get_windowless_frame_rate_delegate d; + var p = self->_get_windowless_frame_rate; + if (p == _p2f) { d = _d2f; } + else + { + d = (get_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_windowless_frame_rate_delegate)); + if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } + } + return d(self); + } + + // SetWindowlessFrameRate + private static IntPtr _p30; + private static set_windowless_frame_rate_delegate _d30; + + public static void set_windowless_frame_rate(cef_browser_host_t* self, int frame_rate) + { + set_windowless_frame_rate_delegate d; + var p = self->_set_windowless_frame_rate; + if (p == _p30) { d = _d30; } + else + { + d = (set_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_windowless_frame_rate_delegate)); + if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } + } + d(self, frame_rate); + } + + // ImeSetComposition + private static IntPtr _p31; + private static ime_set_composition_delegate _d31; + + public static void ime_set_composition(cef_browser_host_t* self, cef_string_t* text, UIntPtr underlinesCount, cef_composition_underline_t* underlines, cef_range_t* replacement_range, cef_range_t* selection_range) + { + ime_set_composition_delegate d; + var p = self->_ime_set_composition; + if (p == _p31) { d = _d31; } + else + { + d = (ime_set_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_set_composition_delegate)); + if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } + } + d(self, text, underlinesCount, underlines, replacement_range, selection_range); + } + + // ImeCommitText + private static IntPtr _p32; + private static ime_commit_text_delegate _d32; + + public static void ime_commit_text(cef_browser_host_t* self, cef_string_t* text, cef_range_t* replacement_range, int relative_cursor_pos) + { + ime_commit_text_delegate d; + var p = self->_ime_commit_text; + if (p == _p32) { d = _d32; } + else + { + d = (ime_commit_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_commit_text_delegate)); + if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } + } + d(self, text, replacement_range, relative_cursor_pos); + } + + // ImeFinishComposingText + private static IntPtr _p33; + private static ime_finish_composing_text_delegate _d33; + + public static void ime_finish_composing_text(cef_browser_host_t* self, int keep_selection) + { + ime_finish_composing_text_delegate d; + var p = self->_ime_finish_composing_text; + if (p == _p33) { d = _d33; } + else + { + d = (ime_finish_composing_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_finish_composing_text_delegate)); + if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } + } + d(self, keep_selection); + } + + // ImeCancelComposition + private static IntPtr _p34; + private static ime_cancel_composition_delegate _d34; + + public static void ime_cancel_composition(cef_browser_host_t* self) + { + ime_cancel_composition_delegate d; + var p = self->_ime_cancel_composition; + if (p == _p34) { d = _d34; } + else + { + d = (ime_cancel_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_cancel_composition_delegate)); + if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } + } + d(self); + } + + // DragTargetDragEnter + private static IntPtr _p35; + private static drag_target_drag_enter_delegate _d35; + + public static void drag_target_drag_enter(cef_browser_host_t* self, cef_drag_data_t* drag_data, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops) + { + drag_target_drag_enter_delegate d; + var p = self->_drag_target_drag_enter; + if (p == _p35) { d = _d35; } + else + { + d = (drag_target_drag_enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_enter_delegate)); + if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } + } + d(self, drag_data, @event, allowed_ops); + } + + // DragTargetDragOver + private static IntPtr _p36; + private static drag_target_drag_over_delegate _d36; + + public static void drag_target_drag_over(cef_browser_host_t* self, cef_mouse_event_t* @event, CefDragOperationsMask allowed_ops) + { + drag_target_drag_over_delegate d; + var p = self->_drag_target_drag_over; + if (p == _p36) { d = _d36; } + else + { + d = (drag_target_drag_over_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_over_delegate)); + if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } + } + d(self, @event, allowed_ops); + } + + // DragTargetDragLeave + private static IntPtr _p37; + private static drag_target_drag_leave_delegate _d37; + + public static void drag_target_drag_leave(cef_browser_host_t* self) + { + drag_target_drag_leave_delegate d; + var p = self->_drag_target_drag_leave; + if (p == _p37) { d = _d37; } + else + { + d = (drag_target_drag_leave_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_leave_delegate)); + if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } + } + d(self); + } + + // DragTargetDrop + private static IntPtr _p38; + private static drag_target_drop_delegate _d38; + + public static void drag_target_drop(cef_browser_host_t* self, cef_mouse_event_t* @event) + { + drag_target_drop_delegate d; + var p = self->_drag_target_drop; + if (p == _p38) { d = _d38; } + else + { + d = (drag_target_drop_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drop_delegate)); + if (_p38 == IntPtr.Zero) { _d38 = d; _p38 = p; } + } + d(self, @event); + } + + // DragSourceEndedAt + private static IntPtr _p39; + private static drag_source_ended_at_delegate _d39; + + public static void drag_source_ended_at(cef_browser_host_t* self, int x, int y, CefDragOperationsMask op) + { + drag_source_ended_at_delegate d; + var p = self->_drag_source_ended_at; + if (p == _p39) { d = _d39; } + else + { + d = (drag_source_ended_at_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_ended_at_delegate)); + if (_p39 == IntPtr.Zero) { _d39 = d; _p39 = p; } + } + d(self, x, y, op); + } + + // DragSourceSystemDragEnded + private static IntPtr _p3a; + private static drag_source_system_drag_ended_delegate _d3a; + + public static void drag_source_system_drag_ended(cef_browser_host_t* self) + { + drag_source_system_drag_ended_delegate d; + var p = self->_drag_source_system_drag_ended; + if (p == _p3a) { d = _d3a; } + else + { + d = (drag_source_system_drag_ended_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_system_drag_ended_delegate)); + if (_p3a == IntPtr.Zero) { _d3a = d; _p3a = p; } + } + d(self); + } + + // GetVisibleNavigationEntry + private static IntPtr _p3b; + private static get_visible_navigation_entry_delegate _d3b; + + public static cef_navigation_entry_t* get_visible_navigation_entry(cef_browser_host_t* self) + { + get_visible_navigation_entry_delegate d; + var p = self->_get_visible_navigation_entry; + if (p == _p3b) { d = _d3b; } + else + { + d = (get_visible_navigation_entry_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_visible_navigation_entry_delegate)); + if (_p3b == IntPtr.Zero) { _d3b = d; _p3b = p; } + } + return d(self); + } + + // SetAccessibilityState + private static IntPtr _p3c; + private static set_accessibility_state_delegate _d3c; + + public static void set_accessibility_state(cef_browser_host_t* self, CefState accessibility_state) + { + set_accessibility_state_delegate d; + var p = self->_set_accessibility_state; + if (p == _p3c) { d = _d3c; } + else + { + d = (set_accessibility_state_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_accessibility_state_delegate)); + if (_p3c == IntPtr.Zero) { _d3c = d; _p3c = p; } + } + d(self, accessibility_state); + } + + // SetAutoResizeEnabled + private static IntPtr _p3d; + private static set_auto_resize_enabled_delegate _d3d; + + public static void set_auto_resize_enabled(cef_browser_host_t* self, int enabled, cef_size_t* min_size, cef_size_t* max_size) + { + set_auto_resize_enabled_delegate d; + var p = self->_set_auto_resize_enabled; + if (p == _p3d) { d = _d3d; } + else + { + d = (set_auto_resize_enabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_auto_resize_enabled_delegate)); + if (_p3d == IntPtr.Zero) { _d3d = d; _p3d = p; } + } + d(self, enabled, min_size, max_size); + } + + // GetExtension + private static IntPtr _p3e; + private static get_extension_delegate _d3e; + + public static cef_extension_t* get_extension(cef_browser_host_t* self) + { + get_extension_delegate d; + var p = self->_get_extension; + if (p == _p3e) { d = _d3e; } + else + { + d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate)); + if (_p3e == IntPtr.Zero) { _d3e = d; _p3e = p; } + } + return d(self); + } + + // IsBackgroundHost + private static IntPtr _p3f; + private static is_background_host_delegate _d3f; + + public static int is_background_host(cef_browser_host_t* self) + { + is_background_host_delegate d; + var p = self->_is_background_host; + if (p == _p3f) { d = _d3f; } + else + { + d = (is_background_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_background_host_delegate)); + if (_p3f == IntPtr.Zero) { _d3f = d; _p3f = p; } + } + return d(self); + } + + // SetAudioMuted + private static IntPtr _p40; + private static set_audio_muted_delegate _d40; + + public static void set_audio_muted(cef_browser_host_t* self, int mute) + { + set_audio_muted_delegate d; + var p = self->_set_audio_muted; + if (p == _p40) { d = _d40; } + else + { + d = (set_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_audio_muted_delegate)); + if (_p40 == IntPtr.Zero) { _d40 = d; _p40 = p; } + } + d(self, mute); + } + + // IsAudioMuted + private static IntPtr _p41; + private static is_audio_muted_delegate _d41; + + public static int is_audio_muted(cef_browser_host_t* self) + { + is_audio_muted_delegate d; + var p = self->_is_audio_muted; + if (p == _p41) { d = _d41; } + else + { + d = (is_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_audio_muted_delegate)); + if (_p41 == IntPtr.Zero) { _d41 = d; _p41 = p; } + } + return d(self); + } + + // IsFullscreen + private static IntPtr _p42; + private static is_fullscreen_delegate _d42; + + public static int is_fullscreen(cef_browser_host_t* self) + { + is_fullscreen_delegate d; + var p = self->_is_fullscreen; + if (p == _p42) { d = _d42; } + else + { + d = (is_fullscreen_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_fullscreen_delegate)); + if (_p42 == IntPtr.Zero) { _d42 = d; _p42 = p; } + } + return d(self); + } + + // ExitFullscreen + private static IntPtr _p43; + private static exit_fullscreen_delegate _d43; + + public static void exit_fullscreen(cef_browser_host_t* self, int will_cause_resize) + { + exit_fullscreen_delegate d; + var p = self->_exit_fullscreen; + if (p == _p43) { d = _d43; } + else + { + d = (exit_fullscreen_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(exit_fullscreen_delegate)); + if (_p43 == IntPtr.Zero) { _d43 = d; _p43 = p; } + } + d(self, will_cause_resize); + } + + // CanExecuteChromeCommand + private static IntPtr _p44; + private static can_execute_chrome_command_delegate _d44; + + public static int can_execute_chrome_command(cef_browser_host_t* self, int command_id) + { + can_execute_chrome_command_delegate d; + var p = self->_can_execute_chrome_command; + if (p == _p44) { d = _d44; } + else + { + d = (can_execute_chrome_command_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_execute_chrome_command_delegate)); + if (_p44 == IntPtr.Zero) { _d44 = d; _p44 = p; } + } + return d(self, command_id); + } + + // ExecuteChromeCommand + private static IntPtr _p45; + private static execute_chrome_command_delegate _d45; + + public static void execute_chrome_command(cef_browser_host_t* self, int command_id, CefWindowOpenDisposition disposition) + { + execute_chrome_command_delegate d; + var p = self->_execute_chrome_command; + if (p == _p45) { d = _d45; } + else + { + d = (execute_chrome_command_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_chrome_command_delegate)); + if (_p45 == IntPtr.Zero) { _d45 = d; _p45 = p; } + } + d(self, command_id, disposition); + } + + // IsRenderProcessUnresponsive + private static IntPtr _p46; + private static is_render_process_unresponsive_delegate _d46; + + public static int is_render_process_unresponsive(cef_browser_host_t* self) + { + is_render_process_unresponsive_delegate d; + var p = self->_is_render_process_unresponsive; + if (p == _p46) { d = _d46; } + else + { + d = (is_render_process_unresponsive_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_render_process_unresponsive_delegate)); + if (_p46 == IntPtr.Zero) { _d46 = d; _p46 = p; } + } + return d(self); + } + + // GetRuntimeStyle + private static IntPtr _p47; + private static get_runtime_style_delegate _d47; + + public static CefRuntimeStyle get_runtime_style(cef_browser_host_t* self) + { + get_runtime_style_delegate d; + var p = self->_get_runtime_style; + if (p == _p47) { d = _d47; } + else + { + d = (get_runtime_style_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_runtime_style_delegate)); + if (_p47 == IntPtr.Zero) { _d47 = d; _p47 = p; } + } + return d(self); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_browser_process_handler_t.g.cs b/CefGlue/Interop/Classes.g/cef_browser_process_handler_t.g.cs index bc69f4f5..8599e34c 100644 --- a/CefGlue/Interop/Classes.g/cef_browser_process_handler_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_browser_process_handler_t.g.cs @@ -1,104 +1,111 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_browser_process_handler_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _on_register_custom_preferences; - internal IntPtr _on_context_initialized; - internal IntPtr _on_before_child_process_launch; - internal IntPtr _on_already_running_app_relaunch; - internal IntPtr _on_schedule_message_pump_work; - internal IntPtr _get_default_client; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void add_ref_delegate(cef_browser_process_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int release_delegate(cef_browser_process_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_one_ref_delegate(cef_browser_process_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_at_least_one_ref_delegate(cef_browser_process_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_register_custom_preferences_delegate(cef_browser_process_handler_t* self, CefPreferencesType type, cef_preference_registrar_t* registrar); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_context_initialized_delegate(cef_browser_process_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_before_child_process_launch_delegate(cef_browser_process_handler_t* self, cef_command_line_t* command_line); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_already_running_app_relaunch_delegate(cef_browser_process_handler_t* self, cef_command_line_t* command_line, cef_string_t* current_directory); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_schedule_message_pump_work_delegate(cef_browser_process_handler_t* self, long delay_ms); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate cef_client_t* get_default_client_delegate(cef_browser_process_handler_t* self); - - private static int _sizeof; - - static cef_browser_process_handler_t() - { - _sizeof = Marshal.SizeOf(typeof(cef_browser_process_handler_t)); - } - - internal static cef_browser_process_handler_t* Alloc() - { - var ptr = (cef_browser_process_handler_t*)Marshal.AllocHGlobal(_sizeof); - *ptr = new cef_browser_process_handler_t(); - ptr->_base._size = (UIntPtr)_sizeof; - return ptr; - } - - internal static void Free(cef_browser_process_handler_t* ptr) - { - Marshal.FreeHGlobal((IntPtr)ptr); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_browser_process_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _on_register_custom_preferences; + internal IntPtr _on_context_initialized; + internal IntPtr _on_before_child_process_launch; + internal IntPtr _on_already_running_app_relaunch; + internal IntPtr _on_schedule_message_pump_work; + internal IntPtr _get_default_client; + internal IntPtr _get_default_request_context_handler; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_register_custom_preferences_delegate(cef_browser_process_handler_t* self, CefPreferencesType type, cef_preference_registrar_t* registrar); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_context_initialized_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_before_child_process_launch_delegate(cef_browser_process_handler_t* self, cef_command_line_t* command_line); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_already_running_app_relaunch_delegate(cef_browser_process_handler_t* self, cef_command_line_t* command_line, cef_string_t* current_directory); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_schedule_message_pump_work_delegate(cef_browser_process_handler_t* self, long delay_ms); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate cef_client_t* get_default_client_delegate(cef_browser_process_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate cef_request_context_handler_t* get_default_request_context_handler_delegate(cef_browser_process_handler_t* self); + + private static int _sizeof; + + static cef_browser_process_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_browser_process_handler_t)); + } + + internal static cef_browser_process_handler_t* Alloc() + { + var ptr = (cef_browser_process_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_browser_process_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_browser_process_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_browser_t.g.cs b/CefGlue/Interop/Classes.g/cef_browser_t.g.cs index 581910fc..eeb20fd2 100644 --- a/CefGlue/Interop/Classes.g/cef_browser_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_browser_t.g.cs @@ -1,614 +1,614 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_browser_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _is_valid; - internal IntPtr _get_host; - internal IntPtr _can_go_back; - internal IntPtr _go_back; - internal IntPtr _can_go_forward; - internal IntPtr _go_forward; - internal IntPtr _is_loading; - internal IntPtr _reload; - internal IntPtr _reload_ignore_cache; - internal IntPtr _stop_load; - internal IntPtr _get_identifier; - internal IntPtr _is_same; - internal IntPtr _is_popup; - internal IntPtr _has_document; - internal IntPtr _get_main_frame; - internal IntPtr _get_focused_frame; - internal IntPtr _get_frame_byident; - internal IntPtr _get_frame; - internal IntPtr _get_frame_count; - internal IntPtr _get_frame_identifiers; - internal IntPtr _get_frame_names; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_ref_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int release_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_one_ref_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_at_least_one_ref_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_valid_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_browser_host_t* get_host_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int can_go_back_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void go_back_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int can_go_forward_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void go_forward_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_loading_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void reload_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void reload_ignore_cache_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void stop_load_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_identifier_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_same_delegate(cef_browser_t* self, cef_browser_t* that); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_popup_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_document_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_frame_t* get_main_frame_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_frame_t* get_focused_frame_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_frame_t* get_frame_byident_delegate(cef_browser_t* self, long identifier); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_frame_t* get_frame_delegate(cef_browser_t* self, cef_string_t* name); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate UIntPtr get_frame_count_delegate(cef_browser_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void get_frame_identifiers_delegate(cef_browser_t* self, UIntPtr* identifiersCount, long* identifiers); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void get_frame_names_delegate(cef_browser_t* self, cef_string_list* names); - - // AddRef - private static IntPtr _p0; - private static add_ref_delegate _d0; - - public static void add_ref(cef_browser_t* self) - { - add_ref_delegate d; - var p = self->_base._add_ref; - if (p == _p0) { d = _d0; } - else - { - d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); - if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } - } - d(self); - } - - // Release - private static IntPtr _p1; - private static release_delegate _d1; - - public static int release(cef_browser_t* self) - { - release_delegate d; - var p = self->_base._release; - if (p == _p1) { d = _d1; } - else - { - d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); - if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } - } - return d(self); - } - - // HasOneRef - private static IntPtr _p2; - private static has_one_ref_delegate _d2; - - public static int has_one_ref(cef_browser_t* self) - { - has_one_ref_delegate d; - var p = self->_base._has_one_ref; - if (p == _p2) { d = _d2; } - else - { - d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); - if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } - } - return d(self); - } - - // HasAtLeastOneRef - private static IntPtr _p3; - private static has_at_least_one_ref_delegate _d3; - - public static int has_at_least_one_ref(cef_browser_t* self) - { - has_at_least_one_ref_delegate d; - var p = self->_base._has_at_least_one_ref; - if (p == _p3) { d = _d3; } - else - { - d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); - if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } - } - return d(self); - } - - // IsValid - private static IntPtr _p4; - private static is_valid_delegate _d4; - - public static int is_valid(cef_browser_t* self) - { - is_valid_delegate d; - var p = self->_is_valid; - if (p == _p4) { d = _d4; } - else - { - d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); - if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } - } - return d(self); - } - - // GetHost - private static IntPtr _p5; - private static get_host_delegate _d5; - - public static cef_browser_host_t* get_host(cef_browser_t* self) - { - get_host_delegate d; - var p = self->_get_host; - if (p == _p5) { d = _d5; } - else - { - d = (get_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_host_delegate)); - if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } - } - return d(self); - } - - // CanGoBack - private static IntPtr _p6; - private static can_go_back_delegate _d6; - - public static int can_go_back(cef_browser_t* self) - { - can_go_back_delegate d; - var p = self->_can_go_back; - if (p == _p6) { d = _d6; } - else - { - d = (can_go_back_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_go_back_delegate)); - if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } - } - return d(self); - } - - // GoBack - private static IntPtr _p7; - private static go_back_delegate _d7; - - public static void go_back(cef_browser_t* self) - { - go_back_delegate d; - var p = self->_go_back; - if (p == _p7) { d = _d7; } - else - { - d = (go_back_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(go_back_delegate)); - if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } - } - d(self); - } - - // CanGoForward - private static IntPtr _p8; - private static can_go_forward_delegate _d8; - - public static int can_go_forward(cef_browser_t* self) - { - can_go_forward_delegate d; - var p = self->_can_go_forward; - if (p == _p8) { d = _d8; } - else - { - d = (can_go_forward_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_go_forward_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } - } - return d(self); - } - - // GoForward - private static IntPtr _p9; - private static go_forward_delegate _d9; - - public static void go_forward(cef_browser_t* self) - { - go_forward_delegate d; - var p = self->_go_forward; - if (p == _p9) { d = _d9; } - else - { - d = (go_forward_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(go_forward_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } - } - d(self); - } - - // IsLoading - private static IntPtr _pa; - private static is_loading_delegate _da; - - public static int is_loading(cef_browser_t* self) - { - is_loading_delegate d; - var p = self->_is_loading; - if (p == _pa) { d = _da; } - else - { - d = (is_loading_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_loading_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } - } - return d(self); - } - - // Reload - private static IntPtr _pb; - private static reload_delegate _db; - - public static void reload(cef_browser_t* self) - { - reload_delegate d; - var p = self->_reload; - if (p == _pb) { d = _db; } - else - { - d = (reload_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reload_delegate)); - if (_pb == IntPtr.Zero) { _db = d; _pb = p; } - } - d(self); - } - - // ReloadIgnoreCache - private static IntPtr _pc; - private static reload_ignore_cache_delegate _dc; - - public static void reload_ignore_cache(cef_browser_t* self) - { - reload_ignore_cache_delegate d; - var p = self->_reload_ignore_cache; - if (p == _pc) { d = _dc; } - else - { - d = (reload_ignore_cache_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reload_ignore_cache_delegate)); - if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } - } - d(self); - } - - // StopLoad - private static IntPtr _pd; - private static stop_load_delegate _dd; - - public static void stop_load(cef_browser_t* self) - { - stop_load_delegate d; - var p = self->_stop_load; - if (p == _pd) { d = _dd; } - else - { - d = (stop_load_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(stop_load_delegate)); - if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } - } - d(self); - } - - // GetIdentifier - private static IntPtr _pe; - private static get_identifier_delegate _de; - - public static int get_identifier(cef_browser_t* self) - { - get_identifier_delegate d; - var p = self->_get_identifier; - if (p == _pe) { d = _de; } - else - { - d = (get_identifier_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_identifier_delegate)); - if (_pe == IntPtr.Zero) { _de = d; _pe = p; } - } - return d(self); - } - - // IsSame - private static IntPtr _pf; - private static is_same_delegate _df; - - public static int is_same(cef_browser_t* self, cef_browser_t* that) - { - is_same_delegate d; - var p = self->_is_same; - if (p == _pf) { d = _df; } - else - { - d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); - if (_pf == IntPtr.Zero) { _df = d; _pf = p; } - } - return d(self, that); - } - - // IsPopup - private static IntPtr _p10; - private static is_popup_delegate _d10; - - public static int is_popup(cef_browser_t* self) - { - is_popup_delegate d; - var p = self->_is_popup; - if (p == _p10) { d = _d10; } - else - { - d = (is_popup_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_popup_delegate)); - if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } - } - return d(self); - } - - // HasDocument - private static IntPtr _p11; - private static has_document_delegate _d11; - - public static int has_document(cef_browser_t* self) - { - has_document_delegate d; - var p = self->_has_document; - if (p == _p11) { d = _d11; } - else - { - d = (has_document_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_document_delegate)); - if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } - } - return d(self); - } - - // GetMainFrame - private static IntPtr _p12; - private static get_main_frame_delegate _d12; - - public static cef_frame_t* get_main_frame(cef_browser_t* self) - { - get_main_frame_delegate d; - var p = self->_get_main_frame; - if (p == _p12) { d = _d12; } - else - { - d = (get_main_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_main_frame_delegate)); - if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } - } - return d(self); - } - - // GetFocusedFrame - private static IntPtr _p13; - private static get_focused_frame_delegate _d13; - - public static cef_frame_t* get_focused_frame(cef_browser_t* self) - { - get_focused_frame_delegate d; - var p = self->_get_focused_frame; - if (p == _p13) { d = _d13; } - else - { - d = (get_focused_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_focused_frame_delegate)); - if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } - } - return d(self); - } - - // GetFrame - private static IntPtr _p14; - private static get_frame_byident_delegate _d14; - - public static cef_frame_t* get_frame_byident(cef_browser_t* self, long identifier) - { - get_frame_byident_delegate d; - var p = self->_get_frame_byident; - if (p == _p14) { d = _d14; } - else - { - d = (get_frame_byident_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_byident_delegate)); - if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } - } - return d(self, identifier); - } - - // GetFrame - private static IntPtr _p15; - private static get_frame_delegate _d15; - - public static cef_frame_t* get_frame(cef_browser_t* self, cef_string_t* name) - { - get_frame_delegate d; - var p = self->_get_frame; - if (p == _p15) { d = _d15; } - else - { - d = (get_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_delegate)); - if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } - } - return d(self, name); - } - - // GetFrameCount - private static IntPtr _p16; - private static get_frame_count_delegate _d16; - - public static UIntPtr get_frame_count(cef_browser_t* self) - { - get_frame_count_delegate d; - var p = self->_get_frame_count; - if (p == _p16) { d = _d16; } - else - { - d = (get_frame_count_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_count_delegate)); - if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } - } - return d(self); - } - - // GetFrameIdentifiers - private static IntPtr _p17; - private static get_frame_identifiers_delegate _d17; - - public static void get_frame_identifiers(cef_browser_t* self, UIntPtr* identifiersCount, long* identifiers) - { - get_frame_identifiers_delegate d; - var p = self->_get_frame_identifiers; - if (p == _p17) { d = _d17; } - else - { - d = (get_frame_identifiers_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_identifiers_delegate)); - if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } - } - d(self, identifiersCount, identifiers); - } - - // GetFrameNames - private static IntPtr _p18; - private static get_frame_names_delegate _d18; - - public static void get_frame_names(cef_browser_t* self, cef_string_list* names) - { - get_frame_names_delegate d; - var p = self->_get_frame_names; - if (p == _p18) { d = _d18; } - else - { - d = (get_frame_names_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_names_delegate)); - if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } - } - d(self, names); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_browser_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _is_valid; + internal IntPtr _get_host; + internal IntPtr _can_go_back; + internal IntPtr _go_back; + internal IntPtr _can_go_forward; + internal IntPtr _go_forward; + internal IntPtr _is_loading; + internal IntPtr _reload; + internal IntPtr _reload_ignore_cache; + internal IntPtr _stop_load; + internal IntPtr _get_identifier; + internal IntPtr _is_same; + internal IntPtr _is_popup; + internal IntPtr _has_document; + internal IntPtr _get_main_frame; + internal IntPtr _get_focused_frame; + internal IntPtr _get_frame_by_identifier; + internal IntPtr _get_frame_by_name; + internal IntPtr _get_frame_count; + internal IntPtr _get_frame_identifiers; + internal IntPtr _get_frame_names; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_valid_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_browser_host_t* get_host_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int can_go_back_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void go_back_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int can_go_forward_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void go_forward_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_loading_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void reload_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void reload_ignore_cache_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void stop_load_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_identifier_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_same_delegate(cef_browser_t* self, cef_browser_t* that); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_popup_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_document_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_frame_t* get_main_frame_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_frame_t* get_focused_frame_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_frame_t* get_frame_by_identifier_delegate(cef_browser_t* self, cef_string_t* identifier); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_frame_t* get_frame_by_name_delegate(cef_browser_t* self, cef_string_t* name); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate UIntPtr get_frame_count_delegate(cef_browser_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_frame_identifiers_delegate(cef_browser_t* self, cef_string_list* identifiers); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_frame_names_delegate(cef_browser_t* self, cef_string_list* names); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_browser_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_browser_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_browser_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_browser_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // IsValid + private static IntPtr _p4; + private static is_valid_delegate _d4; + + public static int is_valid(cef_browser_t* self) + { + is_valid_delegate d; + var p = self->_is_valid; + if (p == _p4) { d = _d4; } + else + { + d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + return d(self); + } + + // GetHost + private static IntPtr _p5; + private static get_host_delegate _d5; + + public static cef_browser_host_t* get_host(cef_browser_t* self) + { + get_host_delegate d; + var p = self->_get_host; + if (p == _p5) { d = _d5; } + else + { + d = (get_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_host_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + return d(self); + } + + // CanGoBack + private static IntPtr _p6; + private static can_go_back_delegate _d6; + + public static int can_go_back(cef_browser_t* self) + { + can_go_back_delegate d; + var p = self->_can_go_back; + if (p == _p6) { d = _d6; } + else + { + d = (can_go_back_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_go_back_delegate)); + if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } + } + return d(self); + } + + // GoBack + private static IntPtr _p7; + private static go_back_delegate _d7; + + public static void go_back(cef_browser_t* self) + { + go_back_delegate d; + var p = self->_go_back; + if (p == _p7) { d = _d7; } + else + { + d = (go_back_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(go_back_delegate)); + if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } + } + d(self); + } + + // CanGoForward + private static IntPtr _p8; + private static can_go_forward_delegate _d8; + + public static int can_go_forward(cef_browser_t* self) + { + can_go_forward_delegate d; + var p = self->_can_go_forward; + if (p == _p8) { d = _d8; } + else + { + d = (can_go_forward_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_go_forward_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + return d(self); + } + + // GoForward + private static IntPtr _p9; + private static go_forward_delegate _d9; + + public static void go_forward(cef_browser_t* self) + { + go_forward_delegate d; + var p = self->_go_forward; + if (p == _p9) { d = _d9; } + else + { + d = (go_forward_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(go_forward_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + d(self); + } + + // IsLoading + private static IntPtr _pa; + private static is_loading_delegate _da; + + public static int is_loading(cef_browser_t* self) + { + is_loading_delegate d; + var p = self->_is_loading; + if (p == _pa) { d = _da; } + else + { + d = (is_loading_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_loading_delegate)); + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + } + return d(self); + } + + // Reload + private static IntPtr _pb; + private static reload_delegate _db; + + public static void reload(cef_browser_t* self) + { + reload_delegate d; + var p = self->_reload; + if (p == _pb) { d = _db; } + else + { + d = (reload_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reload_delegate)); + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } + } + d(self); + } + + // ReloadIgnoreCache + private static IntPtr _pc; + private static reload_ignore_cache_delegate _dc; + + public static void reload_ignore_cache(cef_browser_t* self) + { + reload_ignore_cache_delegate d; + var p = self->_reload_ignore_cache; + if (p == _pc) { d = _dc; } + else + { + d = (reload_ignore_cache_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reload_ignore_cache_delegate)); + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } + } + d(self); + } + + // StopLoad + private static IntPtr _pd; + private static stop_load_delegate _dd; + + public static void stop_load(cef_browser_t* self) + { + stop_load_delegate d; + var p = self->_stop_load; + if (p == _pd) { d = _dd; } + else + { + d = (stop_load_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(stop_load_delegate)); + if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } + } + d(self); + } + + // GetIdentifier + private static IntPtr _pe; + private static get_identifier_delegate _de; + + public static int get_identifier(cef_browser_t* self) + { + get_identifier_delegate d; + var p = self->_get_identifier; + if (p == _pe) { d = _de; } + else + { + d = (get_identifier_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_identifier_delegate)); + if (_pe == IntPtr.Zero) { _de = d; _pe = p; } + } + return d(self); + } + + // IsSame + private static IntPtr _pf; + private static is_same_delegate _df; + + public static int is_same(cef_browser_t* self, cef_browser_t* that) + { + is_same_delegate d; + var p = self->_is_same; + if (p == _pf) { d = _df; } + else + { + d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); + if (_pf == IntPtr.Zero) { _df = d; _pf = p; } + } + return d(self, that); + } + + // IsPopup + private static IntPtr _p10; + private static is_popup_delegate _d10; + + public static int is_popup(cef_browser_t* self) + { + is_popup_delegate d; + var p = self->_is_popup; + if (p == _p10) { d = _d10; } + else + { + d = (is_popup_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_popup_delegate)); + if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } + } + return d(self); + } + + // HasDocument + private static IntPtr _p11; + private static has_document_delegate _d11; + + public static int has_document(cef_browser_t* self) + { + has_document_delegate d; + var p = self->_has_document; + if (p == _p11) { d = _d11; } + else + { + d = (has_document_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_document_delegate)); + if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } + } + return d(self); + } + + // GetMainFrame + private static IntPtr _p12; + private static get_main_frame_delegate _d12; + + public static cef_frame_t* get_main_frame(cef_browser_t* self) + { + get_main_frame_delegate d; + var p = self->_get_main_frame; + if (p == _p12) { d = _d12; } + else + { + d = (get_main_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_main_frame_delegate)); + if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } + } + return d(self); + } + + // GetFocusedFrame + private static IntPtr _p13; + private static get_focused_frame_delegate _d13; + + public static cef_frame_t* get_focused_frame(cef_browser_t* self) + { + get_focused_frame_delegate d; + var p = self->_get_focused_frame; + if (p == _p13) { d = _d13; } + else + { + d = (get_focused_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_focused_frame_delegate)); + if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } + } + return d(self); + } + + // GetFrameByIdentifier + private static IntPtr _p14; + private static get_frame_by_identifier_delegate _d14; + + public static cef_frame_t* get_frame_by_identifier(cef_browser_t* self, cef_string_t* identifier) + { + get_frame_by_identifier_delegate d; + var p = self->_get_frame_by_identifier; + if (p == _p14) { d = _d14; } + else + { + d = (get_frame_by_identifier_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_by_identifier_delegate)); + if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } + } + return d(self, identifier); + } + + // GetFrameByName + private static IntPtr _p15; + private static get_frame_by_name_delegate _d15; + + public static cef_frame_t* get_frame_by_name(cef_browser_t* self, cef_string_t* name) + { + get_frame_by_name_delegate d; + var p = self->_get_frame_by_name; + if (p == _p15) { d = _d15; } + else + { + d = (get_frame_by_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_by_name_delegate)); + if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } + } + return d(self, name); + } + + // GetFrameCount + private static IntPtr _p16; + private static get_frame_count_delegate _d16; + + public static UIntPtr get_frame_count(cef_browser_t* self) + { + get_frame_count_delegate d; + var p = self->_get_frame_count; + if (p == _p16) { d = _d16; } + else + { + d = (get_frame_count_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_count_delegate)); + if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } + } + return d(self); + } + + // GetFrameIdentifiers + private static IntPtr _p17; + private static get_frame_identifiers_delegate _d17; + + public static void get_frame_identifiers(cef_browser_t* self, cef_string_list* identifiers) + { + get_frame_identifiers_delegate d; + var p = self->_get_frame_identifiers; + if (p == _p17) { d = _d17; } + else + { + d = (get_frame_identifiers_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_identifiers_delegate)); + if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } + } + d(self, identifiers); + } + + // GetFrameNames + private static IntPtr _p18; + private static get_frame_names_delegate _d18; + + public static void get_frame_names(cef_browser_t* self, cef_string_list* names) + { + get_frame_names_delegate d; + var p = self->_get_frame_names; + if (p == _p18) { d = _d18; } + else + { + d = (get_frame_names_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_frame_names_delegate)); + if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } + } + d(self, names); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_dialog_handler_t.g.cs b/CefGlue/Interop/Classes.g/cef_dialog_handler_t.g.cs index a6734885..6facdfc7 100644 --- a/CefGlue/Interop/Classes.g/cef_dialog_handler_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_dialog_handler_t.g.cs @@ -1,69 +1,69 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_dialog_handler_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _on_file_dialog; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void add_ref_delegate(cef_dialog_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int release_delegate(cef_dialog_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_one_ref_delegate(cef_dialog_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_at_least_one_ref_delegate(cef_dialog_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_file_dialog_delegate(cef_dialog_handler_t* self, cef_browser_t* browser, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_file_dialog_callback_t* callback); - - private static int _sizeof; - - static cef_dialog_handler_t() - { - _sizeof = Marshal.SizeOf(typeof(cef_dialog_handler_t)); - } - - internal static cef_dialog_handler_t* Alloc() - { - var ptr = (cef_dialog_handler_t*)Marshal.AllocHGlobal(_sizeof); - *ptr = new cef_dialog_handler_t(); - ptr->_base._size = (UIntPtr)_sizeof; - return ptr; - } - - internal static void Free(cef_dialog_handler_t* ptr) - { - Marshal.FreeHGlobal((IntPtr)ptr); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_dialog_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _on_file_dialog; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_dialog_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_dialog_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_dialog_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_dialog_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_file_dialog_delegate(cef_dialog_handler_t* self, cef_browser_t* browser, CefFileDialogMode mode, cef_string_t* title, cef_string_t* default_file_path, cef_string_list* accept_filters, cef_string_list* accept_extensions, cef_string_list* accept_descriptions, cef_file_dialog_callback_t* callback); + + private static int _sizeof; + + static cef_dialog_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_dialog_handler_t)); + } + + internal static cef_dialog_handler_t* Alloc() + { + var ptr = (cef_dialog_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_dialog_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_dialog_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_download_handler_t.g.cs b/CefGlue/Interop/Classes.g/cef_download_handler_t.g.cs index 5dc028b0..5cb58791 100644 --- a/CefGlue/Interop/Classes.g/cef_download_handler_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_download_handler_t.g.cs @@ -1,83 +1,83 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_download_handler_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _can_download; - internal IntPtr _on_before_download; - internal IntPtr _on_download_updated; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void add_ref_delegate(cef_download_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int release_delegate(cef_download_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_one_ref_delegate(cef_download_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_at_least_one_ref_delegate(cef_download_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int can_download_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_string_t* url, cef_string_t* request_method); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_before_download_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_string_t* suggested_name, cef_before_download_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_download_updated_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_download_item_callback_t* callback); - - private static int _sizeof; - - static cef_download_handler_t() - { - _sizeof = Marshal.SizeOf(typeof(cef_download_handler_t)); - } - - internal static cef_download_handler_t* Alloc() - { - var ptr = (cef_download_handler_t*)Marshal.AllocHGlobal(_sizeof); - *ptr = new cef_download_handler_t(); - ptr->_base._size = (UIntPtr)_sizeof; - return ptr; - } - - internal static void Free(cef_download_handler_t* ptr) - { - Marshal.FreeHGlobal((IntPtr)ptr); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_download_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _can_download; + internal IntPtr _on_before_download; + internal IntPtr _on_download_updated; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_download_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_download_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_download_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_download_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int can_download_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_string_t* url, cef_string_t* request_method); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_before_download_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_string_t* suggested_name, cef_before_download_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_download_updated_delegate(cef_download_handler_t* self, cef_browser_t* browser, cef_download_item_t* download_item, cef_download_item_callback_t* callback); + + private static int _sizeof; + + static cef_download_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_download_handler_t)); + } + + internal static cef_download_handler_t* Alloc() + { + var ptr = (cef_download_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_download_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_download_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_frame_t.g.cs b/CefGlue/Interop/Classes.g/cef_frame_t.g.cs index dfd6ecb1..75533ea5 100644 --- a/CefGlue/Interop/Classes.g/cef_frame_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_frame_t.g.cs @@ -1,710 +1,710 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_frame_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _is_valid; - internal IntPtr _undo; - internal IntPtr _redo; - internal IntPtr _cut; - internal IntPtr _copy; - internal IntPtr _paste; - internal IntPtr _del; - internal IntPtr _select_all; - internal IntPtr _view_source; - internal IntPtr _get_source; - internal IntPtr _get_text; - internal IntPtr _load_request; - internal IntPtr _load_url; - internal IntPtr _execute_java_script; - internal IntPtr _is_main; - internal IntPtr _is_focused; - internal IntPtr _get_name; - internal IntPtr _get_identifier; - internal IntPtr _get_parent; - internal IntPtr _get_url; - internal IntPtr _get_browser; - internal IntPtr _get_v8context; - internal IntPtr _visit_dom; - internal IntPtr _create_urlrequest; - internal IntPtr _send_process_message; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_ref_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int release_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_one_ref_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_at_least_one_ref_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_valid_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void undo_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void redo_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void cut_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void copy_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void paste_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void del_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void select_all_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void view_source_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void get_source_delegate(cef_frame_t* self, cef_string_visitor_t* visitor); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void get_text_delegate(cef_frame_t* self, cef_string_visitor_t* visitor); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void load_request_delegate(cef_frame_t* self, cef_request_t* request); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void load_url_delegate(cef_frame_t* self, cef_string_t* url); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void execute_java_script_delegate(cef_frame_t* self, cef_string_t* code, cef_string_t* script_url, int start_line); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_main_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_focused_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_string_userfree* get_name_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate long get_identifier_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_frame_t* get_parent_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_string_userfree* get_url_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_browser_t* get_browser_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8context_t* get_v8context_delegate(cef_frame_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void visit_dom_delegate(cef_frame_t* self, cef_domvisitor_t* visitor); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_urlrequest_t* create_urlrequest_delegate(cef_frame_t* self, cef_request_t* request, cef_urlrequest_client_t* client); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void send_process_message_delegate(cef_frame_t* self, CefProcessId target_process, cef_process_message_t* message); - - // AddRef - private static IntPtr _p0; - private static add_ref_delegate _d0; - - public static void add_ref(cef_frame_t* self) - { - add_ref_delegate d; - var p = self->_base._add_ref; - if (p == _p0) { d = _d0; } - else - { - d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); - if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } - } - d(self); - } - - // Release - private static IntPtr _p1; - private static release_delegate _d1; - - public static int release(cef_frame_t* self) - { - release_delegate d; - var p = self->_base._release; - if (p == _p1) { d = _d1; } - else - { - d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); - if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } - } - return d(self); - } - - // HasOneRef - private static IntPtr _p2; - private static has_one_ref_delegate _d2; - - public static int has_one_ref(cef_frame_t* self) - { - has_one_ref_delegate d; - var p = self->_base._has_one_ref; - if (p == _p2) { d = _d2; } - else - { - d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); - if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } - } - return d(self); - } - - // HasAtLeastOneRef - private static IntPtr _p3; - private static has_at_least_one_ref_delegate _d3; - - public static int has_at_least_one_ref(cef_frame_t* self) - { - has_at_least_one_ref_delegate d; - var p = self->_base._has_at_least_one_ref; - if (p == _p3) { d = _d3; } - else - { - d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); - if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } - } - return d(self); - } - - // IsValid - private static IntPtr _p4; - private static is_valid_delegate _d4; - - public static int is_valid(cef_frame_t* self) - { - is_valid_delegate d; - var p = self->_is_valid; - if (p == _p4) { d = _d4; } - else - { - d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); - if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } - } - return d(self); - } - - // Undo - private static IntPtr _p5; - private static undo_delegate _d5; - - public static void undo(cef_frame_t* self) - { - undo_delegate d; - var p = self->_undo; - if (p == _p5) { d = _d5; } - else - { - d = (undo_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(undo_delegate)); - if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } - } - d(self); - } - - // Redo - private static IntPtr _p6; - private static redo_delegate _d6; - - public static void redo(cef_frame_t* self) - { - redo_delegate d; - var p = self->_redo; - if (p == _p6) { d = _d6; } - else - { - d = (redo_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(redo_delegate)); - if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } - } - d(self); - } - - // Cut - private static IntPtr _p7; - private static cut_delegate _d7; - - public static void cut(cef_frame_t* self) - { - cut_delegate d; - var p = self->_cut; - if (p == _p7) { d = _d7; } - else - { - d = (cut_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cut_delegate)); - if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } - } - d(self); - } - - // Copy - private static IntPtr _p8; - private static copy_delegate _d8; - - public static void copy(cef_frame_t* self) - { - copy_delegate d; - var p = self->_copy; - if (p == _p8) { d = _d8; } - else - { - d = (copy_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(copy_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } - } - d(self); - } - - // Paste - private static IntPtr _p9; - private static paste_delegate _d9; - - public static void paste(cef_frame_t* self) - { - paste_delegate d; - var p = self->_paste; - if (p == _p9) { d = _d9; } - else - { - d = (paste_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(paste_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } - } - d(self); - } - - // Delete - private static IntPtr _pa; - private static del_delegate _da; - - public static void del(cef_frame_t* self) - { - del_delegate d; - var p = self->_del; - if (p == _pa) { d = _da; } - else - { - d = (del_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(del_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } - } - d(self); - } - - // SelectAll - private static IntPtr _pb; - private static select_all_delegate _db; - - public static void select_all(cef_frame_t* self) - { - select_all_delegate d; - var p = self->_select_all; - if (p == _pb) { d = _db; } - else - { - d = (select_all_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(select_all_delegate)); - if (_pb == IntPtr.Zero) { _db = d; _pb = p; } - } - d(self); - } - - // ViewSource - private static IntPtr _pc; - private static view_source_delegate _dc; - - public static void view_source(cef_frame_t* self) - { - view_source_delegate d; - var p = self->_view_source; - if (p == _pc) { d = _dc; } - else - { - d = (view_source_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(view_source_delegate)); - if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } - } - d(self); - } - - // GetSource - private static IntPtr _pd; - private static get_source_delegate _dd; - - public static void get_source(cef_frame_t* self, cef_string_visitor_t* visitor) - { - get_source_delegate d; - var p = self->_get_source; - if (p == _pd) { d = _dd; } - else - { - d = (get_source_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_source_delegate)); - if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } - } - d(self, visitor); - } - - // GetText - private static IntPtr _pe; - private static get_text_delegate _de; - - public static void get_text(cef_frame_t* self, cef_string_visitor_t* visitor) - { - get_text_delegate d; - var p = self->_get_text; - if (p == _pe) { d = _de; } - else - { - d = (get_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_text_delegate)); - if (_pe == IntPtr.Zero) { _de = d; _pe = p; } - } - d(self, visitor); - } - - // LoadRequest - private static IntPtr _pf; - private static load_request_delegate _df; - - public static void load_request(cef_frame_t* self, cef_request_t* request) - { - load_request_delegate d; - var p = self->_load_request; - if (p == _pf) { d = _df; } - else - { - d = (load_request_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_request_delegate)); - if (_pf == IntPtr.Zero) { _df = d; _pf = p; } - } - d(self, request); - } - - // LoadURL - private static IntPtr _p10; - private static load_url_delegate _d10; - - public static void load_url(cef_frame_t* self, cef_string_t* url) - { - load_url_delegate d; - var p = self->_load_url; - if (p == _p10) { d = _d10; } - else - { - d = (load_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_url_delegate)); - if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } - } - d(self, url); - } - - // ExecuteJavaScript - private static IntPtr _p11; - private static execute_java_script_delegate _d11; - - public static void execute_java_script(cef_frame_t* self, cef_string_t* code, cef_string_t* script_url, int start_line) - { - execute_java_script_delegate d; - var p = self->_execute_java_script; - if (p == _p11) { d = _d11; } - else - { - d = (execute_java_script_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_java_script_delegate)); - if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } - } - d(self, code, script_url, start_line); - } - - // IsMain - private static IntPtr _p12; - private static is_main_delegate _d12; - - public static int is_main(cef_frame_t* self) - { - is_main_delegate d; - var p = self->_is_main; - if (p == _p12) { d = _d12; } - else - { - d = (is_main_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_main_delegate)); - if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } - } - return d(self); - } - - // IsFocused - private static IntPtr _p13; - private static is_focused_delegate _d13; - - public static int is_focused(cef_frame_t* self) - { - is_focused_delegate d; - var p = self->_is_focused; - if (p == _p13) { d = _d13; } - else - { - d = (is_focused_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_focused_delegate)); - if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } - } - return d(self); - } - - // GetName - private static IntPtr _p14; - private static get_name_delegate _d14; - - public static cef_string_userfree* get_name(cef_frame_t* self) - { - get_name_delegate d; - var p = self->_get_name; - if (p == _p14) { d = _d14; } - else - { - d = (get_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_name_delegate)); - if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } - } - return d(self); - } - - // GetIdentifier - private static IntPtr _p15; - private static get_identifier_delegate _d15; - - public static long get_identifier(cef_frame_t* self) - { - get_identifier_delegate d; - var p = self->_get_identifier; - if (p == _p15) { d = _d15; } - else - { - d = (get_identifier_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_identifier_delegate)); - if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } - } - return d(self); - } - - // GetParent - private static IntPtr _p16; - private static get_parent_delegate _d16; - - public static cef_frame_t* get_parent(cef_frame_t* self) - { - get_parent_delegate d; - var p = self->_get_parent; - if (p == _p16) { d = _d16; } - else - { - d = (get_parent_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_parent_delegate)); - if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } - } - return d(self); - } - - // GetURL - private static IntPtr _p17; - private static get_url_delegate _d17; - - public static cef_string_userfree* get_url(cef_frame_t* self) - { - get_url_delegate d; - var p = self->_get_url; - if (p == _p17) { d = _d17; } - else - { - d = (get_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_url_delegate)); - if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } - } - return d(self); - } - - // GetBrowser - private static IntPtr _p18; - private static get_browser_delegate _d18; - - public static cef_browser_t* get_browser(cef_frame_t* self) - { - get_browser_delegate d; - var p = self->_get_browser; - if (p == _p18) { d = _d18; } - else - { - d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate)); - if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } - } - return d(self); - } - - // GetV8Context - private static IntPtr _p19; - private static get_v8context_delegate _d19; - - public static cef_v8context_t* get_v8context(cef_frame_t* self) - { - get_v8context_delegate d; - var p = self->_get_v8context; - if (p == _p19) { d = _d19; } - else - { - d = (get_v8context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_v8context_delegate)); - if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } - } - return d(self); - } - - // VisitDOM - private static IntPtr _p1a; - private static visit_dom_delegate _d1a; - - public static void visit_dom(cef_frame_t* self, cef_domvisitor_t* visitor) - { - visit_dom_delegate d; - var p = self->_visit_dom; - if (p == _p1a) { d = _d1a; } - else - { - d = (visit_dom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(visit_dom_delegate)); - if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } - } - d(self, visitor); - } - - // CreateURLRequest - private static IntPtr _p1b; - private static create_urlrequest_delegate _d1b; - - public static cef_urlrequest_t* create_urlrequest(cef_frame_t* self, cef_request_t* request, cef_urlrequest_client_t* client) - { - create_urlrequest_delegate d; - var p = self->_create_urlrequest; - if (p == _p1b) { d = _d1b; } - else - { - d = (create_urlrequest_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(create_urlrequest_delegate)); - if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } - } - return d(self, request, client); - } - - // SendProcessMessage - private static IntPtr _p1c; - private static send_process_message_delegate _d1c; - - public static void send_process_message(cef_frame_t* self, CefProcessId target_process, cef_process_message_t* message) - { - send_process_message_delegate d; - var p = self->_send_process_message; - if (p == _p1c) { d = _d1c; } - else - { - d = (send_process_message_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_process_message_delegate)); - if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } - } - d(self, target_process, message); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_frame_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _is_valid; + internal IntPtr _undo; + internal IntPtr _redo; + internal IntPtr _cut; + internal IntPtr _copy; + internal IntPtr _paste; + internal IntPtr _del; + internal IntPtr _select_all; + internal IntPtr _view_source; + internal IntPtr _get_source; + internal IntPtr _get_text; + internal IntPtr _load_request; + internal IntPtr _load_url; + internal IntPtr _execute_java_script; + internal IntPtr _is_main; + internal IntPtr _is_focused; + internal IntPtr _get_name; + internal IntPtr _get_identifier; + internal IntPtr _get_parent; + internal IntPtr _get_url; + internal IntPtr _get_browser; + internal IntPtr _get_v8context; + internal IntPtr _visit_dom; + internal IntPtr _create_urlrequest; + internal IntPtr _send_process_message; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_valid_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void undo_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void redo_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void cut_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void copy_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void paste_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void del_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void select_all_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void view_source_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_source_delegate(cef_frame_t* self, cef_string_visitor_t* visitor); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_text_delegate(cef_frame_t* self, cef_string_visitor_t* visitor); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void load_request_delegate(cef_frame_t* self, cef_request_t* request); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void load_url_delegate(cef_frame_t* self, cef_string_t* url); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void execute_java_script_delegate(cef_frame_t* self, cef_string_t* code, cef_string_t* script_url, int start_line); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_main_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_focused_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_name_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_identifier_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_frame_t* get_parent_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_url_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_browser_t* get_browser_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8context_t* get_v8context_delegate(cef_frame_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void visit_dom_delegate(cef_frame_t* self, cef_domvisitor_t* visitor); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_urlrequest_t* create_urlrequest_delegate(cef_frame_t* self, cef_request_t* request, cef_urlrequest_client_t* client); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void send_process_message_delegate(cef_frame_t* self, CefProcessId target_process, cef_process_message_t* message); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_frame_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_frame_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_frame_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_frame_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // IsValid + private static IntPtr _p4; + private static is_valid_delegate _d4; + + public static int is_valid(cef_frame_t* self) + { + is_valid_delegate d; + var p = self->_is_valid; + if (p == _p4) { d = _d4; } + else + { + d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + return d(self); + } + + // Undo + private static IntPtr _p5; + private static undo_delegate _d5; + + public static void undo(cef_frame_t* self) + { + undo_delegate d; + var p = self->_undo; + if (p == _p5) { d = _d5; } + else + { + d = (undo_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(undo_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + d(self); + } + + // Redo + private static IntPtr _p6; + private static redo_delegate _d6; + + public static void redo(cef_frame_t* self) + { + redo_delegate d; + var p = self->_redo; + if (p == _p6) { d = _d6; } + else + { + d = (redo_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(redo_delegate)); + if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } + } + d(self); + } + + // Cut + private static IntPtr _p7; + private static cut_delegate _d7; + + public static void cut(cef_frame_t* self) + { + cut_delegate d; + var p = self->_cut; + if (p == _p7) { d = _d7; } + else + { + d = (cut_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cut_delegate)); + if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } + } + d(self); + } + + // Copy + private static IntPtr _p8; + private static copy_delegate _d8; + + public static void copy(cef_frame_t* self) + { + copy_delegate d; + var p = self->_copy; + if (p == _p8) { d = _d8; } + else + { + d = (copy_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(copy_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + d(self); + } + + // Paste + private static IntPtr _p9; + private static paste_delegate _d9; + + public static void paste(cef_frame_t* self) + { + paste_delegate d; + var p = self->_paste; + if (p == _p9) { d = _d9; } + else + { + d = (paste_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(paste_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + d(self); + } + + // Delete + private static IntPtr _pa; + private static del_delegate _da; + + public static void del(cef_frame_t* self) + { + del_delegate d; + var p = self->_del; + if (p == _pa) { d = _da; } + else + { + d = (del_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(del_delegate)); + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + } + d(self); + } + + // SelectAll + private static IntPtr _pb; + private static select_all_delegate _db; + + public static void select_all(cef_frame_t* self) + { + select_all_delegate d; + var p = self->_select_all; + if (p == _pb) { d = _db; } + else + { + d = (select_all_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(select_all_delegate)); + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } + } + d(self); + } + + // ViewSource + private static IntPtr _pc; + private static view_source_delegate _dc; + + public static void view_source(cef_frame_t* self) + { + view_source_delegate d; + var p = self->_view_source; + if (p == _pc) { d = _dc; } + else + { + d = (view_source_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(view_source_delegate)); + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } + } + d(self); + } + + // GetSource + private static IntPtr _pd; + private static get_source_delegate _dd; + + public static void get_source(cef_frame_t* self, cef_string_visitor_t* visitor) + { + get_source_delegate d; + var p = self->_get_source; + if (p == _pd) { d = _dd; } + else + { + d = (get_source_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_source_delegate)); + if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } + } + d(self, visitor); + } + + // GetText + private static IntPtr _pe; + private static get_text_delegate _de; + + public static void get_text(cef_frame_t* self, cef_string_visitor_t* visitor) + { + get_text_delegate d; + var p = self->_get_text; + if (p == _pe) { d = _de; } + else + { + d = (get_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_text_delegate)); + if (_pe == IntPtr.Zero) { _de = d; _pe = p; } + } + d(self, visitor); + } + + // LoadRequest + private static IntPtr _pf; + private static load_request_delegate _df; + + public static void load_request(cef_frame_t* self, cef_request_t* request) + { + load_request_delegate d; + var p = self->_load_request; + if (p == _pf) { d = _df; } + else + { + d = (load_request_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_request_delegate)); + if (_pf == IntPtr.Zero) { _df = d; _pf = p; } + } + d(self, request); + } + + // LoadURL + private static IntPtr _p10; + private static load_url_delegate _d10; + + public static void load_url(cef_frame_t* self, cef_string_t* url) + { + load_url_delegate d; + var p = self->_load_url; + if (p == _p10) { d = _d10; } + else + { + d = (load_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_url_delegate)); + if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } + } + d(self, url); + } + + // ExecuteJavaScript + private static IntPtr _p11; + private static execute_java_script_delegate _d11; + + public static void execute_java_script(cef_frame_t* self, cef_string_t* code, cef_string_t* script_url, int start_line) + { + execute_java_script_delegate d; + var p = self->_execute_java_script; + if (p == _p11) { d = _d11; } + else + { + d = (execute_java_script_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_java_script_delegate)); + if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } + } + d(self, code, script_url, start_line); + } + + // IsMain + private static IntPtr _p12; + private static is_main_delegate _d12; + + public static int is_main(cef_frame_t* self) + { + is_main_delegate d; + var p = self->_is_main; + if (p == _p12) { d = _d12; } + else + { + d = (is_main_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_main_delegate)); + if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } + } + return d(self); + } + + // IsFocused + private static IntPtr _p13; + private static is_focused_delegate _d13; + + public static int is_focused(cef_frame_t* self) + { + is_focused_delegate d; + var p = self->_is_focused; + if (p == _p13) { d = _d13; } + else + { + d = (is_focused_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_focused_delegate)); + if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } + } + return d(self); + } + + // GetName + private static IntPtr _p14; + private static get_name_delegate _d14; + + public static cef_string_userfree* get_name(cef_frame_t* self) + { + get_name_delegate d; + var p = self->_get_name; + if (p == _p14) { d = _d14; } + else + { + d = (get_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_name_delegate)); + if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } + } + return d(self); + } + + // GetIdentifier + private static IntPtr _p15; + private static get_identifier_delegate _d15; + + public static cef_string_userfree* get_identifier(cef_frame_t* self) + { + get_identifier_delegate d; + var p = self->_get_identifier; + if (p == _p15) { d = _d15; } + else + { + d = (get_identifier_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_identifier_delegate)); + if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } + } + return d(self); + } + + // GetParent + private static IntPtr _p16; + private static get_parent_delegate _d16; + + public static cef_frame_t* get_parent(cef_frame_t* self) + { + get_parent_delegate d; + var p = self->_get_parent; + if (p == _p16) { d = _d16; } + else + { + d = (get_parent_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_parent_delegate)); + if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } + } + return d(self); + } + + // GetURL + private static IntPtr _p17; + private static get_url_delegate _d17; + + public static cef_string_userfree* get_url(cef_frame_t* self) + { + get_url_delegate d; + var p = self->_get_url; + if (p == _p17) { d = _d17; } + else + { + d = (get_url_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_url_delegate)); + if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } + } + return d(self); + } + + // GetBrowser + private static IntPtr _p18; + private static get_browser_delegate _d18; + + public static cef_browser_t* get_browser(cef_frame_t* self) + { + get_browser_delegate d; + var p = self->_get_browser; + if (p == _p18) { d = _d18; } + else + { + d = (get_browser_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_browser_delegate)); + if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } + } + return d(self); + } + + // GetV8Context + private static IntPtr _p19; + private static get_v8context_delegate _d19; + + public static cef_v8context_t* get_v8context(cef_frame_t* self) + { + get_v8context_delegate d; + var p = self->_get_v8context; + if (p == _p19) { d = _d19; } + else + { + d = (get_v8context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_v8context_delegate)); + if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + } + return d(self); + } + + // VisitDOM + private static IntPtr _p1a; + private static visit_dom_delegate _d1a; + + public static void visit_dom(cef_frame_t* self, cef_domvisitor_t* visitor) + { + visit_dom_delegate d; + var p = self->_visit_dom; + if (p == _p1a) { d = _d1a; } + else + { + d = (visit_dom_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(visit_dom_delegate)); + if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + } + d(self, visitor); + } + + // CreateURLRequest + private static IntPtr _p1b; + private static create_urlrequest_delegate _d1b; + + public static cef_urlrequest_t* create_urlrequest(cef_frame_t* self, cef_request_t* request, cef_urlrequest_client_t* client) + { + create_urlrequest_delegate d; + var p = self->_create_urlrequest; + if (p == _p1b) { d = _d1b; } + else + { + d = (create_urlrequest_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(create_urlrequest_delegate)); + if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + } + return d(self, request, client); + } + + // SendProcessMessage + private static IntPtr _p1c; + private static send_process_message_delegate _d1c; + + public static void send_process_message(cef_frame_t* self, CefProcessId target_process, cef_process_message_t* message) + { + send_process_message_delegate d; + var p = self->_send_process_message; + if (p == _p1c) { d = _d1c; } + else + { + d = (send_process_message_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_process_message_delegate)); + if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } + } + d(self, target_process, message); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_render_handler_t.g.cs b/CefGlue/Interop/Classes.g/cef_render_handler_t.g.cs index 760045da..4e5db652 100644 --- a/CefGlue/Interop/Classes.g/cef_render_handler_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_render_handler_t.g.cs @@ -1,181 +1,181 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_render_handler_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _get_accessibility_handler; - internal IntPtr _get_root_screen_rect; - internal IntPtr _get_view_rect; - internal IntPtr _get_screen_point; - internal IntPtr _get_screen_info; - internal IntPtr _on_popup_show; - internal IntPtr _on_popup_size; - internal IntPtr _on_paint; - internal IntPtr _on_accelerated_paint; - internal IntPtr _get_touch_handle_size; - internal IntPtr _on_touch_handle_state_changed; - internal IntPtr _start_dragging; - internal IntPtr _update_drag_cursor; - internal IntPtr _on_scroll_offset_changed; - internal IntPtr _on_ime_composition_range_changed; - internal IntPtr _on_text_selection_changed; - internal IntPtr _on_virtual_keyboard_requested; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void add_ref_delegate(cef_render_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int release_delegate(cef_render_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_one_ref_delegate(cef_render_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_at_least_one_ref_delegate(cef_render_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate cef_accessibility_handler_t* get_accessibility_handler_delegate(cef_render_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int get_root_screen_rect_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void get_view_rect_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int get_screen_point_delegate(cef_render_handler_t* self, cef_browser_t* browser, int viewX, int viewY, int* screenX, int* screenY); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int get_screen_info_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_screen_info_t* screen_info); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_popup_show_delegate(cef_render_handler_t* self, cef_browser_t* browser, int show); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_popup_size_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_paint_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, void* buffer, int width, int height); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_accelerated_paint_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, void* shared_handle); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void get_touch_handle_size_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefHorizontalAlignment orientation, cef_size_t* size); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_touch_handle_state_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_touch_handle_state_t* state); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int start_dragging_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_drag_data_t* drag_data, CefDragOperationsMask allowed_ops, int x, int y); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void update_drag_cursor_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefDragOperationsMask operation); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_scroll_offset_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, double x, double y); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_ime_composition_range_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_range_t* selected_range, UIntPtr character_boundsCount, cef_rect_t* character_bounds); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_text_selection_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_string_t* selected_text, cef_range_t* selected_range); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_virtual_keyboard_requested_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefTextInputMode input_mode); - - private static int _sizeof; - - static cef_render_handler_t() - { - _sizeof = Marshal.SizeOf(typeof(cef_render_handler_t)); - } - - internal static cef_render_handler_t* Alloc() - { - var ptr = (cef_render_handler_t*)Marshal.AllocHGlobal(_sizeof); - *ptr = new cef_render_handler_t(); - ptr->_base._size = (UIntPtr)_sizeof; - return ptr; - } - - internal static void Free(cef_render_handler_t* ptr) - { - Marshal.FreeHGlobal((IntPtr)ptr); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_render_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _get_accessibility_handler; + internal IntPtr _get_root_screen_rect; + internal IntPtr _get_view_rect; + internal IntPtr _get_screen_point; + internal IntPtr _get_screen_info; + internal IntPtr _on_popup_show; + internal IntPtr _on_popup_size; + internal IntPtr _on_paint; + internal IntPtr _on_accelerated_paint; + internal IntPtr _get_touch_handle_size; + internal IntPtr _on_touch_handle_state_changed; + internal IntPtr _start_dragging; + internal IntPtr _update_drag_cursor; + internal IntPtr _on_scroll_offset_changed; + internal IntPtr _on_ime_composition_range_changed; + internal IntPtr _on_text_selection_changed; + internal IntPtr _on_virtual_keyboard_requested; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_render_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_render_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_render_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_render_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate cef_accessibility_handler_t* get_accessibility_handler_delegate(cef_render_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int get_root_screen_rect_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void get_view_rect_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int get_screen_point_delegate(cef_render_handler_t* self, cef_browser_t* browser, int viewX, int viewY, int* screenX, int* screenY); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int get_screen_info_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_screen_info_t* screen_info); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_popup_show_delegate(cef_render_handler_t* self, cef_browser_t* browser, int show); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_popup_size_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_rect_t* rect); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_paint_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, void* buffer, int width, int height); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_accelerated_paint_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefPaintElementType type, UIntPtr dirtyRectsCount, cef_rect_t* dirtyRects, cef_accelerated_paint_info_t* info); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void get_touch_handle_size_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefHorizontalAlignment orientation, cef_size_t* size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_touch_handle_state_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_touch_handle_state_t* state); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int start_dragging_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_drag_data_t* drag_data, CefDragOperationsMask allowed_ops, int x, int y); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void update_drag_cursor_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefDragOperationsMask operation); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_scroll_offset_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, double x, double y); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_ime_composition_range_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_range_t* selected_range, UIntPtr character_boundsCount, cef_rect_t* character_bounds); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_text_selection_changed_delegate(cef_render_handler_t* self, cef_browser_t* browser, cef_string_t* selected_text, cef_range_t* selected_range); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_virtual_keyboard_requested_delegate(cef_render_handler_t* self, cef_browser_t* browser, CefTextInputMode input_mode); + + private static int _sizeof; + + static cef_render_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_render_handler_t)); + } + + internal static cef_render_handler_t* Alloc() + { + var ptr = (cef_render_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_render_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_render_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_request_context_t.g.cs b/CefGlue/Interop/Classes.g/cef_request_context_t.g.cs index a4366c0d..442036e0 100644 --- a/CefGlue/Interop/Classes.g/cef_request_context_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_request_context_t.g.cs @@ -1,770 +1,866 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_request_context_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _has_preference; - internal IntPtr _get_preference; - internal IntPtr _get_all_preferences; - internal IntPtr _can_set_preference; - internal IntPtr _set_preference; - internal IntPtr _is_same; - internal IntPtr _is_sharing_with; - internal IntPtr _is_global; - internal IntPtr _get_handler; - internal IntPtr _get_cache_path; - internal IntPtr _get_cookie_manager; - internal IntPtr _register_scheme_handler_factory; - internal IntPtr _clear_scheme_handler_factories; - internal IntPtr _clear_certificate_exceptions; - internal IntPtr _clear_http_auth_credentials; - internal IntPtr _close_all_connections; - internal IntPtr _resolve_host; - internal IntPtr _load_extension; - internal IntPtr _did_load_extension; - internal IntPtr _has_extension; - internal IntPtr _get_extensions; - internal IntPtr _get_extension; - internal IntPtr _get_media_router; - internal IntPtr _get_website_setting; - internal IntPtr _set_website_setting; - internal IntPtr _get_content_setting; - internal IntPtr _set_content_setting; - - // GetGlobalContext - [DllImport(libcef.DllName, EntryPoint = "cef_request_context_get_global_context", CallingConvention = libcef.CEF_CALL)] - public static extern cef_request_context_t* get_global_context(); - - // CreateContext - [DllImport(libcef.DllName, EntryPoint = "cef_request_context_create_context", CallingConvention = libcef.CEF_CALL)] - public static extern cef_request_context_t* create_context(cef_request_context_settings_t* settings, cef_request_context_handler_t* handler); - - // CreateContext - [DllImport(libcef.DllName, EntryPoint = "cef_create_context_shared", CallingConvention = libcef.CEF_CALL)] - public static extern cef_request_context_t* create_context(cef_request_context_t* other, cef_request_context_handler_t* handler); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_ref_delegate(cef_preference_manager_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int release_delegate(cef_preference_manager_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_one_ref_delegate(cef_preference_manager_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_at_least_one_ref_delegate(cef_preference_manager_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_value_t* get_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_dictionary_value_t* get_all_preferences_delegate(cef_preference_manager_t* self, int include_defaults); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int can_set_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_preference_delegate(cef_preference_manager_t* self, cef_string_t* name, cef_value_t* value, cef_string_t* error); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_same_delegate(cef_request_context_t* self, cef_request_context_t* other); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_sharing_with_delegate(cef_request_context_t* self, cef_request_context_t* other); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_global_delegate(cef_request_context_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_request_context_handler_t* get_handler_delegate(cef_request_context_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_string_userfree* get_cache_path_delegate(cef_request_context_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_cookie_manager_t* get_cookie_manager_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int register_scheme_handler_factory_delegate(cef_request_context_t* self, cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int clear_scheme_handler_factories_delegate(cef_request_context_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void clear_certificate_exceptions_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void clear_http_auth_credentials_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void close_all_connections_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void resolve_host_delegate(cef_request_context_t* self, cef_string_t* origin, cef_resolve_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void load_extension_delegate(cef_request_context_t* self, cef_string_t* root_directory, cef_dictionary_value_t* manifest, cef_extension_handler_t* handler); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int did_load_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_extensions_delegate(cef_request_context_t* self, cef_string_list* extension_ids); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_extension_t* get_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_media_router_t* get_media_router_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_value_t* get_website_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_website_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, cef_value_t* value); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate CefContentSettingValue get_content_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void set_content_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, CefContentSettingValue value); - - // AddRef - private static IntPtr _p0; - private static add_ref_delegate _d0; - - public static void add_ref(cef_preference_manager_t* self) - { - add_ref_delegate d; - var p = self->_base._add_ref; - if (p == _p0) { d = _d0; } - else - { - d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); - if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } - } - d(self); - } - - // Release - private static IntPtr _p1; - private static release_delegate _d1; - - public static int release(cef_preference_manager_t* self) - { - release_delegate d; - var p = self->_base._release; - if (p == _p1) { d = _d1; } - else - { - d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); - if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } - } - return d(self); - } - - // HasOneRef - private static IntPtr _p2; - private static has_one_ref_delegate _d2; - - public static int has_one_ref(cef_preference_manager_t* self) - { - has_one_ref_delegate d; - var p = self->_base._has_one_ref; - if (p == _p2) { d = _d2; } - else - { - d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); - if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } - } - return d(self); - } - - // HasAtLeastOneRef - private static IntPtr _p3; - private static has_at_least_one_ref_delegate _d3; - - public static int has_at_least_one_ref(cef_preference_manager_t* self) - { - has_at_least_one_ref_delegate d; - var p = self->_base._has_at_least_one_ref; - if (p == _p3) { d = _d3; } - else - { - d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); - if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } - } - return d(self); - } - - // HasPreference - private static IntPtr _p4; - private static has_preference_delegate _d4; - - public static int has_preference(cef_preference_manager_t* self, cef_string_t* name) - { - has_preference_delegate d; - var p = self->_has_preference; - if (p == _p4) { d = _d4; } - else - { - d = (has_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_preference_delegate)); - if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } - } - return d(self, name); - } - - // GetPreference - private static IntPtr _p5; - private static get_preference_delegate _d5; - - public static cef_value_t* get_preference(cef_preference_manager_t* self, cef_string_t* name) - { - get_preference_delegate d; - var p = self->_get_preference; - if (p == _p5) { d = _d5; } - else - { - d = (get_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_preference_delegate)); - if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } - } - return d(self, name); - } - - // GetAllPreferences - private static IntPtr _p6; - private static get_all_preferences_delegate _d6; - - public static cef_dictionary_value_t* get_all_preferences(cef_preference_manager_t* self, int include_defaults) - { - get_all_preferences_delegate d; - var p = self->_get_all_preferences; - if (p == _p6) { d = _d6; } - else - { - d = (get_all_preferences_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_all_preferences_delegate)); - if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } - } - return d(self, include_defaults); - } - - // CanSetPreference - private static IntPtr _p7; - private static can_set_preference_delegate _d7; - - public static int can_set_preference(cef_preference_manager_t* self, cef_string_t* name) - { - can_set_preference_delegate d; - var p = self->_can_set_preference; - if (p == _p7) { d = _d7; } - else - { - d = (can_set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_set_preference_delegate)); - if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } - } - return d(self, name); - } - - // SetPreference - private static IntPtr _p8; - private static set_preference_delegate _d8; - - public static int set_preference(cef_preference_manager_t* self, cef_string_t* name, cef_value_t* value, cef_string_t* error) - { - set_preference_delegate d; - var p = self->_set_preference; - if (p == _p8) { d = _d8; } - else - { - d = (set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_preference_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } - } - return d(self, name, value, error); - } - - // IsSame - private static IntPtr _p9; - private static is_same_delegate _d9; - - public static int is_same(cef_request_context_t* self, cef_request_context_t* other) - { - is_same_delegate d; - var p = self->_is_same; - if (p == _p9) { d = _d9; } - else - { - d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } - } - return d(self, other); - } - - // IsSharingWith - private static IntPtr _pa; - private static is_sharing_with_delegate _da; - - public static int is_sharing_with(cef_request_context_t* self, cef_request_context_t* other) - { - is_sharing_with_delegate d; - var p = self->_is_sharing_with; - if (p == _pa) { d = _da; } - else - { - d = (is_sharing_with_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_sharing_with_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } - } - return d(self, other); - } - - // IsGlobal - private static IntPtr _pb; - private static is_global_delegate _db; - - public static int is_global(cef_request_context_t* self) - { - is_global_delegate d; - var p = self->_is_global; - if (p == _pb) { d = _db; } - else - { - d = (is_global_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_global_delegate)); - if (_pb == IntPtr.Zero) { _db = d; _pb = p; } - } - return d(self); - } - - // GetHandler - private static IntPtr _pc; - private static get_handler_delegate _dc; - - public static cef_request_context_handler_t* get_handler(cef_request_context_t* self) - { - get_handler_delegate d; - var p = self->_get_handler; - if (p == _pc) { d = _dc; } - else - { - d = (get_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_handler_delegate)); - if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } - } - return d(self); - } - - // GetCachePath - private static IntPtr _pd; - private static get_cache_path_delegate _dd; - - public static cef_string_userfree* get_cache_path(cef_request_context_t* self) - { - get_cache_path_delegate d; - var p = self->_get_cache_path; - if (p == _pd) { d = _dd; } - else - { - d = (get_cache_path_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_cache_path_delegate)); - if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } - } - return d(self); - } - - // GetCookieManager - private static IntPtr _pe; - private static get_cookie_manager_delegate _de; - - public static cef_cookie_manager_t* get_cookie_manager(cef_request_context_t* self, cef_completion_callback_t* callback) - { - get_cookie_manager_delegate d; - var p = self->_get_cookie_manager; - if (p == _pe) { d = _de; } - else - { - d = (get_cookie_manager_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_cookie_manager_delegate)); - if (_pe == IntPtr.Zero) { _de = d; _pe = p; } - } - return d(self, callback); - } - - // RegisterSchemeHandlerFactory - private static IntPtr _pf; - private static register_scheme_handler_factory_delegate _df; - - public static int register_scheme_handler_factory(cef_request_context_t* self, cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory) - { - register_scheme_handler_factory_delegate d; - var p = self->_register_scheme_handler_factory; - if (p == _pf) { d = _df; } - else - { - d = (register_scheme_handler_factory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(register_scheme_handler_factory_delegate)); - if (_pf == IntPtr.Zero) { _df = d; _pf = p; } - } - return d(self, scheme_name, domain_name, factory); - } - - // ClearSchemeHandlerFactories - private static IntPtr _p10; - private static clear_scheme_handler_factories_delegate _d10; - - public static int clear_scheme_handler_factories(cef_request_context_t* self) - { - clear_scheme_handler_factories_delegate d; - var p = self->_clear_scheme_handler_factories; - if (p == _p10) { d = _d10; } - else - { - d = (clear_scheme_handler_factories_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_scheme_handler_factories_delegate)); - if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } - } - return d(self); - } - - // ClearCertificateExceptions - private static IntPtr _p11; - private static clear_certificate_exceptions_delegate _d11; - - public static void clear_certificate_exceptions(cef_request_context_t* self, cef_completion_callback_t* callback) - { - clear_certificate_exceptions_delegate d; - var p = self->_clear_certificate_exceptions; - if (p == _p11) { d = _d11; } - else - { - d = (clear_certificate_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_certificate_exceptions_delegate)); - if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } - } - d(self, callback); - } - - // ClearHttpAuthCredentials - private static IntPtr _p12; - private static clear_http_auth_credentials_delegate _d12; - - public static void clear_http_auth_credentials(cef_request_context_t* self, cef_completion_callback_t* callback) - { - clear_http_auth_credentials_delegate d; - var p = self->_clear_http_auth_credentials; - if (p == _p12) { d = _d12; } - else - { - d = (clear_http_auth_credentials_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_http_auth_credentials_delegate)); - if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } - } - d(self, callback); - } - - // CloseAllConnections - private static IntPtr _p13; - private static close_all_connections_delegate _d13; - - public static void close_all_connections(cef_request_context_t* self, cef_completion_callback_t* callback) - { - close_all_connections_delegate d; - var p = self->_close_all_connections; - if (p == _p13) { d = _d13; } - else - { - d = (close_all_connections_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_all_connections_delegate)); - if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } - } - d(self, callback); - } - - // ResolveHost - private static IntPtr _p14; - private static resolve_host_delegate _d14; - - public static void resolve_host(cef_request_context_t* self, cef_string_t* origin, cef_resolve_callback_t* callback) - { - resolve_host_delegate d; - var p = self->_resolve_host; - if (p == _p14) { d = _d14; } - else - { - d = (resolve_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_host_delegate)); - if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } - } - d(self, origin, callback); - } - - // LoadExtension - private static IntPtr _p15; - private static load_extension_delegate _d15; - - public static void load_extension(cef_request_context_t* self, cef_string_t* root_directory, cef_dictionary_value_t* manifest, cef_extension_handler_t* handler) - { - load_extension_delegate d; - var p = self->_load_extension; - if (p == _p15) { d = _d15; } - else - { - d = (load_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_extension_delegate)); - if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } - } - d(self, root_directory, manifest, handler); - } - - // DidLoadExtension - private static IntPtr _p16; - private static did_load_extension_delegate _d16; - - public static int did_load_extension(cef_request_context_t* self, cef_string_t* extension_id) - { - did_load_extension_delegate d; - var p = self->_did_load_extension; - if (p == _p16) { d = _d16; } - else - { - d = (did_load_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(did_load_extension_delegate)); - if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } - } - return d(self, extension_id); - } - - // HasExtension - private static IntPtr _p17; - private static has_extension_delegate _d17; - - public static int has_extension(cef_request_context_t* self, cef_string_t* extension_id) - { - has_extension_delegate d; - var p = self->_has_extension; - if (p == _p17) { d = _d17; } - else - { - d = (has_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_extension_delegate)); - if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } - } - return d(self, extension_id); - } - - // GetExtensions - private static IntPtr _p18; - private static get_extensions_delegate _d18; - - public static int get_extensions(cef_request_context_t* self, cef_string_list* extension_ids) - { - get_extensions_delegate d; - var p = self->_get_extensions; - if (p == _p18) { d = _d18; } - else - { - d = (get_extensions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extensions_delegate)); - if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } - } - return d(self, extension_ids); - } - - // GetExtension - private static IntPtr _p19; - private static get_extension_delegate _d19; - - public static cef_extension_t* get_extension(cef_request_context_t* self, cef_string_t* extension_id) - { - get_extension_delegate d; - var p = self->_get_extension; - if (p == _p19) { d = _d19; } - else - { - d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate)); - if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } - } - return d(self, extension_id); - } - - // GetMediaRouter - private static IntPtr _p1a; - private static get_media_router_delegate _d1a; - - public static cef_media_router_t* get_media_router(cef_request_context_t* self, cef_completion_callback_t* callback) - { - get_media_router_delegate d; - var p = self->_get_media_router; - if (p == _p1a) { d = _d1a; } - else - { - d = (get_media_router_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_media_router_delegate)); - if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } - } - return d(self, callback); - } - - // GetWebsiteSetting - private static IntPtr _p1b; - private static get_website_setting_delegate _d1b; - - public static cef_value_t* get_website_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type) - { - get_website_setting_delegate d; - var p = self->_get_website_setting; - if (p == _p1b) { d = _d1b; } - else - { - d = (get_website_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_website_setting_delegate)); - if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } - } - return d(self, requesting_url, top_level_url, content_type); - } - - // SetWebsiteSetting - private static IntPtr _p1c; - private static set_website_setting_delegate _d1c; - - public static void set_website_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, cef_value_t* value) - { - set_website_setting_delegate d; - var p = self->_set_website_setting; - if (p == _p1c) { d = _d1c; } - else - { - d = (set_website_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_website_setting_delegate)); - if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } - } - d(self, requesting_url, top_level_url, content_type, value); - } - - // GetContentSetting - private static IntPtr _p1d; - private static get_content_setting_delegate _d1d; - - public static CefContentSettingValue get_content_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type) - { - get_content_setting_delegate d; - var p = self->_get_content_setting; - if (p == _p1d) { d = _d1d; } - else - { - d = (get_content_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_content_setting_delegate)); - if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } - } - return d(self, requesting_url, top_level_url, content_type); - } - - // SetContentSetting - private static IntPtr _p1e; - private static set_content_setting_delegate _d1e; - - public static void set_content_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, CefContentSettingValue value) - { - set_content_setting_delegate d; - var p = self->_set_content_setting; - if (p == _p1e) { d = _d1e; } - else - { - d = (set_content_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_content_setting_delegate)); - if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } - } - d(self, requesting_url, top_level_url, content_type, value); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_request_context_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _has_preference; + internal IntPtr _get_preference; + internal IntPtr _get_all_preferences; + internal IntPtr _can_set_preference; + internal IntPtr _set_preference; + internal IntPtr _is_same; + internal IntPtr _is_sharing_with; + internal IntPtr _is_global; + internal IntPtr _get_handler; + internal IntPtr _get_cache_path; + internal IntPtr _get_cookie_manager; + internal IntPtr _register_scheme_handler_factory; + internal IntPtr _clear_scheme_handler_factories; + internal IntPtr _clear_certificate_exceptions; + internal IntPtr _clear_http_auth_credentials; + internal IntPtr _close_all_connections; + internal IntPtr _resolve_host; + internal IntPtr _load_extension; + internal IntPtr _did_load_extension; + internal IntPtr _has_extension; + internal IntPtr _get_extensions; + internal IntPtr _get_extension; + internal IntPtr _get_media_router; + internal IntPtr _get_website_setting; + internal IntPtr _set_website_setting; + internal IntPtr _get_content_setting; + internal IntPtr _set_content_setting; + internal IntPtr _set_chrome_color_scheme; + internal IntPtr _get_chrome_color_scheme_mode; + internal IntPtr _get_chrome_color_scheme_color; + internal IntPtr _get_chrome_color_scheme_variant; + + // GetGlobalContext + [DllImport(libcef.DllName, EntryPoint = "cef_request_context_get_global_context", CallingConvention = libcef.CEF_CALL)] + public static extern cef_request_context_t* get_global_context(); + + // CreateContext + [DllImport(libcef.DllName, EntryPoint = "cef_request_context_create_context", CallingConvention = libcef.CEF_CALL)] + public static extern cef_request_context_t* create_context(cef_request_context_settings_t* settings, cef_request_context_handler_t* handler); + + // CreateContext + [DllImport(libcef.DllName, EntryPoint = "cef_create_context_shared", CallingConvention = libcef.CEF_CALL)] + public static extern cef_request_context_t* create_context(cef_request_context_t* other, cef_request_context_handler_t* handler); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_preference_manager_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_preference_manager_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_preference_manager_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_preference_manager_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_value_t* get_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_dictionary_value_t* get_all_preferences_delegate(cef_preference_manager_t* self, int include_defaults); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int can_set_preference_delegate(cef_preference_manager_t* self, cef_string_t* name); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_preference_delegate(cef_preference_manager_t* self, cef_string_t* name, cef_value_t* value, cef_string_t* error); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_same_delegate(cef_request_context_t* self, cef_request_context_t* other); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_sharing_with_delegate(cef_request_context_t* self, cef_request_context_t* other); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_global_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_request_context_handler_t* get_handler_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_cache_path_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_cookie_manager_t* get_cookie_manager_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int register_scheme_handler_factory_delegate(cef_request_context_t* self, cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int clear_scheme_handler_factories_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void clear_certificate_exceptions_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void clear_http_auth_credentials_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void close_all_connections_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void resolve_host_delegate(cef_request_context_t* self, cef_string_t* origin, cef_resolve_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void load_extension_delegate(cef_request_context_t* self, cef_string_t* root_directory, cef_dictionary_value_t* manifest, cef_extension_handler_t* handler); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int did_load_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_extensions_delegate(cef_request_context_t* self, cef_string_list* extension_ids); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_extension_t* get_extension_delegate(cef_request_context_t* self, cef_string_t* extension_id); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_media_router_t* get_media_router_delegate(cef_request_context_t* self, cef_completion_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_value_t* get_website_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_website_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, cef_value_t* value); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefContentSettingValue get_content_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_content_setting_delegate(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, CefContentSettingValue value); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void set_chrome_color_scheme_delegate(cef_request_context_t* self, CefColorVariant variant, uint user_color); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefColorVariant get_chrome_color_scheme_mode_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate uint get_chrome_color_scheme_color_delegate(cef_request_context_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefColorVariant get_chrome_color_scheme_variant_delegate(cef_request_context_t* self); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_preference_manager_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_preference_manager_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_preference_manager_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_preference_manager_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // HasPreference + private static IntPtr _p4; + private static has_preference_delegate _d4; + + public static int has_preference(cef_preference_manager_t* self, cef_string_t* name) + { + has_preference_delegate d; + var p = self->_has_preference; + if (p == _p4) { d = _d4; } + else + { + d = (has_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_preference_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + return d(self, name); + } + + // GetPreference + private static IntPtr _p5; + private static get_preference_delegate _d5; + + public static cef_value_t* get_preference(cef_preference_manager_t* self, cef_string_t* name) + { + get_preference_delegate d; + var p = self->_get_preference; + if (p == _p5) { d = _d5; } + else + { + d = (get_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_preference_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + return d(self, name); + } + + // GetAllPreferences + private static IntPtr _p6; + private static get_all_preferences_delegate _d6; + + public static cef_dictionary_value_t* get_all_preferences(cef_preference_manager_t* self, int include_defaults) + { + get_all_preferences_delegate d; + var p = self->_get_all_preferences; + if (p == _p6) { d = _d6; } + else + { + d = (get_all_preferences_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_all_preferences_delegate)); + if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } + } + return d(self, include_defaults); + } + + // CanSetPreference + private static IntPtr _p7; + private static can_set_preference_delegate _d7; + + public static int can_set_preference(cef_preference_manager_t* self, cef_string_t* name) + { + can_set_preference_delegate d; + var p = self->_can_set_preference; + if (p == _p7) { d = _d7; } + else + { + d = (can_set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_set_preference_delegate)); + if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } + } + return d(self, name); + } + + // SetPreference + private static IntPtr _p8; + private static set_preference_delegate _d8; + + public static int set_preference(cef_preference_manager_t* self, cef_string_t* name, cef_value_t* value, cef_string_t* error) + { + set_preference_delegate d; + var p = self->_set_preference; + if (p == _p8) { d = _d8; } + else + { + d = (set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_preference_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + return d(self, name, value, error); + } + + // IsSame + private static IntPtr _p9; + private static is_same_delegate _d9; + + public static int is_same(cef_request_context_t* self, cef_request_context_t* other) + { + is_same_delegate d; + var p = self->_is_same; + if (p == _p9) { d = _d9; } + else + { + d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + return d(self, other); + } + + // IsSharingWith + private static IntPtr _pa; + private static is_sharing_with_delegate _da; + + public static int is_sharing_with(cef_request_context_t* self, cef_request_context_t* other) + { + is_sharing_with_delegate d; + var p = self->_is_sharing_with; + if (p == _pa) { d = _da; } + else + { + d = (is_sharing_with_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_sharing_with_delegate)); + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + } + return d(self, other); + } + + // IsGlobal + private static IntPtr _pb; + private static is_global_delegate _db; + + public static int is_global(cef_request_context_t* self) + { + is_global_delegate d; + var p = self->_is_global; + if (p == _pb) { d = _db; } + else + { + d = (is_global_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_global_delegate)); + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } + } + return d(self); + } + + // GetHandler + private static IntPtr _pc; + private static get_handler_delegate _dc; + + public static cef_request_context_handler_t* get_handler(cef_request_context_t* self) + { + get_handler_delegate d; + var p = self->_get_handler; + if (p == _pc) { d = _dc; } + else + { + d = (get_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_handler_delegate)); + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } + } + return d(self); + } + + // GetCachePath + private static IntPtr _pd; + private static get_cache_path_delegate _dd; + + public static cef_string_userfree* get_cache_path(cef_request_context_t* self) + { + get_cache_path_delegate d; + var p = self->_get_cache_path; + if (p == _pd) { d = _dd; } + else + { + d = (get_cache_path_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_cache_path_delegate)); + if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } + } + return d(self); + } + + // GetCookieManager + private static IntPtr _pe; + private static get_cookie_manager_delegate _de; + + public static cef_cookie_manager_t* get_cookie_manager(cef_request_context_t* self, cef_completion_callback_t* callback) + { + get_cookie_manager_delegate d; + var p = self->_get_cookie_manager; + if (p == _pe) { d = _de; } + else + { + d = (get_cookie_manager_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_cookie_manager_delegate)); + if (_pe == IntPtr.Zero) { _de = d; _pe = p; } + } + return d(self, callback); + } + + // RegisterSchemeHandlerFactory + private static IntPtr _pf; + private static register_scheme_handler_factory_delegate _df; + + public static int register_scheme_handler_factory(cef_request_context_t* self, cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory) + { + register_scheme_handler_factory_delegate d; + var p = self->_register_scheme_handler_factory; + if (p == _pf) { d = _df; } + else + { + d = (register_scheme_handler_factory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(register_scheme_handler_factory_delegate)); + if (_pf == IntPtr.Zero) { _df = d; _pf = p; } + } + return d(self, scheme_name, domain_name, factory); + } + + // ClearSchemeHandlerFactories + private static IntPtr _p10; + private static clear_scheme_handler_factories_delegate _d10; + + public static int clear_scheme_handler_factories(cef_request_context_t* self) + { + clear_scheme_handler_factories_delegate d; + var p = self->_clear_scheme_handler_factories; + if (p == _p10) { d = _d10; } + else + { + d = (clear_scheme_handler_factories_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_scheme_handler_factories_delegate)); + if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } + } + return d(self); + } + + // ClearCertificateExceptions + private static IntPtr _p11; + private static clear_certificate_exceptions_delegate _d11; + + public static void clear_certificate_exceptions(cef_request_context_t* self, cef_completion_callback_t* callback) + { + clear_certificate_exceptions_delegate d; + var p = self->_clear_certificate_exceptions; + if (p == _p11) { d = _d11; } + else + { + d = (clear_certificate_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_certificate_exceptions_delegate)); + if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } + } + d(self, callback); + } + + // ClearHttpAuthCredentials + private static IntPtr _p12; + private static clear_http_auth_credentials_delegate _d12; + + public static void clear_http_auth_credentials(cef_request_context_t* self, cef_completion_callback_t* callback) + { + clear_http_auth_credentials_delegate d; + var p = self->_clear_http_auth_credentials; + if (p == _p12) { d = _d12; } + else + { + d = (clear_http_auth_credentials_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_http_auth_credentials_delegate)); + if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } + } + d(self, callback); + } + + // CloseAllConnections + private static IntPtr _p13; + private static close_all_connections_delegate _d13; + + public static void close_all_connections(cef_request_context_t* self, cef_completion_callback_t* callback) + { + close_all_connections_delegate d; + var p = self->_close_all_connections; + if (p == _p13) { d = _d13; } + else + { + d = (close_all_connections_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_all_connections_delegate)); + if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } + } + d(self, callback); + } + + // ResolveHost + private static IntPtr _p14; + private static resolve_host_delegate _d14; + + public static void resolve_host(cef_request_context_t* self, cef_string_t* origin, cef_resolve_callback_t* callback) + { + resolve_host_delegate d; + var p = self->_resolve_host; + if (p == _p14) { d = _d14; } + else + { + d = (resolve_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_host_delegate)); + if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } + } + d(self, origin, callback); + } + + // LoadExtension + private static IntPtr _p15; + private static load_extension_delegate _d15; + + public static void load_extension(cef_request_context_t* self, cef_string_t* root_directory, cef_dictionary_value_t* manifest, cef_extension_handler_t* handler) + { + load_extension_delegate d; + var p = self->_load_extension; + if (p == _p15) { d = _d15; } + else + { + d = (load_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(load_extension_delegate)); + if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } + } + d(self, root_directory, manifest, handler); + } + + // DidLoadExtension + private static IntPtr _p16; + private static did_load_extension_delegate _d16; + + public static int did_load_extension(cef_request_context_t* self, cef_string_t* extension_id) + { + did_load_extension_delegate d; + var p = self->_did_load_extension; + if (p == _p16) { d = _d16; } + else + { + d = (did_load_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(did_load_extension_delegate)); + if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } + } + return d(self, extension_id); + } + + // HasExtension + private static IntPtr _p17; + private static has_extension_delegate _d17; + + public static int has_extension(cef_request_context_t* self, cef_string_t* extension_id) + { + has_extension_delegate d; + var p = self->_has_extension; + if (p == _p17) { d = _d17; } + else + { + d = (has_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_extension_delegate)); + if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } + } + return d(self, extension_id); + } + + // GetExtensions + private static IntPtr _p18; + private static get_extensions_delegate _d18; + + public static int get_extensions(cef_request_context_t* self, cef_string_list* extension_ids) + { + get_extensions_delegate d; + var p = self->_get_extensions; + if (p == _p18) { d = _d18; } + else + { + d = (get_extensions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extensions_delegate)); + if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } + } + return d(self, extension_ids); + } + + // GetExtension + private static IntPtr _p19; + private static get_extension_delegate _d19; + + public static cef_extension_t* get_extension(cef_request_context_t* self, cef_string_t* extension_id) + { + get_extension_delegate d; + var p = self->_get_extension; + if (p == _p19) { d = _d19; } + else + { + d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate)); + if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + } + return d(self, extension_id); + } + + // GetMediaRouter + private static IntPtr _p1a; + private static get_media_router_delegate _d1a; + + public static cef_media_router_t* get_media_router(cef_request_context_t* self, cef_completion_callback_t* callback) + { + get_media_router_delegate d; + var p = self->_get_media_router; + if (p == _p1a) { d = _d1a; } + else + { + d = (get_media_router_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_media_router_delegate)); + if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + } + return d(self, callback); + } + + // GetWebsiteSetting + private static IntPtr _p1b; + private static get_website_setting_delegate _d1b; + + public static cef_value_t* get_website_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type) + { + get_website_setting_delegate d; + var p = self->_get_website_setting; + if (p == _p1b) { d = _d1b; } + else + { + d = (get_website_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_website_setting_delegate)); + if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + } + return d(self, requesting_url, top_level_url, content_type); + } + + // SetWebsiteSetting + private static IntPtr _p1c; + private static set_website_setting_delegate _d1c; + + public static void set_website_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, cef_value_t* value) + { + set_website_setting_delegate d; + var p = self->_set_website_setting; + if (p == _p1c) { d = _d1c; } + else + { + d = (set_website_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_website_setting_delegate)); + if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } + } + d(self, requesting_url, top_level_url, content_type, value); + } + + // GetContentSetting + private static IntPtr _p1d; + private static get_content_setting_delegate _d1d; + + public static CefContentSettingValue get_content_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type) + { + get_content_setting_delegate d; + var p = self->_get_content_setting; + if (p == _p1d) { d = _d1d; } + else + { + d = (get_content_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_content_setting_delegate)); + if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } + } + return d(self, requesting_url, top_level_url, content_type); + } + + // SetContentSetting + private static IntPtr _p1e; + private static set_content_setting_delegate _d1e; + + public static void set_content_setting(cef_request_context_t* self, cef_string_t* requesting_url, cef_string_t* top_level_url, CefContentSettingType content_type, CefContentSettingValue value) + { + set_content_setting_delegate d; + var p = self->_set_content_setting; + if (p == _p1e) { d = _d1e; } + else + { + d = (set_content_setting_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_content_setting_delegate)); + if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } + } + d(self, requesting_url, top_level_url, content_type, value); + } + + // SetChromeColorScheme + private static IntPtr _p1f; + private static set_chrome_color_scheme_delegate _d1f; + + public static void set_chrome_color_scheme(cef_request_context_t* self, CefColorVariant variant, uint user_color) + { + set_chrome_color_scheme_delegate d; + var p = self->_set_chrome_color_scheme; + if (p == _p1f) { d = _d1f; } + else + { + d = (set_chrome_color_scheme_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_chrome_color_scheme_delegate)); + if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } + } + d(self, variant, user_color); + } + + // GetChromeColorSchemeMode + private static IntPtr _p20; + private static get_chrome_color_scheme_mode_delegate _d20; + + public static CefColorVariant get_chrome_color_scheme_mode(cef_request_context_t* self) + { + get_chrome_color_scheme_mode_delegate d; + var p = self->_get_chrome_color_scheme_mode; + if (p == _p20) { d = _d20; } + else + { + d = (get_chrome_color_scheme_mode_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_chrome_color_scheme_mode_delegate)); + if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } + } + return d(self); + } + + // GetChromeColorSchemeColor + private static IntPtr _p21; + private static get_chrome_color_scheme_color_delegate _d21; + + public static uint get_chrome_color_scheme_color(cef_request_context_t* self) + { + get_chrome_color_scheme_color_delegate d; + var p = self->_get_chrome_color_scheme_color; + if (p == _p21) { d = _d21; } + else + { + d = (get_chrome_color_scheme_color_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_chrome_color_scheme_color_delegate)); + if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } + } + return d(self); + } + + // GetChromeColorSchemeVariant + private static IntPtr _p22; + private static get_chrome_color_scheme_variant_delegate _d22; + + public static CefColorVariant get_chrome_color_scheme_variant(cef_request_context_t* self) + { + get_chrome_color_scheme_variant_delegate d; + var p = self->_get_chrome_color_scheme_variant; + if (p == _p22) { d = _d22; } + else + { + d = (get_chrome_color_scheme_variant_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_chrome_color_scheme_variant_delegate)); + if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } + } + return d(self); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs b/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs index c1a41e9b..fa4a49f1 100644 --- a/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs @@ -1,125 +1,139 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_request_handler_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _on_before_browse; - internal IntPtr _on_open_urlfrom_tab; - internal IntPtr _get_resource_request_handler; - internal IntPtr _get_auth_credentials; - internal IntPtr _on_certificate_error; - internal IntPtr _on_select_client_certificate; - internal IntPtr _on_render_view_ready; - internal IntPtr _on_render_process_terminated; - internal IntPtr _on_document_available_in_main_frame; - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void add_ref_delegate(cef_request_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int release_delegate(cef_request_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_one_ref_delegate(cef_request_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int has_at_least_one_ref_delegate(cef_request_handler_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_before_browse_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_request_t* request, int user_gesture, int is_redirect); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_open_urlfrom_tab_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_string_t* target_url, CefWindowOpenDisposition target_disposition, int user_gesture); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate cef_resource_request_handler_t* get_resource_request_handler_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_request_t* request, int is_navigation, int is_download, cef_string_t* request_initiator, int* disable_default_handling); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int get_auth_credentials_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_string_t* origin_url, int isProxy, cef_string_t* host, int port, cef_string_t* realm, cef_string_t* scheme, cef_auth_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_certificate_error_delegate(cef_request_handler_t* self, cef_browser_t* browser, CefErrorCode cert_error, cef_string_t* request_url, cef_sslinfo_t* ssl_info, cef_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate int on_select_client_certificate_delegate(cef_request_handler_t* self, cef_browser_t* browser, int isProxy, cef_string_t* host, int port, UIntPtr certificatesCount, cef_x509certificate_t** certificates, cef_select_client_certificate_callback_t* callback); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_render_view_ready_delegate(cef_request_handler_t* self, cef_browser_t* browser); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_render_process_terminated_delegate(cef_request_handler_t* self, cef_browser_t* browser, CefTerminationStatus status); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - internal delegate void on_document_available_in_main_frame_delegate(cef_request_handler_t* self, cef_browser_t* browser); - - private static int _sizeof; - - static cef_request_handler_t() - { - _sizeof = Marshal.SizeOf(typeof(cef_request_handler_t)); - } - - internal static cef_request_handler_t* Alloc() - { - var ptr = (cef_request_handler_t*)Marshal.AllocHGlobal(_sizeof); - *ptr = new cef_request_handler_t(); - ptr->_base._size = (UIntPtr)_sizeof; - return ptr; - } - - internal static void Free(cef_request_handler_t* ptr) - { - Marshal.FreeHGlobal((IntPtr)ptr); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_request_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _on_before_browse; + internal IntPtr _on_open_urlfrom_tab; + internal IntPtr _get_resource_request_handler; + internal IntPtr _get_auth_credentials; + internal IntPtr _on_certificate_error; + internal IntPtr _on_select_client_certificate; + internal IntPtr _on_render_view_ready; + internal IntPtr _on_render_process_unresponsive; + internal IntPtr _on_render_process_responsive; + internal IntPtr _on_render_process_terminated; + internal IntPtr _on_document_available_in_main_frame; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_request_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_request_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_request_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_request_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_before_browse_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_request_t* request, int user_gesture, int is_redirect); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_open_urlfrom_tab_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_string_t* target_url, CefWindowOpenDisposition target_disposition, int user_gesture); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate cef_resource_request_handler_t* get_resource_request_handler_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_request_t* request, int is_navigation, int is_download, cef_string_t* request_initiator, int* disable_default_handling); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int get_auth_credentials_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_string_t* origin_url, int isProxy, cef_string_t* host, int port, cef_string_t* realm, cef_string_t* scheme, cef_auth_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_certificate_error_delegate(cef_request_handler_t* self, cef_browser_t* browser, CefErrorCode cert_error, cef_string_t* request_url, cef_sslinfo_t* ssl_info, cef_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_select_client_certificate_delegate(cef_request_handler_t* self, cef_browser_t* browser, int isProxy, cef_string_t* host, int port, UIntPtr certificatesCount, cef_x509certificate_t** certificates, cef_select_client_certificate_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_render_view_ready_delegate(cef_request_handler_t* self, cef_browser_t* browser); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_render_process_unresponsive_delegate(cef_request_handler_t* self, cef_browser_t* browser, cef_unresponsive_process_callback_t* callback); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_render_process_responsive_delegate(cef_request_handler_t* self, cef_browser_t* browser); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_render_process_terminated_delegate(cef_request_handler_t* self, cef_browser_t* browser, CefTerminationStatus status, int error_code, cef_string_t* error_string); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_document_available_in_main_frame_delegate(cef_request_handler_t* self, cef_browser_t* browser); + + private static int _sizeof; + + static cef_request_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_request_handler_t)); + } + + internal static cef_request_handler_t* Alloc() + { + var ptr = (cef_request_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_request_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_request_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_unresponsive_process_callback_t.g.cs b/CefGlue/Interop/Classes.g/cef_unresponsive_process_callback_t.g.cs new file mode 100644 index 00000000..a5283fe4 --- /dev/null +++ b/CefGlue/Interop/Classes.g/cef_unresponsive_process_callback_t.g.cs @@ -0,0 +1,158 @@ +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_unresponsive_process_callback_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _wait; + internal IntPtr _terminate; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_unresponsive_process_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_unresponsive_process_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_unresponsive_process_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_unresponsive_process_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void wait_delegate(cef_unresponsive_process_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void terminate_delegate(cef_unresponsive_process_callback_t* self); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_unresponsive_process_callback_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_unresponsive_process_callback_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_unresponsive_process_callback_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_unresponsive_process_callback_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // Wait + private static IntPtr _p4; + private static wait_delegate _d4; + + public static void wait(cef_unresponsive_process_callback_t* self) + { + wait_delegate d; + var p = self->_wait; + if (p == _p4) { d = _d4; } + else + { + d = (wait_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(wait_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + d(self); + } + + // Terminate + private static IntPtr _p5; + private static terminate_delegate _d5; + + public static void terminate(cef_unresponsive_process_callback_t* self) + { + terminate_delegate d; + var p = self->_terminate; + if (p == _p5) { d = _d5; } + else + { + d = (terminate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(terminate_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + d(self); + } + + } +} diff --git a/CefGlue/Interop/Classes.g/cef_v8value_t.g.cs b/CefGlue/Interop/Classes.g/cef_v8value_t.g.cs index df0a124a..6b83e864 100644 --- a/CefGlue/Interop/Classes.g/cef_v8value_t.g.cs +++ b/CefGlue/Interop/Classes.g/cef_v8value_t.g.cs @@ -1,1410 +1,1410 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Runtime.InteropServices; - using System.Security; - - [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] - [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] - internal unsafe struct cef_v8value_t - { - internal cef_base_ref_counted_t _base; - internal IntPtr _is_valid; - internal IntPtr _is_undefined; - internal IntPtr _is_null; - internal IntPtr _is_bool; - internal IntPtr _is_int; - internal IntPtr _is_uint; - internal IntPtr _is_double; - internal IntPtr _is_date; - internal IntPtr _is_string; - internal IntPtr _is_object; - internal IntPtr _is_array; - internal IntPtr _is_array_buffer; - internal IntPtr _is_function; - internal IntPtr _is_promise; - internal IntPtr _is_same; - internal IntPtr _get_bool_value; - internal IntPtr _get_int_value; - internal IntPtr _get_uint_value; - internal IntPtr _get_double_value; - internal IntPtr _get_date_value; - internal IntPtr _get_string_value; - internal IntPtr _is_user_created; - internal IntPtr _has_exception; - internal IntPtr _get_exception; - internal IntPtr _clear_exception; - internal IntPtr _will_rethrow_exceptions; - internal IntPtr _set_rethrow_exceptions; - internal IntPtr _has_value_bykey; - internal IntPtr _has_value_byindex; - internal IntPtr _delete_value_bykey; - internal IntPtr _delete_value_byindex; - internal IntPtr _get_value_bykey; - internal IntPtr _get_value_byindex; - internal IntPtr _set_value_bykey; - internal IntPtr _set_value_byindex; - internal IntPtr _set_value_byaccessor; - internal IntPtr _get_keys; - internal IntPtr _set_user_data; - internal IntPtr _get_user_data; - internal IntPtr _get_externally_allocated_memory; - internal IntPtr _adjust_externally_allocated_memory; - internal IntPtr _get_array_length; - internal IntPtr _get_array_buffer_release_callback; - internal IntPtr _neuter_array_buffer; - internal IntPtr _get_array_buffer_byte_length; - internal IntPtr _get_array_buffer_data; - internal IntPtr _get_function_name; - internal IntPtr _get_function_handler; - internal IntPtr _execute_function; - internal IntPtr _execute_function_with_context; - internal IntPtr _resolve_promise; - internal IntPtr _reject_promise; - - // CreateUndefined - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_undefined", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_undefined(); - - // CreateNull - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_null", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_null(); - - // CreateBool - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_bool", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_bool(int value); - - // CreateInt - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_int", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_int(int value); - - // CreateUInt - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_uint", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_uint(uint value); - - // CreateDouble - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_double", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_double(double value); - - // CreateDate - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_date", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_date(CefBaseTime date); - - // CreateString - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_string", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_string(cef_string_t* value); - - // CreateObject - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_object", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_object(cef_v8accessor_t* accessor, cef_v8interceptor_t* interceptor); - - // CreateArray - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_array", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_array(int length); - - // CreateArrayBuffer - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_array_buffer", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_array_buffer(void* buffer, UIntPtr length, cef_v8array_buffer_release_callback_t* release_callback); - - // CreateFunction - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_function", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_function(cef_string_t* name, cef_v8handler_t* handler); - - // CreatePromise - [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_promise", CallingConvention = libcef.CEF_CALL)] - public static extern cef_v8value_t* create_promise(); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void add_ref_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int release_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_one_ref_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_at_least_one_ref_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_valid_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_undefined_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_null_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_bool_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_int_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_uint_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_double_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_date_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_string_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_object_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_array_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_array_buffer_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_function_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_promise_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_same_delegate(cef_v8value_t* self, cef_v8value_t* that); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_bool_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_int_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate uint get_uint_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate double get_double_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate CefBaseTime get_date_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_string_userfree* get_string_value_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int is_user_created_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_exception_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8exception_t* get_exception_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int clear_exception_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int will_rethrow_exceptions_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_rethrow_exceptions_delegate(cef_v8value_t* self, int rethrow); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int has_value_byindex_delegate(cef_v8value_t* self, int index); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int delete_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int delete_value_byindex_delegate(cef_v8value_t* self, int index); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8value_t* get_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8value_t* get_value_byindex_delegate(cef_v8value_t* self, int index); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key, cef_v8value_t* value, CefV8PropertyAttribute attribute); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_value_byindex_delegate(cef_v8value_t* self, int index, cef_v8value_t* value); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_value_byaccessor_delegate(cef_v8value_t* self, cef_string_t* key, CefV8AccessControl settings, CefV8PropertyAttribute attribute); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_keys_delegate(cef_v8value_t* self, cef_string_list* keys); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int set_user_data_delegate(cef_v8value_t* self, cef_base_ref_counted_t* user_data); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_base_ref_counted_t* get_user_data_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_externally_allocated_memory_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int adjust_externally_allocated_memory_delegate(cef_v8value_t* self, int change_in_bytes); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int get_array_length_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8array_buffer_release_callback_t* get_array_buffer_release_callback_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int neuter_array_buffer_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate UIntPtr get_array_buffer_byte_length_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate void* get_array_buffer_data_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_string_userfree* get_function_name_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8handler_t* get_function_handler_delegate(cef_v8value_t* self); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8value_t* execute_function_delegate(cef_v8value_t* self, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate cef_v8value_t* execute_function_with_context_delegate(cef_v8value_t* self, cef_v8context_t* context, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int resolve_promise_delegate(cef_v8value_t* self, cef_v8value_t* arg); - - [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] - #if !DEBUG - [SuppressUnmanagedCodeSecurity] - #endif - private delegate int reject_promise_delegate(cef_v8value_t* self, cef_string_t* errorMsg); - - // AddRef - private static IntPtr _p0; - private static add_ref_delegate _d0; - - public static void add_ref(cef_v8value_t* self) - { - add_ref_delegate d; - var p = self->_base._add_ref; - if (p == _p0) { d = _d0; } - else - { - d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); - if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } - } - d(self); - } - - // Release - private static IntPtr _p1; - private static release_delegate _d1; - - public static int release(cef_v8value_t* self) - { - release_delegate d; - var p = self->_base._release; - if (p == _p1) { d = _d1; } - else - { - d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); - if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } - } - return d(self); - } - - // HasOneRef - private static IntPtr _p2; - private static has_one_ref_delegate _d2; - - public static int has_one_ref(cef_v8value_t* self) - { - has_one_ref_delegate d; - var p = self->_base._has_one_ref; - if (p == _p2) { d = _d2; } - else - { - d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); - if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } - } - return d(self); - } - - // HasAtLeastOneRef - private static IntPtr _p3; - private static has_at_least_one_ref_delegate _d3; - - public static int has_at_least_one_ref(cef_v8value_t* self) - { - has_at_least_one_ref_delegate d; - var p = self->_base._has_at_least_one_ref; - if (p == _p3) { d = _d3; } - else - { - d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); - if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } - } - return d(self); - } - - // IsValid - private static IntPtr _p4; - private static is_valid_delegate _d4; - - public static int is_valid(cef_v8value_t* self) - { - is_valid_delegate d; - var p = self->_is_valid; - if (p == _p4) { d = _d4; } - else - { - d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); - if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } - } - return d(self); - } - - // IsUndefined - private static IntPtr _p5; - private static is_undefined_delegate _d5; - - public static int is_undefined(cef_v8value_t* self) - { - is_undefined_delegate d; - var p = self->_is_undefined; - if (p == _p5) { d = _d5; } - else - { - d = (is_undefined_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_undefined_delegate)); - if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } - } - return d(self); - } - - // IsNull - private static IntPtr _p6; - private static is_null_delegate _d6; - - public static int is_null(cef_v8value_t* self) - { - is_null_delegate d; - var p = self->_is_null; - if (p == _p6) { d = _d6; } - else - { - d = (is_null_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_null_delegate)); - if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } - } - return d(self); - } - - // IsBool - private static IntPtr _p7; - private static is_bool_delegate _d7; - - public static int is_bool(cef_v8value_t* self) - { - is_bool_delegate d; - var p = self->_is_bool; - if (p == _p7) { d = _d7; } - else - { - d = (is_bool_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_bool_delegate)); - if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } - } - return d(self); - } - - // IsInt - private static IntPtr _p8; - private static is_int_delegate _d8; - - public static int is_int(cef_v8value_t* self) - { - is_int_delegate d; - var p = self->_is_int; - if (p == _p8) { d = _d8; } - else - { - d = (is_int_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_int_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } - } - return d(self); - } - - // IsUInt - private static IntPtr _p9; - private static is_uint_delegate _d9; - - public static int is_uint(cef_v8value_t* self) - { - is_uint_delegate d; - var p = self->_is_uint; - if (p == _p9) { d = _d9; } - else - { - d = (is_uint_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_uint_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } - } - return d(self); - } - - // IsDouble - private static IntPtr _pa; - private static is_double_delegate _da; - - public static int is_double(cef_v8value_t* self) - { - is_double_delegate d; - var p = self->_is_double; - if (p == _pa) { d = _da; } - else - { - d = (is_double_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_double_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } - } - return d(self); - } - - // IsDate - private static IntPtr _pb; - private static is_date_delegate _db; - - public static int is_date(cef_v8value_t* self) - { - is_date_delegate d; - var p = self->_is_date; - if (p == _pb) { d = _db; } - else - { - d = (is_date_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_date_delegate)); - if (_pb == IntPtr.Zero) { _db = d; _pb = p; } - } - return d(self); - } - - // IsString - private static IntPtr _pc; - private static is_string_delegate _dc; - - public static int is_string(cef_v8value_t* self) - { - is_string_delegate d; - var p = self->_is_string; - if (p == _pc) { d = _dc; } - else - { - d = (is_string_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_string_delegate)); - if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } - } - return d(self); - } - - // IsObject - private static IntPtr _pd; - private static is_object_delegate _dd; - - public static int is_object(cef_v8value_t* self) - { - is_object_delegate d; - var p = self->_is_object; - if (p == _pd) { d = _dd; } - else - { - d = (is_object_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_object_delegate)); - if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } - } - return d(self); - } - - // IsArray - private static IntPtr _pe; - private static is_array_delegate _de; - - public static int is_array(cef_v8value_t* self) - { - is_array_delegate d; - var p = self->_is_array; - if (p == _pe) { d = _de; } - else - { - d = (is_array_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_array_delegate)); - if (_pe == IntPtr.Zero) { _de = d; _pe = p; } - } - return d(self); - } - - // IsArrayBuffer - private static IntPtr _pf; - private static is_array_buffer_delegate _df; - - public static int is_array_buffer(cef_v8value_t* self) - { - is_array_buffer_delegate d; - var p = self->_is_array_buffer; - if (p == _pf) { d = _df; } - else - { - d = (is_array_buffer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_array_buffer_delegate)); - if (_pf == IntPtr.Zero) { _df = d; _pf = p; } - } - return d(self); - } - - // IsFunction - private static IntPtr _p10; - private static is_function_delegate _d10; - - public static int is_function(cef_v8value_t* self) - { - is_function_delegate d; - var p = self->_is_function; - if (p == _p10) { d = _d10; } - else - { - d = (is_function_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_function_delegate)); - if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } - } - return d(self); - } - - // IsPromise - private static IntPtr _p11; - private static is_promise_delegate _d11; - - public static int is_promise(cef_v8value_t* self) - { - is_promise_delegate d; - var p = self->_is_promise; - if (p == _p11) { d = _d11; } - else - { - d = (is_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_promise_delegate)); - if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } - } - return d(self); - } - - // IsSame - private static IntPtr _p12; - private static is_same_delegate _d12; - - public static int is_same(cef_v8value_t* self, cef_v8value_t* that) - { - is_same_delegate d; - var p = self->_is_same; - if (p == _p12) { d = _d12; } - else - { - d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); - if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } - } - return d(self, that); - } - - // GetBoolValue - private static IntPtr _p13; - private static get_bool_value_delegate _d13; - - public static int get_bool_value(cef_v8value_t* self) - { - get_bool_value_delegate d; - var p = self->_get_bool_value; - if (p == _p13) { d = _d13; } - else - { - d = (get_bool_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_bool_value_delegate)); - if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } - } - return d(self); - } - - // GetIntValue - private static IntPtr _p14; - private static get_int_value_delegate _d14; - - public static int get_int_value(cef_v8value_t* self) - { - get_int_value_delegate d; - var p = self->_get_int_value; - if (p == _p14) { d = _d14; } - else - { - d = (get_int_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_int_value_delegate)); - if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } - } - return d(self); - } - - // GetUIntValue - private static IntPtr _p15; - private static get_uint_value_delegate _d15; - - public static uint get_uint_value(cef_v8value_t* self) - { - get_uint_value_delegate d; - var p = self->_get_uint_value; - if (p == _p15) { d = _d15; } - else - { - d = (get_uint_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_uint_value_delegate)); - if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } - } - return d(self); - } - - // GetDoubleValue - private static IntPtr _p16; - private static get_double_value_delegate _d16; - - public static double get_double_value(cef_v8value_t* self) - { - get_double_value_delegate d; - var p = self->_get_double_value; - if (p == _p16) { d = _d16; } - else - { - d = (get_double_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_double_value_delegate)); - if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } - } - return d(self); - } - - // GetDateValue - private static IntPtr _p17; - private static get_date_value_delegate _d17; - - public static CefBaseTime get_date_value(cef_v8value_t* self) - { - get_date_value_delegate d; - var p = self->_get_date_value; - if (p == _p17) { d = _d17; } - else - { - d = (get_date_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_date_value_delegate)); - if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } - } - return d(self); - } - - // GetStringValue - private static IntPtr _p18; - private static get_string_value_delegate _d18; - - public static cef_string_userfree* get_string_value(cef_v8value_t* self) - { - get_string_value_delegate d; - var p = self->_get_string_value; - if (p == _p18) { d = _d18; } - else - { - d = (get_string_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_string_value_delegate)); - if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } - } - return d(self); - } - - // IsUserCreated - private static IntPtr _p19; - private static is_user_created_delegate _d19; - - public static int is_user_created(cef_v8value_t* self) - { - is_user_created_delegate d; - var p = self->_is_user_created; - if (p == _p19) { d = _d19; } - else - { - d = (is_user_created_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_user_created_delegate)); - if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } - } - return d(self); - } - - // HasException - private static IntPtr _p1a; - private static has_exception_delegate _d1a; - - public static int has_exception(cef_v8value_t* self) - { - has_exception_delegate d; - var p = self->_has_exception; - if (p == _p1a) { d = _d1a; } - else - { - d = (has_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_exception_delegate)); - if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } - } - return d(self); - } - - // GetException - private static IntPtr _p1b; - private static get_exception_delegate _d1b; - - public static cef_v8exception_t* get_exception(cef_v8value_t* self) - { - get_exception_delegate d; - var p = self->_get_exception; - if (p == _p1b) { d = _d1b; } - else - { - d = (get_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_exception_delegate)); - if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } - } - return d(self); - } - - // ClearException - private static IntPtr _p1c; - private static clear_exception_delegate _d1c; - - public static int clear_exception(cef_v8value_t* self) - { - clear_exception_delegate d; - var p = self->_clear_exception; - if (p == _p1c) { d = _d1c; } - else - { - d = (clear_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_exception_delegate)); - if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } - } - return d(self); - } - - // WillRethrowExceptions - private static IntPtr _p1d; - private static will_rethrow_exceptions_delegate _d1d; - - public static int will_rethrow_exceptions(cef_v8value_t* self) - { - will_rethrow_exceptions_delegate d; - var p = self->_will_rethrow_exceptions; - if (p == _p1d) { d = _d1d; } - else - { - d = (will_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(will_rethrow_exceptions_delegate)); - if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } - } - return d(self); - } - - // SetRethrowExceptions - private static IntPtr _p1e; - private static set_rethrow_exceptions_delegate _d1e; - - public static int set_rethrow_exceptions(cef_v8value_t* self, int rethrow) - { - set_rethrow_exceptions_delegate d; - var p = self->_set_rethrow_exceptions; - if (p == _p1e) { d = _d1e; } - else - { - d = (set_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_rethrow_exceptions_delegate)); - if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } - } - return d(self, rethrow); - } - - // HasValue - private static IntPtr _p1f; - private static has_value_bykey_delegate _d1f; - - public static int has_value_bykey(cef_v8value_t* self, cef_string_t* key) - { - has_value_bykey_delegate d; - var p = self->_has_value_bykey; - if (p == _p1f) { d = _d1f; } - else - { - d = (has_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_value_bykey_delegate)); - if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } - } - return d(self, key); - } - - // HasValue - private static IntPtr _p20; - private static has_value_byindex_delegate _d20; - - public static int has_value_byindex(cef_v8value_t* self, int index) - { - has_value_byindex_delegate d; - var p = self->_has_value_byindex; - if (p == _p20) { d = _d20; } - else - { - d = (has_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_value_byindex_delegate)); - if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } - } - return d(self, index); - } - - // DeleteValue - private static IntPtr _p21; - private static delete_value_bykey_delegate _d21; - - public static int delete_value_bykey(cef_v8value_t* self, cef_string_t* key) - { - delete_value_bykey_delegate d; - var p = self->_delete_value_bykey; - if (p == _p21) { d = _d21; } - else - { - d = (delete_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_bykey_delegate)); - if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } - } - return d(self, key); - } - - // DeleteValue - private static IntPtr _p22; - private static delete_value_byindex_delegate _d22; - - public static int delete_value_byindex(cef_v8value_t* self, int index) - { - delete_value_byindex_delegate d; - var p = self->_delete_value_byindex; - if (p == _p22) { d = _d22; } - else - { - d = (delete_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_byindex_delegate)); - if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } - } - return d(self, index); - } - - // GetValue - private static IntPtr _p23; - private static get_value_bykey_delegate _d23; - - public static cef_v8value_t* get_value_bykey(cef_v8value_t* self, cef_string_t* key) - { - get_value_bykey_delegate d; - var p = self->_get_value_bykey; - if (p == _p23) { d = _d23; } - else - { - d = (get_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_bykey_delegate)); - if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } - } - return d(self, key); - } - - // GetValue - private static IntPtr _p24; - private static get_value_byindex_delegate _d24; - - public static cef_v8value_t* get_value_byindex(cef_v8value_t* self, int index) - { - get_value_byindex_delegate d; - var p = self->_get_value_byindex; - if (p == _p24) { d = _d24; } - else - { - d = (get_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_byindex_delegate)); - if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } - } - return d(self, index); - } - - // SetValue - private static IntPtr _p25; - private static set_value_bykey_delegate _d25; - - public static int set_value_bykey(cef_v8value_t* self, cef_string_t* key, cef_v8value_t* value, CefV8PropertyAttribute attribute) - { - set_value_bykey_delegate d; - var p = self->_set_value_bykey; - if (p == _p25) { d = _d25; } - else - { - d = (set_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_bykey_delegate)); - if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } - } - return d(self, key, value, attribute); - } - - // SetValue - private static IntPtr _p26; - private static set_value_byindex_delegate _d26; - - public static int set_value_byindex(cef_v8value_t* self, int index, cef_v8value_t* value) - { - set_value_byindex_delegate d; - var p = self->_set_value_byindex; - if (p == _p26) { d = _d26; } - else - { - d = (set_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byindex_delegate)); - if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } - } - return d(self, index, value); - } - - // SetValue - private static IntPtr _p27; - private static set_value_byaccessor_delegate _d27; - - public static int set_value_byaccessor(cef_v8value_t* self, cef_string_t* key, CefV8AccessControl settings, CefV8PropertyAttribute attribute) - { - set_value_byaccessor_delegate d; - var p = self->_set_value_byaccessor; - if (p == _p27) { d = _d27; } - else - { - d = (set_value_byaccessor_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byaccessor_delegate)); - if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } - } - return d(self, key, settings, attribute); - } - - // GetKeys - private static IntPtr _p28; - private static get_keys_delegate _d28; - - public static int get_keys(cef_v8value_t* self, cef_string_list* keys) - { - get_keys_delegate d; - var p = self->_get_keys; - if (p == _p28) { d = _d28; } - else - { - d = (get_keys_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_keys_delegate)); - if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } - } - return d(self, keys); - } - - // SetUserData - private static IntPtr _p29; - private static set_user_data_delegate _d29; - - public static int set_user_data(cef_v8value_t* self, cef_base_ref_counted_t* user_data) - { - set_user_data_delegate d; - var p = self->_set_user_data; - if (p == _p29) { d = _d29; } - else - { - d = (set_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_user_data_delegate)); - if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } - } - return d(self, user_data); - } - - // GetUserData - private static IntPtr _p2a; - private static get_user_data_delegate _d2a; - - public static cef_base_ref_counted_t* get_user_data(cef_v8value_t* self) - { - get_user_data_delegate d; - var p = self->_get_user_data; - if (p == _p2a) { d = _d2a; } - else - { - d = (get_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_user_data_delegate)); - if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } - } - return d(self); - } - - // GetExternallyAllocatedMemory - private static IntPtr _p2b; - private static get_externally_allocated_memory_delegate _d2b; - - public static int get_externally_allocated_memory(cef_v8value_t* self) - { - get_externally_allocated_memory_delegate d; - var p = self->_get_externally_allocated_memory; - if (p == _p2b) { d = _d2b; } - else - { - d = (get_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_externally_allocated_memory_delegate)); - if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } - } - return d(self); - } - - // AdjustExternallyAllocatedMemory - private static IntPtr _p2c; - private static adjust_externally_allocated_memory_delegate _d2c; - - public static int adjust_externally_allocated_memory(cef_v8value_t* self, int change_in_bytes) - { - adjust_externally_allocated_memory_delegate d; - var p = self->_adjust_externally_allocated_memory; - if (p == _p2c) { d = _d2c; } - else - { - d = (adjust_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(adjust_externally_allocated_memory_delegate)); - if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } - } - return d(self, change_in_bytes); - } - - // GetArrayLength - private static IntPtr _p2d; - private static get_array_length_delegate _d2d; - - public static int get_array_length(cef_v8value_t* self) - { - get_array_length_delegate d; - var p = self->_get_array_length; - if (p == _p2d) { d = _d2d; } - else - { - d = (get_array_length_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_length_delegate)); - if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } - } - return d(self); - } - - // GetArrayBufferReleaseCallback - private static IntPtr _p2e; - private static get_array_buffer_release_callback_delegate _d2e; - - public static cef_v8array_buffer_release_callback_t* get_array_buffer_release_callback(cef_v8value_t* self) - { - get_array_buffer_release_callback_delegate d; - var p = self->_get_array_buffer_release_callback; - if (p == _p2e) { d = _d2e; } - else - { - d = (get_array_buffer_release_callback_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_release_callback_delegate)); - if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } - } - return d(self); - } - - // NeuterArrayBuffer - private static IntPtr _p2f; - private static neuter_array_buffer_delegate _d2f; - - public static int neuter_array_buffer(cef_v8value_t* self) - { - neuter_array_buffer_delegate d; - var p = self->_neuter_array_buffer; - if (p == _p2f) { d = _d2f; } - else - { - d = (neuter_array_buffer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(neuter_array_buffer_delegate)); - if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } - } - return d(self); - } - - // GetArrayBufferByteLength - private static IntPtr _p30; - private static get_array_buffer_byte_length_delegate _d30; - - public static UIntPtr get_array_buffer_byte_length(cef_v8value_t* self) - { - get_array_buffer_byte_length_delegate d; - var p = self->_get_array_buffer_byte_length; - if (p == _p30) { d = _d30; } - else - { - d = (get_array_buffer_byte_length_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_byte_length_delegate)); - if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } - } - return d(self); - } - - // GetArrayBufferData - private static IntPtr _p31; - private static get_array_buffer_data_delegate _d31; - - public static void* get_array_buffer_data(cef_v8value_t* self) - { - get_array_buffer_data_delegate d; - var p = self->_get_array_buffer_data; - if (p == _p31) { d = _d31; } - else - { - d = (get_array_buffer_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_data_delegate)); - if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } - } - return d(self); - } - - // GetFunctionName - private static IntPtr _p32; - private static get_function_name_delegate _d32; - - public static cef_string_userfree* get_function_name(cef_v8value_t* self) - { - get_function_name_delegate d; - var p = self->_get_function_name; - if (p == _p32) { d = _d32; } - else - { - d = (get_function_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_name_delegate)); - if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } - } - return d(self); - } - - // GetFunctionHandler - private static IntPtr _p33; - private static get_function_handler_delegate _d33; - - public static cef_v8handler_t* get_function_handler(cef_v8value_t* self) - { - get_function_handler_delegate d; - var p = self->_get_function_handler; - if (p == _p33) { d = _d33; } - else - { - d = (get_function_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_handler_delegate)); - if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } - } - return d(self); - } - - // ExecuteFunction - private static IntPtr _p34; - private static execute_function_delegate _d34; - - public static cef_v8value_t* execute_function(cef_v8value_t* self, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments) - { - execute_function_delegate d; - var p = self->_execute_function; - if (p == _p34) { d = _d34; } - else - { - d = (execute_function_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_function_delegate)); - if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } - } - return d(self, @object, argumentsCount, arguments); - } - - // ExecuteFunctionWithContext - private static IntPtr _p35; - private static execute_function_with_context_delegate _d35; - - public static cef_v8value_t* execute_function_with_context(cef_v8value_t* self, cef_v8context_t* context, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments) - { - execute_function_with_context_delegate d; - var p = self->_execute_function_with_context; - if (p == _p35) { d = _d35; } - else - { - d = (execute_function_with_context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_function_with_context_delegate)); - if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } - } - return d(self, context, @object, argumentsCount, arguments); - } - - // ResolvePromise - private static IntPtr _p36; - private static resolve_promise_delegate _d36; - - public static int resolve_promise(cef_v8value_t* self, cef_v8value_t* arg) - { - resolve_promise_delegate d; - var p = self->_resolve_promise; - if (p == _p36) { d = _d36; } - else - { - d = (resolve_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_promise_delegate)); - if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } - } - return d(self, arg); - } - - // RejectPromise - private static IntPtr _p37; - private static reject_promise_delegate _d37; - - public static int reject_promise(cef_v8value_t* self, cef_string_t* errorMsg) - { - reject_promise_delegate d; - var p = self->_reject_promise; - if (p == _p37) { d = _d37; } - else - { - d = (reject_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reject_promise_delegate)); - if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } - } - return d(self, errorMsg); - } - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Runtime.InteropServices; + using System.Security; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + [SuppressMessage("Microsoft.Design", "CA1049:TypesThatOwnNativeResourcesShouldBeDisposable")] + internal unsafe struct cef_v8value_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _is_valid; + internal IntPtr _is_undefined; + internal IntPtr _is_null; + internal IntPtr _is_bool; + internal IntPtr _is_int; + internal IntPtr _is_uint; + internal IntPtr _is_double; + internal IntPtr _is_date; + internal IntPtr _is_string; + internal IntPtr _is_object; + internal IntPtr _is_array; + internal IntPtr _is_array_buffer; + internal IntPtr _is_function; + internal IntPtr _is_promise; + internal IntPtr _is_same; + internal IntPtr _get_bool_value; + internal IntPtr _get_int_value; + internal IntPtr _get_uint_value; + internal IntPtr _get_double_value; + internal IntPtr _get_date_value; + internal IntPtr _get_string_value; + internal IntPtr _is_user_created; + internal IntPtr _has_exception; + internal IntPtr _get_exception; + internal IntPtr _clear_exception; + internal IntPtr _will_rethrow_exceptions; + internal IntPtr _set_rethrow_exceptions; + internal IntPtr _has_value_bykey; + internal IntPtr _has_value_byindex; + internal IntPtr _delete_value_bykey; + internal IntPtr _delete_value_byindex; + internal IntPtr _get_value_bykey; + internal IntPtr _get_value_byindex; + internal IntPtr _set_value_bykey; + internal IntPtr _set_value_byindex; + internal IntPtr _set_value_byaccessor; + internal IntPtr _get_keys; + internal IntPtr _set_user_data; + internal IntPtr _get_user_data; + internal IntPtr _get_externally_allocated_memory; + internal IntPtr _adjust_externally_allocated_memory; + internal IntPtr _get_array_length; + internal IntPtr _get_array_buffer_release_callback; + internal IntPtr _neuter_array_buffer; + internal IntPtr _get_array_buffer_byte_length; + internal IntPtr _get_array_buffer_data; + internal IntPtr _get_function_name; + internal IntPtr _get_function_handler; + internal IntPtr _execute_function; + internal IntPtr _execute_function_with_context; + internal IntPtr _resolve_promise; + internal IntPtr _reject_promise; + + // CreateUndefined + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_undefined", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_undefined(); + + // CreateNull + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_null", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_null(); + + // CreateBool + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_bool", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_bool(int value); + + // CreateInt + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_int", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_int(int value); + + // CreateUInt + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_uint", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_uint(uint value); + + // CreateDouble + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_double", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_double(double value); + + // CreateDate + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_date", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_date(CefBaseTime date); + + // CreateString + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_string", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_string(cef_string_t* value); + + // CreateObject + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_object", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_object(cef_v8accessor_t* accessor, cef_v8interceptor_t* interceptor); + + // CreateArray + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_array", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_array(int length); + + // CreateArrayBuffer + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_array_buffer", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_array_buffer(void* buffer, UIntPtr length, cef_v8array_buffer_release_callback_t* release_callback); + + // CreateFunction + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_function", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_function(cef_string_t* name, cef_v8handler_t* handler); + + // CreatePromise + [DllImport(libcef.DllName, EntryPoint = "cef_v8value_create_promise", CallingConvention = libcef.CEF_CALL)] + public static extern cef_v8value_t* create_promise(); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void add_ref_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int release_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_one_ref_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_at_least_one_ref_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_valid_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_undefined_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_null_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_bool_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_int_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_uint_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_double_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_date_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_string_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_object_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_array_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_array_buffer_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_function_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_promise_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_same_delegate(cef_v8value_t* self, cef_v8value_t* that); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_bool_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_int_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate uint get_uint_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate double get_double_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefBaseTime get_date_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_string_value_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int is_user_created_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_exception_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8exception_t* get_exception_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int clear_exception_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int will_rethrow_exceptions_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_rethrow_exceptions_delegate(cef_v8value_t* self, int rethrow); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int has_value_byindex_delegate(cef_v8value_t* self, int index); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int delete_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int delete_value_byindex_delegate(cef_v8value_t* self, int index); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8value_t* get_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8value_t* get_value_byindex_delegate(cef_v8value_t* self, int index); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_value_bykey_delegate(cef_v8value_t* self, cef_string_t* key, cef_v8value_t* value, CefV8PropertyAttribute attribute); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_value_byindex_delegate(cef_v8value_t* self, int index, cef_v8value_t* value); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_value_byaccessor_delegate(cef_v8value_t* self, cef_string_t* key, CefV8PropertyAttribute attribute); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_keys_delegate(cef_v8value_t* self, cef_string_list* keys); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int set_user_data_delegate(cef_v8value_t* self, cef_base_ref_counted_t* user_data); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_base_ref_counted_t* get_user_data_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_externally_allocated_memory_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int adjust_externally_allocated_memory_delegate(cef_v8value_t* self, int change_in_bytes); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int get_array_length_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8array_buffer_release_callback_t* get_array_buffer_release_callback_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int neuter_array_buffer_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate UIntPtr get_array_buffer_byte_length_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void* get_array_buffer_data_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_string_userfree* get_function_name_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8handler_t* get_function_handler_delegate(cef_v8value_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8value_t* execute_function_delegate(cef_v8value_t* self, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate cef_v8value_t* execute_function_with_context_delegate(cef_v8value_t* self, cef_v8context_t* context, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int resolve_promise_delegate(cef_v8value_t* self, cef_v8value_t* arg); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate int reject_promise_delegate(cef_v8value_t* self, cef_string_t* errorMsg); + + // AddRef + private static IntPtr _p0; + private static add_ref_delegate _d0; + + public static void add_ref(cef_v8value_t* self) + { + add_ref_delegate d; + var p = self->_base._add_ref; + if (p == _p0) { d = _d0; } + else + { + d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate)); + if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; } + } + d(self); + } + + // Release + private static IntPtr _p1; + private static release_delegate _d1; + + public static int release(cef_v8value_t* self) + { + release_delegate d; + var p = self->_base._release; + if (p == _p1) { d = _d1; } + else + { + d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate)); + if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; } + } + return d(self); + } + + // HasOneRef + private static IntPtr _p2; + private static has_one_ref_delegate _d2; + + public static int has_one_ref(cef_v8value_t* self) + { + has_one_ref_delegate d; + var p = self->_base._has_one_ref; + if (p == _p2) { d = _d2; } + else + { + d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate)); + if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; } + } + return d(self); + } + + // HasAtLeastOneRef + private static IntPtr _p3; + private static has_at_least_one_ref_delegate _d3; + + public static int has_at_least_one_ref(cef_v8value_t* self) + { + has_at_least_one_ref_delegate d; + var p = self->_base._has_at_least_one_ref; + if (p == _p3) { d = _d3; } + else + { + d = (has_at_least_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_at_least_one_ref_delegate)); + if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; } + } + return d(self); + } + + // IsValid + private static IntPtr _p4; + private static is_valid_delegate _d4; + + public static int is_valid(cef_v8value_t* self) + { + is_valid_delegate d; + var p = self->_is_valid; + if (p == _p4) { d = _d4; } + else + { + d = (is_valid_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_valid_delegate)); + if (_p4 == IntPtr.Zero) { _d4 = d; _p4 = p; } + } + return d(self); + } + + // IsUndefined + private static IntPtr _p5; + private static is_undefined_delegate _d5; + + public static int is_undefined(cef_v8value_t* self) + { + is_undefined_delegate d; + var p = self->_is_undefined; + if (p == _p5) { d = _d5; } + else + { + d = (is_undefined_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_undefined_delegate)); + if (_p5 == IntPtr.Zero) { _d5 = d; _p5 = p; } + } + return d(self); + } + + // IsNull + private static IntPtr _p6; + private static is_null_delegate _d6; + + public static int is_null(cef_v8value_t* self) + { + is_null_delegate d; + var p = self->_is_null; + if (p == _p6) { d = _d6; } + else + { + d = (is_null_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_null_delegate)); + if (_p6 == IntPtr.Zero) { _d6 = d; _p6 = p; } + } + return d(self); + } + + // IsBool + private static IntPtr _p7; + private static is_bool_delegate _d7; + + public static int is_bool(cef_v8value_t* self) + { + is_bool_delegate d; + var p = self->_is_bool; + if (p == _p7) { d = _d7; } + else + { + d = (is_bool_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_bool_delegate)); + if (_p7 == IntPtr.Zero) { _d7 = d; _p7 = p; } + } + return d(self); + } + + // IsInt + private static IntPtr _p8; + private static is_int_delegate _d8; + + public static int is_int(cef_v8value_t* self) + { + is_int_delegate d; + var p = self->_is_int; + if (p == _p8) { d = _d8; } + else + { + d = (is_int_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_int_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + return d(self); + } + + // IsUInt + private static IntPtr _p9; + private static is_uint_delegate _d9; + + public static int is_uint(cef_v8value_t* self) + { + is_uint_delegate d; + var p = self->_is_uint; + if (p == _p9) { d = _d9; } + else + { + d = (is_uint_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_uint_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + return d(self); + } + + // IsDouble + private static IntPtr _pa; + private static is_double_delegate _da; + + public static int is_double(cef_v8value_t* self) + { + is_double_delegate d; + var p = self->_is_double; + if (p == _pa) { d = _da; } + else + { + d = (is_double_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_double_delegate)); + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + } + return d(self); + } + + // IsDate + private static IntPtr _pb; + private static is_date_delegate _db; + + public static int is_date(cef_v8value_t* self) + { + is_date_delegate d; + var p = self->_is_date; + if (p == _pb) { d = _db; } + else + { + d = (is_date_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_date_delegate)); + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } + } + return d(self); + } + + // IsString + private static IntPtr _pc; + private static is_string_delegate _dc; + + public static int is_string(cef_v8value_t* self) + { + is_string_delegate d; + var p = self->_is_string; + if (p == _pc) { d = _dc; } + else + { + d = (is_string_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_string_delegate)); + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } + } + return d(self); + } + + // IsObject + private static IntPtr _pd; + private static is_object_delegate _dd; + + public static int is_object(cef_v8value_t* self) + { + is_object_delegate d; + var p = self->_is_object; + if (p == _pd) { d = _dd; } + else + { + d = (is_object_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_object_delegate)); + if (_pd == IntPtr.Zero) { _dd = d; _pd = p; } + } + return d(self); + } + + // IsArray + private static IntPtr _pe; + private static is_array_delegate _de; + + public static int is_array(cef_v8value_t* self) + { + is_array_delegate d; + var p = self->_is_array; + if (p == _pe) { d = _de; } + else + { + d = (is_array_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_array_delegate)); + if (_pe == IntPtr.Zero) { _de = d; _pe = p; } + } + return d(self); + } + + // IsArrayBuffer + private static IntPtr _pf; + private static is_array_buffer_delegate _df; + + public static int is_array_buffer(cef_v8value_t* self) + { + is_array_buffer_delegate d; + var p = self->_is_array_buffer; + if (p == _pf) { d = _df; } + else + { + d = (is_array_buffer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_array_buffer_delegate)); + if (_pf == IntPtr.Zero) { _df = d; _pf = p; } + } + return d(self); + } + + // IsFunction + private static IntPtr _p10; + private static is_function_delegate _d10; + + public static int is_function(cef_v8value_t* self) + { + is_function_delegate d; + var p = self->_is_function; + if (p == _p10) { d = _d10; } + else + { + d = (is_function_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_function_delegate)); + if (_p10 == IntPtr.Zero) { _d10 = d; _p10 = p; } + } + return d(self); + } + + // IsPromise + private static IntPtr _p11; + private static is_promise_delegate _d11; + + public static int is_promise(cef_v8value_t* self) + { + is_promise_delegate d; + var p = self->_is_promise; + if (p == _p11) { d = _d11; } + else + { + d = (is_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_promise_delegate)); + if (_p11 == IntPtr.Zero) { _d11 = d; _p11 = p; } + } + return d(self); + } + + // IsSame + private static IntPtr _p12; + private static is_same_delegate _d12; + + public static int is_same(cef_v8value_t* self, cef_v8value_t* that) + { + is_same_delegate d; + var p = self->_is_same; + if (p == _p12) { d = _d12; } + else + { + d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate)); + if (_p12 == IntPtr.Zero) { _d12 = d; _p12 = p; } + } + return d(self, that); + } + + // GetBoolValue + private static IntPtr _p13; + private static get_bool_value_delegate _d13; + + public static int get_bool_value(cef_v8value_t* self) + { + get_bool_value_delegate d; + var p = self->_get_bool_value; + if (p == _p13) { d = _d13; } + else + { + d = (get_bool_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_bool_value_delegate)); + if (_p13 == IntPtr.Zero) { _d13 = d; _p13 = p; } + } + return d(self); + } + + // GetIntValue + private static IntPtr _p14; + private static get_int_value_delegate _d14; + + public static int get_int_value(cef_v8value_t* self) + { + get_int_value_delegate d; + var p = self->_get_int_value; + if (p == _p14) { d = _d14; } + else + { + d = (get_int_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_int_value_delegate)); + if (_p14 == IntPtr.Zero) { _d14 = d; _p14 = p; } + } + return d(self); + } + + // GetUIntValue + private static IntPtr _p15; + private static get_uint_value_delegate _d15; + + public static uint get_uint_value(cef_v8value_t* self) + { + get_uint_value_delegate d; + var p = self->_get_uint_value; + if (p == _p15) { d = _d15; } + else + { + d = (get_uint_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_uint_value_delegate)); + if (_p15 == IntPtr.Zero) { _d15 = d; _p15 = p; } + } + return d(self); + } + + // GetDoubleValue + private static IntPtr _p16; + private static get_double_value_delegate _d16; + + public static double get_double_value(cef_v8value_t* self) + { + get_double_value_delegate d; + var p = self->_get_double_value; + if (p == _p16) { d = _d16; } + else + { + d = (get_double_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_double_value_delegate)); + if (_p16 == IntPtr.Zero) { _d16 = d; _p16 = p; } + } + return d(self); + } + + // GetDateValue + private static IntPtr _p17; + private static get_date_value_delegate _d17; + + public static CefBaseTime get_date_value(cef_v8value_t* self) + { + get_date_value_delegate d; + var p = self->_get_date_value; + if (p == _p17) { d = _d17; } + else + { + d = (get_date_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_date_value_delegate)); + if (_p17 == IntPtr.Zero) { _d17 = d; _p17 = p; } + } + return d(self); + } + + // GetStringValue + private static IntPtr _p18; + private static get_string_value_delegate _d18; + + public static cef_string_userfree* get_string_value(cef_v8value_t* self) + { + get_string_value_delegate d; + var p = self->_get_string_value; + if (p == _p18) { d = _d18; } + else + { + d = (get_string_value_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_string_value_delegate)); + if (_p18 == IntPtr.Zero) { _d18 = d; _p18 = p; } + } + return d(self); + } + + // IsUserCreated + private static IntPtr _p19; + private static is_user_created_delegate _d19; + + public static int is_user_created(cef_v8value_t* self) + { + is_user_created_delegate d; + var p = self->_is_user_created; + if (p == _p19) { d = _d19; } + else + { + d = (is_user_created_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_user_created_delegate)); + if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + } + return d(self); + } + + // HasException + private static IntPtr _p1a; + private static has_exception_delegate _d1a; + + public static int has_exception(cef_v8value_t* self) + { + has_exception_delegate d; + var p = self->_has_exception; + if (p == _p1a) { d = _d1a; } + else + { + d = (has_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_exception_delegate)); + if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + } + return d(self); + } + + // GetException + private static IntPtr _p1b; + private static get_exception_delegate _d1b; + + public static cef_v8exception_t* get_exception(cef_v8value_t* self) + { + get_exception_delegate d; + var p = self->_get_exception; + if (p == _p1b) { d = _d1b; } + else + { + d = (get_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_exception_delegate)); + if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + } + return d(self); + } + + // ClearException + private static IntPtr _p1c; + private static clear_exception_delegate _d1c; + + public static int clear_exception(cef_v8value_t* self) + { + clear_exception_delegate d; + var p = self->_clear_exception; + if (p == _p1c) { d = _d1c; } + else + { + d = (clear_exception_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_exception_delegate)); + if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } + } + return d(self); + } + + // WillRethrowExceptions + private static IntPtr _p1d; + private static will_rethrow_exceptions_delegate _d1d; + + public static int will_rethrow_exceptions(cef_v8value_t* self) + { + will_rethrow_exceptions_delegate d; + var p = self->_will_rethrow_exceptions; + if (p == _p1d) { d = _d1d; } + else + { + d = (will_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(will_rethrow_exceptions_delegate)); + if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } + } + return d(self); + } + + // SetRethrowExceptions + private static IntPtr _p1e; + private static set_rethrow_exceptions_delegate _d1e; + + public static int set_rethrow_exceptions(cef_v8value_t* self, int rethrow) + { + set_rethrow_exceptions_delegate d; + var p = self->_set_rethrow_exceptions; + if (p == _p1e) { d = _d1e; } + else + { + d = (set_rethrow_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_rethrow_exceptions_delegate)); + if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } + } + return d(self, rethrow); + } + + // HasValue + private static IntPtr _p1f; + private static has_value_bykey_delegate _d1f; + + public static int has_value_bykey(cef_v8value_t* self, cef_string_t* key) + { + has_value_bykey_delegate d; + var p = self->_has_value_bykey; + if (p == _p1f) { d = _d1f; } + else + { + d = (has_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_value_bykey_delegate)); + if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } + } + return d(self, key); + } + + // HasValue + private static IntPtr _p20; + private static has_value_byindex_delegate _d20; + + public static int has_value_byindex(cef_v8value_t* self, int index) + { + has_value_byindex_delegate d; + var p = self->_has_value_byindex; + if (p == _p20) { d = _d20; } + else + { + d = (has_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_value_byindex_delegate)); + if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } + } + return d(self, index); + } + + // DeleteValue + private static IntPtr _p21; + private static delete_value_bykey_delegate _d21; + + public static int delete_value_bykey(cef_v8value_t* self, cef_string_t* key) + { + delete_value_bykey_delegate d; + var p = self->_delete_value_bykey; + if (p == _p21) { d = _d21; } + else + { + d = (delete_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_bykey_delegate)); + if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } + } + return d(self, key); + } + + // DeleteValue + private static IntPtr _p22; + private static delete_value_byindex_delegate _d22; + + public static int delete_value_byindex(cef_v8value_t* self, int index) + { + delete_value_byindex_delegate d; + var p = self->_delete_value_byindex; + if (p == _p22) { d = _d22; } + else + { + d = (delete_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(delete_value_byindex_delegate)); + if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } + } + return d(self, index); + } + + // GetValue + private static IntPtr _p23; + private static get_value_bykey_delegate _d23; + + public static cef_v8value_t* get_value_bykey(cef_v8value_t* self, cef_string_t* key) + { + get_value_bykey_delegate d; + var p = self->_get_value_bykey; + if (p == _p23) { d = _d23; } + else + { + d = (get_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_bykey_delegate)); + if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } + } + return d(self, key); + } + + // GetValue + private static IntPtr _p24; + private static get_value_byindex_delegate _d24; + + public static cef_v8value_t* get_value_byindex(cef_v8value_t* self, int index) + { + get_value_byindex_delegate d; + var p = self->_get_value_byindex; + if (p == _p24) { d = _d24; } + else + { + d = (get_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_value_byindex_delegate)); + if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } + } + return d(self, index); + } + + // SetValue + private static IntPtr _p25; + private static set_value_bykey_delegate _d25; + + public static int set_value_bykey(cef_v8value_t* self, cef_string_t* key, cef_v8value_t* value, CefV8PropertyAttribute attribute) + { + set_value_bykey_delegate d; + var p = self->_set_value_bykey; + if (p == _p25) { d = _d25; } + else + { + d = (set_value_bykey_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_bykey_delegate)); + if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } + } + return d(self, key, value, attribute); + } + + // SetValue + private static IntPtr _p26; + private static set_value_byindex_delegate _d26; + + public static int set_value_byindex(cef_v8value_t* self, int index, cef_v8value_t* value) + { + set_value_byindex_delegate d; + var p = self->_set_value_byindex; + if (p == _p26) { d = _d26; } + else + { + d = (set_value_byindex_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byindex_delegate)); + if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } + } + return d(self, index, value); + } + + // SetValue + private static IntPtr _p27; + private static set_value_byaccessor_delegate _d27; + + public static int set_value_byaccessor(cef_v8value_t* self, cef_string_t* key, CefV8PropertyAttribute attribute) + { + set_value_byaccessor_delegate d; + var p = self->_set_value_byaccessor; + if (p == _p27) { d = _d27; } + else + { + d = (set_value_byaccessor_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_value_byaccessor_delegate)); + if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } + } + return d(self, key, attribute); + } + + // GetKeys + private static IntPtr _p28; + private static get_keys_delegate _d28; + + public static int get_keys(cef_v8value_t* self, cef_string_list* keys) + { + get_keys_delegate d; + var p = self->_get_keys; + if (p == _p28) { d = _d28; } + else + { + d = (get_keys_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_keys_delegate)); + if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } + } + return d(self, keys); + } + + // SetUserData + private static IntPtr _p29; + private static set_user_data_delegate _d29; + + public static int set_user_data(cef_v8value_t* self, cef_base_ref_counted_t* user_data) + { + set_user_data_delegate d; + var p = self->_set_user_data; + if (p == _p29) { d = _d29; } + else + { + d = (set_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_user_data_delegate)); + if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } + } + return d(self, user_data); + } + + // GetUserData + private static IntPtr _p2a; + private static get_user_data_delegate _d2a; + + public static cef_base_ref_counted_t* get_user_data(cef_v8value_t* self) + { + get_user_data_delegate d; + var p = self->_get_user_data; + if (p == _p2a) { d = _d2a; } + else + { + d = (get_user_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_user_data_delegate)); + if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } + } + return d(self); + } + + // GetExternallyAllocatedMemory + private static IntPtr _p2b; + private static get_externally_allocated_memory_delegate _d2b; + + public static int get_externally_allocated_memory(cef_v8value_t* self) + { + get_externally_allocated_memory_delegate d; + var p = self->_get_externally_allocated_memory; + if (p == _p2b) { d = _d2b; } + else + { + d = (get_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_externally_allocated_memory_delegate)); + if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } + } + return d(self); + } + + // AdjustExternallyAllocatedMemory + private static IntPtr _p2c; + private static adjust_externally_allocated_memory_delegate _d2c; + + public static int adjust_externally_allocated_memory(cef_v8value_t* self, int change_in_bytes) + { + adjust_externally_allocated_memory_delegate d; + var p = self->_adjust_externally_allocated_memory; + if (p == _p2c) { d = _d2c; } + else + { + d = (adjust_externally_allocated_memory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(adjust_externally_allocated_memory_delegate)); + if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } + } + return d(self, change_in_bytes); + } + + // GetArrayLength + private static IntPtr _p2d; + private static get_array_length_delegate _d2d; + + public static int get_array_length(cef_v8value_t* self) + { + get_array_length_delegate d; + var p = self->_get_array_length; + if (p == _p2d) { d = _d2d; } + else + { + d = (get_array_length_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_length_delegate)); + if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } + } + return d(self); + } + + // GetArrayBufferReleaseCallback + private static IntPtr _p2e; + private static get_array_buffer_release_callback_delegate _d2e; + + public static cef_v8array_buffer_release_callback_t* get_array_buffer_release_callback(cef_v8value_t* self) + { + get_array_buffer_release_callback_delegate d; + var p = self->_get_array_buffer_release_callback; + if (p == _p2e) { d = _d2e; } + else + { + d = (get_array_buffer_release_callback_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_release_callback_delegate)); + if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } + } + return d(self); + } + + // NeuterArrayBuffer + private static IntPtr _p2f; + private static neuter_array_buffer_delegate _d2f; + + public static int neuter_array_buffer(cef_v8value_t* self) + { + neuter_array_buffer_delegate d; + var p = self->_neuter_array_buffer; + if (p == _p2f) { d = _d2f; } + else + { + d = (neuter_array_buffer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(neuter_array_buffer_delegate)); + if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } + } + return d(self); + } + + // GetArrayBufferByteLength + private static IntPtr _p30; + private static get_array_buffer_byte_length_delegate _d30; + + public static UIntPtr get_array_buffer_byte_length(cef_v8value_t* self) + { + get_array_buffer_byte_length_delegate d; + var p = self->_get_array_buffer_byte_length; + if (p == _p30) { d = _d30; } + else + { + d = (get_array_buffer_byte_length_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_byte_length_delegate)); + if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } + } + return d(self); + } + + // GetArrayBufferData + private static IntPtr _p31; + private static get_array_buffer_data_delegate _d31; + + public static void* get_array_buffer_data(cef_v8value_t* self) + { + get_array_buffer_data_delegate d; + var p = self->_get_array_buffer_data; + if (p == _p31) { d = _d31; } + else + { + d = (get_array_buffer_data_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_array_buffer_data_delegate)); + if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } + } + return d(self); + } + + // GetFunctionName + private static IntPtr _p32; + private static get_function_name_delegate _d32; + + public static cef_string_userfree* get_function_name(cef_v8value_t* self) + { + get_function_name_delegate d; + var p = self->_get_function_name; + if (p == _p32) { d = _d32; } + else + { + d = (get_function_name_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_name_delegate)); + if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } + } + return d(self); + } + + // GetFunctionHandler + private static IntPtr _p33; + private static get_function_handler_delegate _d33; + + public static cef_v8handler_t* get_function_handler(cef_v8value_t* self) + { + get_function_handler_delegate d; + var p = self->_get_function_handler; + if (p == _p33) { d = _d33; } + else + { + d = (get_function_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_function_handler_delegate)); + if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } + } + return d(self); + } + + // ExecuteFunction + private static IntPtr _p34; + private static execute_function_delegate _d34; + + public static cef_v8value_t* execute_function(cef_v8value_t* self, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments) + { + execute_function_delegate d; + var p = self->_execute_function; + if (p == _p34) { d = _d34; } + else + { + d = (execute_function_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_function_delegate)); + if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } + } + return d(self, @object, argumentsCount, arguments); + } + + // ExecuteFunctionWithContext + private static IntPtr _p35; + private static execute_function_with_context_delegate _d35; + + public static cef_v8value_t* execute_function_with_context(cef_v8value_t* self, cef_v8context_t* context, cef_v8value_t* @object, UIntPtr argumentsCount, cef_v8value_t** arguments) + { + execute_function_with_context_delegate d; + var p = self->_execute_function_with_context; + if (p == _p35) { d = _d35; } + else + { + d = (execute_function_with_context_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_function_with_context_delegate)); + if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } + } + return d(self, context, @object, argumentsCount, arguments); + } + + // ResolvePromise + private static IntPtr _p36; + private static resolve_promise_delegate _d36; + + public static int resolve_promise(cef_v8value_t* self, cef_v8value_t* arg) + { + resolve_promise_delegate d; + var p = self->_resolve_promise; + if (p == _p36) { d = _d36; } + else + { + d = (resolve_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_promise_delegate)); + if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } + } + return d(self, arg); + } + + // RejectPromise + private static IntPtr _p37; + private static reject_promise_delegate _d37; + + public static int reject_promise(cef_v8value_t* self, cef_string_t* errorMsg) + { + reject_promise_delegate d; + var p = self->_reject_promise; + if (p == _p37) { d = _d37; } + else + { + d = (reject_promise_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(reject_promise_delegate)); + if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } + } + return d(self, errorMsg); + } + + } +} diff --git a/CefGlue/Interop/Structs/cef_accelerated_paint_info_t.cs b/CefGlue/Interop/Structs/cef_accelerated_paint_info_t.cs new file mode 100644 index 00000000..b949f03f --- /dev/null +++ b/CefGlue/Interop/Structs/cef_accelerated_paint_info_t.cs @@ -0,0 +1,21 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// +using System.Runtime.InteropServices; + +namespace Xilium.CefGlue.Interop +{ + /// + /// + /// Structure containing shared texture information for the OnAcceleratedPaint + /// callback. Resources will be released to the underlying pool for reuse when + /// the callback returns from client code. + /// + /// + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + public unsafe struct cef_accelerated_paint_info_t + { + public nuint shared_texture_handle; + public CefColorType format; + } +} diff --git a/CefGlue/Interop/libcef.g.cs b/CefGlue/Interop/libcef.g.cs index 73e15553..3505a3eb 100644 --- a/CefGlue/Interop/libcef.g.cs +++ b/CefGlue/Interop/libcef.g.cs @@ -1,197 +1,201 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Runtime.InteropServices; - using System.Diagnostics.CodeAnalysis; - - internal static unsafe partial class libcef - { - // CefExecuteProcess - [DllImport(libcef.DllName, EntryPoint = "cef_execute_process", CallingConvention = libcef.CEF_CALL)] - public static extern int execute_process(cef_main_args_t* args, cef_app_t* application, void* windows_sandbox_info); - - // CefInitialize - [DllImport(libcef.DllName, EntryPoint = "cef_initialize", CallingConvention = libcef.CEF_CALL)] - public static extern int initialize(cef_main_args_t* args, cef_settings_t* settings, cef_app_t* application, void* windows_sandbox_info); - - // CefShutdown - [DllImport(libcef.DllName, EntryPoint = "cef_shutdown", CallingConvention = libcef.CEF_CALL)] - public static extern void shutdown(); - - // CefDoMessageLoopWork - [DllImport(libcef.DllName, EntryPoint = "cef_do_message_loop_work", CallingConvention = libcef.CEF_CALL)] - public static extern void do_message_loop_work(); - - // CefRunMessageLoop - [DllImport(libcef.DllName, EntryPoint = "cef_run_message_loop", CallingConvention = libcef.CEF_CALL)] - public static extern void run_message_loop(); - - // CefQuitMessageLoop - [DllImport(libcef.DllName, EntryPoint = "cef_quit_message_loop", CallingConvention = libcef.CEF_CALL)] - public static extern void quit_message_loop(); - - // CefCrashReportingEnabled - [DllImport(libcef.DllName, EntryPoint = "cef_crash_reporting_enabled", CallingConvention = libcef.CEF_CALL)] - public static extern int crash_reporting_enabled(); - - // CefSetCrashKeyValue - [DllImport(libcef.DllName, EntryPoint = "cef_set_crash_key_value", CallingConvention = libcef.CEF_CALL)] - public static extern void set_crash_key_value(cef_string_t* key, cef_string_t* value); - - // CefCreateDirectory - [DllImport(libcef.DllName, EntryPoint = "cef_create_directory", CallingConvention = libcef.CEF_CALL)] - public static extern int create_directory(cef_string_t* full_path); - - // CefGetTempDirectory - [DllImport(libcef.DllName, EntryPoint = "cef_get_temp_directory", CallingConvention = libcef.CEF_CALL)] - public static extern int get_temp_directory(cef_string_t* temp_dir); - - // CefCreateNewTempDirectory - [DllImport(libcef.DllName, EntryPoint = "cef_create_new_temp_directory", CallingConvention = libcef.CEF_CALL)] - public static extern int create_new_temp_directory(cef_string_t* prefix, cef_string_t* new_temp_path); - - // CefCreateTempDirectoryInDirectory - [DllImport(libcef.DllName, EntryPoint = "cef_create_temp_directory_in_directory", CallingConvention = libcef.CEF_CALL)] - public static extern int create_temp_directory_in_directory(cef_string_t* base_dir, cef_string_t* prefix, cef_string_t* new_dir); - - // CefDirectoryExists - [DllImport(libcef.DllName, EntryPoint = "cef_directory_exists", CallingConvention = libcef.CEF_CALL)] - public static extern int directory_exists(cef_string_t* path); - - // CefDeleteFile - [DllImport(libcef.DllName, EntryPoint = "cef_delete_file", CallingConvention = libcef.CEF_CALL)] - public static extern int delete_file(cef_string_t* path, int recursive); - - // CefZipDirectory - [DllImport(libcef.DllName, EntryPoint = "cef_zip_directory", CallingConvention = libcef.CEF_CALL)] - public static extern int zip_directory(cef_string_t* src_dir, cef_string_t* dest_file, int include_hidden_files); - - // CefLoadCRLSetsFile - [DllImport(libcef.DllName, EntryPoint = "cef_load_crlsets_file", CallingConvention = libcef.CEF_CALL)] - public static extern void load_crlsets_file(cef_string_t* path); - - // CefIsRTL - [DllImport(libcef.DllName, EntryPoint = "cef_is_rtl", CallingConvention = libcef.CEF_CALL)] - public static extern int is_rtl(); - - // CefAddCrossOriginWhitelistEntry - [DllImport(libcef.DllName, EntryPoint = "cef_add_cross_origin_whitelist_entry", CallingConvention = libcef.CEF_CALL)] - public static extern int add_cross_origin_whitelist_entry(cef_string_t* source_origin, cef_string_t* target_protocol, cef_string_t* target_domain, int allow_target_subdomains); - - // CefRemoveCrossOriginWhitelistEntry - [DllImport(libcef.DllName, EntryPoint = "cef_remove_cross_origin_whitelist_entry", CallingConvention = libcef.CEF_CALL)] - public static extern int remove_cross_origin_whitelist_entry(cef_string_t* source_origin, cef_string_t* target_protocol, cef_string_t* target_domain, int allow_target_subdomains); - - // CefClearCrossOriginWhitelist - [DllImport(libcef.DllName, EntryPoint = "cef_clear_cross_origin_whitelist", CallingConvention = libcef.CEF_CALL)] - public static extern int clear_cross_origin_whitelist(); - - // CefResolveURL - [DllImport(libcef.DllName, EntryPoint = "cef_resolve_url", CallingConvention = libcef.CEF_CALL)] - public static extern int resolve_url(cef_string_t* base_url, cef_string_t* relative_url, cef_string_t* resolved_url); - - // CefParseURL - [DllImport(libcef.DllName, EntryPoint = "cef_parse_url", CallingConvention = libcef.CEF_CALL)] - public static extern int parse_url(cef_string_t* url, cef_urlparts_t* parts); - - // CefCreateURL - [DllImport(libcef.DllName, EntryPoint = "cef_create_url", CallingConvention = libcef.CEF_CALL)] - public static extern int create_url(cef_urlparts_t* parts, cef_string_t* url); - - // CefFormatUrlForSecurityDisplay - [DllImport(libcef.DllName, EntryPoint = "cef_format_url_for_security_display", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* format_url_for_security_display(cef_string_t* origin_url); - - // CefGetMimeType - [DllImport(libcef.DllName, EntryPoint = "cef_get_mime_type", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* get_mime_type(cef_string_t* extension); - - // CefGetExtensionsForMimeType - [DllImport(libcef.DllName, EntryPoint = "cef_get_extensions_for_mime_type", CallingConvention = libcef.CEF_CALL)] - public static extern void get_extensions_for_mime_type(cef_string_t* mime_type, cef_string_list* extensions); - - // CefBase64Encode - [DllImport(libcef.DllName, EntryPoint = "cef_base64encode", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* base64encode(void* data, UIntPtr data_size); - - // CefBase64Decode - [DllImport(libcef.DllName, EntryPoint = "cef_base64decode", CallingConvention = libcef.CEF_CALL)] - public static extern cef_binary_value_t* base64decode(cef_string_t* data); - - // CefURIEncode - [DllImport(libcef.DllName, EntryPoint = "cef_uriencode", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* uriencode(cef_string_t* text, int use_plus); - - // CefURIDecode - [DllImport(libcef.DllName, EntryPoint = "cef_uridecode", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* uridecode(cef_string_t* text, int convert_to_utf8, CefUriUnescapeRules unescape_rule); - - // CefParseJSON - [DllImport(libcef.DllName, EntryPoint = "cef_parse_json", CallingConvention = libcef.CEF_CALL)] - public static extern cef_value_t* parse_json(cef_string_t* json_string, CefJsonParserOptions options); - - // CefParseJSON - [DllImport(libcef.DllName, EntryPoint = "cef_parse_json_buffer", CallingConvention = libcef.CEF_CALL)] - public static extern cef_value_t* parse_json_buffer(void* json, UIntPtr json_size, CefJsonParserOptions options); - - // CefParseJSONAndReturnError - [DllImport(libcef.DllName, EntryPoint = "cef_parse_jsonand_return_error", CallingConvention = libcef.CEF_CALL)] - public static extern cef_value_t* parse_jsonand_return_error(cef_string_t* json_string, CefJsonParserOptions options, cef_string_t* error_msg_out); - - // CefWriteJSON - [DllImport(libcef.DllName, EntryPoint = "cef_write_json", CallingConvention = libcef.CEF_CALL)] - public static extern cef_string_userfree* write_json(cef_value_t* node, CefJsonWriterOptions options); - - // CefGetPath - [DllImport(libcef.DllName, EntryPoint = "cef_get_path", CallingConvention = libcef.CEF_CALL)] - public static extern int get_path(CefPathKey key, cef_string_t* path); - - // CefLaunchProcess - [DllImport(libcef.DllName, EntryPoint = "cef_launch_process", CallingConvention = libcef.CEF_CALL)] - public static extern int launch_process(cef_command_line_t* command_line); - - // CefRegisterSchemeHandlerFactory - [DllImport(libcef.DllName, EntryPoint = "cef_register_scheme_handler_factory", CallingConvention = libcef.CEF_CALL)] - public static extern int register_scheme_handler_factory(cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory); - - // CefClearSchemeHandlerFactories - [DllImport(libcef.DllName, EntryPoint = "cef_clear_scheme_handler_factories", CallingConvention = libcef.CEF_CALL)] - public static extern int clear_scheme_handler_factories(); - - // CefIsCertStatusError - [DllImport(libcef.DllName, EntryPoint = "cef_is_cert_status_error", CallingConvention = libcef.CEF_CALL)] - public static extern int is_cert_status_error(CefCertStatus status); - - // CefCurrentlyOn - [DllImport(libcef.DllName, EntryPoint = "cef_currently_on", CallingConvention = libcef.CEF_CALL)] - public static extern int currently_on(CefThreadId threadId); - - // CefPostTask - [DllImport(libcef.DllName, EntryPoint = "cef_post_task", CallingConvention = libcef.CEF_CALL)] - public static extern int post_task(CefThreadId threadId, cef_task_t* task); - - // CefPostDelayedTask - [DllImport(libcef.DllName, EntryPoint = "cef_post_delayed_task", CallingConvention = libcef.CEF_CALL)] - public static extern int post_delayed_task(CefThreadId threadId, cef_task_t* task, long delay_ms); - - // CefBeginTracing - [DllImport(libcef.DllName, EntryPoint = "cef_begin_tracing", CallingConvention = libcef.CEF_CALL)] - public static extern int begin_tracing(cef_string_t* categories, cef_completion_callback_t* callback); - - // CefEndTracing - [DllImport(libcef.DllName, EntryPoint = "cef_end_tracing", CallingConvention = libcef.CEF_CALL)] - public static extern int end_tracing(cef_string_t* tracing_file, cef_end_tracing_callback_t* callback); - - // CefNowFromSystemTraceTime - [DllImport(libcef.DllName, EntryPoint = "cef_now_from_system_trace_time", CallingConvention = libcef.CEF_CALL)] - public static extern long now_from_system_trace_time(); - - // CefRegisterExtension - [DllImport(libcef.DllName, EntryPoint = "cef_register_extension", CallingConvention = libcef.CEF_CALL)] - public static extern int register_extension(cef_string_t* extension_name, cef_string_t* javascript_code, cef_v8handler_t* handler); - - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Runtime.InteropServices; + using System.Diagnostics.CodeAnalysis; + + internal static unsafe partial class libcef + { + // CefExecuteProcess + [DllImport(libcef.DllName, EntryPoint = "cef_execute_process", CallingConvention = libcef.CEF_CALL)] + public static extern int execute_process(cef_main_args_t* args, cef_app_t* application, void* windows_sandbox_info); + + // CefInitialize + [DllImport(libcef.DllName, EntryPoint = "cef_initialize", CallingConvention = libcef.CEF_CALL)] + public static extern int initialize(cef_main_args_t* args, cef_settings_t* settings, cef_app_t* application, void* windows_sandbox_info); + + // CefGetExitCode + [DllImport(libcef.DllName, EntryPoint = "cef_get_exit_code", CallingConvention = libcef.CEF_CALL)] + public static extern int get_exit_code(); + + // CefShutdown + [DllImport(libcef.DllName, EntryPoint = "cef_shutdown", CallingConvention = libcef.CEF_CALL)] + public static extern void shutdown(); + + // CefDoMessageLoopWork + [DllImport(libcef.DllName, EntryPoint = "cef_do_message_loop_work", CallingConvention = libcef.CEF_CALL)] + public static extern void do_message_loop_work(); + + // CefRunMessageLoop + [DllImport(libcef.DllName, EntryPoint = "cef_run_message_loop", CallingConvention = libcef.CEF_CALL)] + public static extern void run_message_loop(); + + // CefQuitMessageLoop + [DllImport(libcef.DllName, EntryPoint = "cef_quit_message_loop", CallingConvention = libcef.CEF_CALL)] + public static extern void quit_message_loop(); + + // CefCrashReportingEnabled + [DllImport(libcef.DllName, EntryPoint = "cef_crash_reporting_enabled", CallingConvention = libcef.CEF_CALL)] + public static extern int crash_reporting_enabled(); + + // CefSetCrashKeyValue + [DllImport(libcef.DllName, EntryPoint = "cef_set_crash_key_value", CallingConvention = libcef.CEF_CALL)] + public static extern void set_crash_key_value(cef_string_t* key, cef_string_t* value); + + // CefCreateDirectory + [DllImport(libcef.DllName, EntryPoint = "cef_create_directory", CallingConvention = libcef.CEF_CALL)] + public static extern int create_directory(cef_string_t* full_path); + + // CefGetTempDirectory + [DllImport(libcef.DllName, EntryPoint = "cef_get_temp_directory", CallingConvention = libcef.CEF_CALL)] + public static extern int get_temp_directory(cef_string_t* temp_dir); + + // CefCreateNewTempDirectory + [DllImport(libcef.DllName, EntryPoint = "cef_create_new_temp_directory", CallingConvention = libcef.CEF_CALL)] + public static extern int create_new_temp_directory(cef_string_t* prefix, cef_string_t* new_temp_path); + + // CefCreateTempDirectoryInDirectory + [DllImport(libcef.DllName, EntryPoint = "cef_create_temp_directory_in_directory", CallingConvention = libcef.CEF_CALL)] + public static extern int create_temp_directory_in_directory(cef_string_t* base_dir, cef_string_t* prefix, cef_string_t* new_dir); + + // CefDirectoryExists + [DllImport(libcef.DllName, EntryPoint = "cef_directory_exists", CallingConvention = libcef.CEF_CALL)] + public static extern int directory_exists(cef_string_t* path); + + // CefDeleteFile + [DllImport(libcef.DllName, EntryPoint = "cef_delete_file", CallingConvention = libcef.CEF_CALL)] + public static extern int delete_file(cef_string_t* path, int recursive); + + // CefZipDirectory + [DllImport(libcef.DllName, EntryPoint = "cef_zip_directory", CallingConvention = libcef.CEF_CALL)] + public static extern int zip_directory(cef_string_t* src_dir, cef_string_t* dest_file, int include_hidden_files); + + // CefLoadCRLSetsFile + [DllImport(libcef.DllName, EntryPoint = "cef_load_crlsets_file", CallingConvention = libcef.CEF_CALL)] + public static extern void load_crlsets_file(cef_string_t* path); + + // CefIsRTL + [DllImport(libcef.DllName, EntryPoint = "cef_is_rtl", CallingConvention = libcef.CEF_CALL)] + public static extern int is_rtl(); + + // CefAddCrossOriginWhitelistEntry + [DllImport(libcef.DllName, EntryPoint = "cef_add_cross_origin_whitelist_entry", CallingConvention = libcef.CEF_CALL)] + public static extern int add_cross_origin_whitelist_entry(cef_string_t* source_origin, cef_string_t* target_protocol, cef_string_t* target_domain, int allow_target_subdomains); + + // CefRemoveCrossOriginWhitelistEntry + [DllImport(libcef.DllName, EntryPoint = "cef_remove_cross_origin_whitelist_entry", CallingConvention = libcef.CEF_CALL)] + public static extern int remove_cross_origin_whitelist_entry(cef_string_t* source_origin, cef_string_t* target_protocol, cef_string_t* target_domain, int allow_target_subdomains); + + // CefClearCrossOriginWhitelist + [DllImport(libcef.DllName, EntryPoint = "cef_clear_cross_origin_whitelist", CallingConvention = libcef.CEF_CALL)] + public static extern int clear_cross_origin_whitelist(); + + // CefResolveURL + [DllImport(libcef.DllName, EntryPoint = "cef_resolve_url", CallingConvention = libcef.CEF_CALL)] + public static extern int resolve_url(cef_string_t* base_url, cef_string_t* relative_url, cef_string_t* resolved_url); + + // CefParseURL + [DllImport(libcef.DllName, EntryPoint = "cef_parse_url", CallingConvention = libcef.CEF_CALL)] + public static extern int parse_url(cef_string_t* url, cef_urlparts_t* parts); + + // CefCreateURL + [DllImport(libcef.DllName, EntryPoint = "cef_create_url", CallingConvention = libcef.CEF_CALL)] + public static extern int create_url(cef_urlparts_t* parts, cef_string_t* url); + + // CefFormatUrlForSecurityDisplay + [DllImport(libcef.DllName, EntryPoint = "cef_format_url_for_security_display", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* format_url_for_security_display(cef_string_t* origin_url); + + // CefGetMimeType + [DllImport(libcef.DllName, EntryPoint = "cef_get_mime_type", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* get_mime_type(cef_string_t* extension); + + // CefGetExtensionsForMimeType + [DllImport(libcef.DllName, EntryPoint = "cef_get_extensions_for_mime_type", CallingConvention = libcef.CEF_CALL)] + public static extern void get_extensions_for_mime_type(cef_string_t* mime_type, cef_string_list* extensions); + + // CefBase64Encode + [DllImport(libcef.DllName, EntryPoint = "cef_base64encode", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* base64encode(void* data, UIntPtr data_size); + + // CefBase64Decode + [DllImport(libcef.DllName, EntryPoint = "cef_base64decode", CallingConvention = libcef.CEF_CALL)] + public static extern cef_binary_value_t* base64decode(cef_string_t* data); + + // CefURIEncode + [DllImport(libcef.DllName, EntryPoint = "cef_uriencode", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* uriencode(cef_string_t* text, int use_plus); + + // CefURIDecode + [DllImport(libcef.DllName, EntryPoint = "cef_uridecode", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* uridecode(cef_string_t* text, int convert_to_utf8, CefUriUnescapeRules unescape_rule); + + // CefParseJSON + [DllImport(libcef.DllName, EntryPoint = "cef_parse_json", CallingConvention = libcef.CEF_CALL)] + public static extern cef_value_t* parse_json(cef_string_t* json_string, CefJsonParserOptions options); + + // CefParseJSON + [DllImport(libcef.DllName, EntryPoint = "cef_parse_json_buffer", CallingConvention = libcef.CEF_CALL)] + public static extern cef_value_t* parse_json_buffer(void* json, UIntPtr json_size, CefJsonParserOptions options); + + // CefParseJSONAndReturnError + [DllImport(libcef.DllName, EntryPoint = "cef_parse_jsonand_return_error", CallingConvention = libcef.CEF_CALL)] + public static extern cef_value_t* parse_jsonand_return_error(cef_string_t* json_string, CefJsonParserOptions options, cef_string_t* error_msg_out); + + // CefWriteJSON + [DllImport(libcef.DllName, EntryPoint = "cef_write_json", CallingConvention = libcef.CEF_CALL)] + public static extern cef_string_userfree* write_json(cef_value_t* node, CefJsonWriterOptions options); + + // CefGetPath + [DllImport(libcef.DllName, EntryPoint = "cef_get_path", CallingConvention = libcef.CEF_CALL)] + public static extern int get_path(CefPathKey key, cef_string_t* path); + + // CefLaunchProcess + [DllImport(libcef.DllName, EntryPoint = "cef_launch_process", CallingConvention = libcef.CEF_CALL)] + public static extern int launch_process(cef_command_line_t* command_line); + + // CefRegisterSchemeHandlerFactory + [DllImport(libcef.DllName, EntryPoint = "cef_register_scheme_handler_factory", CallingConvention = libcef.CEF_CALL)] + public static extern int register_scheme_handler_factory(cef_string_t* scheme_name, cef_string_t* domain_name, cef_scheme_handler_factory_t* factory); + + // CefClearSchemeHandlerFactories + [DllImport(libcef.DllName, EntryPoint = "cef_clear_scheme_handler_factories", CallingConvention = libcef.CEF_CALL)] + public static extern int clear_scheme_handler_factories(); + + // CefIsCertStatusError + [DllImport(libcef.DllName, EntryPoint = "cef_is_cert_status_error", CallingConvention = libcef.CEF_CALL)] + public static extern int is_cert_status_error(CefCertStatus status); + + // CefCurrentlyOn + [DllImport(libcef.DllName, EntryPoint = "cef_currently_on", CallingConvention = libcef.CEF_CALL)] + public static extern int currently_on(CefThreadId threadId); + + // CefPostTask + [DllImport(libcef.DllName, EntryPoint = "cef_post_task", CallingConvention = libcef.CEF_CALL)] + public static extern int post_task(CefThreadId threadId, cef_task_t* task); + + // CefPostDelayedTask + [DllImport(libcef.DllName, EntryPoint = "cef_post_delayed_task", CallingConvention = libcef.CEF_CALL)] + public static extern int post_delayed_task(CefThreadId threadId, cef_task_t* task, long delay_ms); + + // CefBeginTracing + [DllImport(libcef.DllName, EntryPoint = "cef_begin_tracing", CallingConvention = libcef.CEF_CALL)] + public static extern int begin_tracing(cef_string_t* categories, cef_completion_callback_t* callback); + + // CefEndTracing + [DllImport(libcef.DllName, EntryPoint = "cef_end_tracing", CallingConvention = libcef.CEF_CALL)] + public static extern int end_tracing(cef_string_t* tracing_file, cef_end_tracing_callback_t* callback); + + // CefNowFromSystemTraceTime + [DllImport(libcef.DllName, EntryPoint = "cef_now_from_system_trace_time", CallingConvention = libcef.CEF_CALL)] + public static extern long now_from_system_trace_time(); + + // CefRegisterExtension + [DllImport(libcef.DllName, EntryPoint = "cef_register_extension", CallingConvention = libcef.CEF_CALL)] + public static extern int register_extension(cef_string_t* extension_name, cef_string_t* javascript_code, cef_v8handler_t* handler); + + } +} diff --git a/CefGlue/Interop/version.g.cs b/CefGlue/Interop/version.g.cs index 6a60c5e5..2367d35d 100644 --- a/CefGlue/Interop/version.g.cs +++ b/CefGlue/Interop/version.g.cs @@ -1,28 +1,28 @@ -// -// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! -// -namespace Xilium.CefGlue.Interop -{ - using System; - using System.Runtime.InteropServices; - using System.Diagnostics.CodeAnalysis; - - internal static unsafe partial class libcef - { - public const string CEF_VERSION = "120.1.8+ge6b45b0+chromium-120.0.6099.109"; - public const int CEF_VERSION_MAJOR = 120; - public const int CEF_COMMIT_NUMBER = 2877; - public const string CEF_COMMIT_HASH = "e6b45b0c88512b3f5e24bc9007e019c5bee77819"; - - public const int CHROME_VERSION_MAJOR = 120; - public const int CHROME_VERSION_MINOR = 0; - public const int CHROME_VERSION_BUILD = 6099; - public const int CHROME_VERSION_PATCH = 109; - - public const string CEF_API_HASH_UNIVERSAL = "bbdc07e7c5ed2ae5398efdebdd1ed08801bc91ab"; - - public const string CEF_API_HASH_PLATFORM_WIN = "002e3391fd68b0a444dbb6cd1b2a19a4c181d935"; - public const string CEF_API_HASH_PLATFORM_MACOS = "3e4f2433692dc8bb779314dce84b81d81d39d2c2"; - public const string CEF_API_HASH_PLATFORM_LINUX = "4e707370d08d4639c41e7c8aa8027c4a6090eace"; - } -} +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Runtime.InteropServices; + using System.Diagnostics.CodeAnalysis; + + internal static unsafe partial class libcef + { + public const string CEF_VERSION = "126.2.18+g3647d39+chromium-126.0.6478.183"; + public const int CEF_VERSION_MAJOR = 126; + public const int CEF_COMMIT_NUMBER = 3019; + public const string CEF_COMMIT_HASH = "3647d39e700c215bd78172c5964eb1c550950f0f"; + + public const int CHROME_VERSION_MAJOR = 126; + public const int CHROME_VERSION_MINOR = 0; + public const int CHROME_VERSION_BUILD = 6478; + public const int CHROME_VERSION_PATCH = 183; + + public const string CEF_API_HASH_UNIVERSAL = "ed1dfa5ff8a041241f8fb72eb7454811f358f0d3"; + + public const string CEF_API_HASH_PLATFORM_WIN = "0d99d1b9b85b2efab91a39d6fc325bb6d56fd524"; + public const string CEF_API_HASH_PLATFORM_MACOS = "e585e190387e31a71267207b66d175e213991470"; + public const string CEF_API_HASH_PLATFORM_LINUX = "09d3e280ed38f7a082b794c56ff71c52f86f0ea8"; + } +} diff --git a/CefGlue/Structs/CefAcceleratedPaintInfo.cs b/CefGlue/Structs/CefAcceleratedPaintInfo.cs new file mode 100644 index 00000000..debe34e8 --- /dev/null +++ b/CefGlue/Structs/CefAcceleratedPaintInfo.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; +using Xilium.CefGlue; +using Xilium.CefGlue.Interop; + +namespace CefGlue.Structs +{ + /// + /// + /// Structure containing shared texture information for the OnAcceleratedPaint + /// callback. Resources will be released to the underlying pool for reuse when + /// the callback returns from client code. + /// + /// + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + public unsafe struct CefAcceleratedPaintInfo + { + public nuint shared_texture_handle; + public CefColorType format; + } +} diff --git a/Directory.Build.props b/Directory.Build.props index a5aea8e2..eb7bb359 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ net8.0 net6.0;$(DefaultTargetDotnetVersion) latest - 120.1.8 + 126.2.18 120.1.8 x64;ARM64 Debug;DebugWindowlessRender;Release;ReleaseWPFAvalonia @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.203 + 126.6478.1 XiliumHQ,OutSystems CefGlue CefGlue From 61c289f40be14abf40dbaea2912cd0ae1e2c0a0d Mon Sep 17 00:00:00 2001 From: haltroy Date: Wed, 31 Jul 2024 11:16:46 +0300 Subject: [PATCH 02/14] Linux support (Final) (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add previous attempts back * Update README.md * Minor fixes - Removed unnecessary stuff on CefGlue.Common.targets - Removed removal of important Avalonia stuff on the CefGlue.Demo.Avalonia project. - Added an exception for the case of libcef not found on CefRuntime.cs (still crashes on Linux). * load libcef before version check * Update README.md * Update README.md * Linux support * Missing check _needDispose. * Fix DevTools in Linux. * Update README.md * Update README.md * Update README.md Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/AvaloniaControl.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/AvaloniaControl.cs Co-authored-by: João Neves * Update README.md * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Apply suggestions from code review Co-authored-by: João Neves * Create LINUX.md * Update README.md * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update README.md * Update README.md * Update CefGlue.CopyLocal.props Co-authored-by: João Neves * Update BrowserCefApp.cs * Update AvaloniaControl.cs * Put properties after the constructor * Apply suggestions from code review * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs * Simplified platform detection logic * Update CefRuntime.cs * Update CefGlue/CefRuntime.cs Co-authored-by: João Neves * Update CefGlue/CefRuntime.cs Co-authored-by: João Neves * Apply suggestions from code review Co-authored-by: João Neves * Update BrowserCefApp.cs --------- Co-authored-by: Shaojun Li Co-authored-by: João Neves Co-authored-by: João Neves --- .gitignore | 1 + CefGlue.Avalonia/Platform/AvaloniaControl.cs | 29 +++++-- CefGlue.Avalonia/Platform/Linux/XWindow.cs | 66 ++++++++++++++++ .../CefGlue.BrowserProcess.csproj | 6 +- .../Helpers/NativeLibsLoader.cs | 4 + CefGlue.Common/BrowserCefApp.cs | 4 + CefGlue.Common/CefGlue.Common.csproj | 4 + CefGlue.Common/CefRuntimeLoader.cs | 24 +++++- CefGlue.Common/CommonBrowserAdapter.cs | 16 +++- CefGlue.Common/build/CefGlue.Common.props | 8 +- CefGlue.Common/build/CefGlue.Common.targets | 17 +++++ CefGlue.CopyLocal.props | 17 +++-- .../CefGlue.Demo.Avalonia.csproj | 4 +- CefGlue.Packages.props | 2 + CefGlue/CefRuntime.cs | 76 ++++++++----------- Directory.Build.props | 1 + Directory.Packages.props | 3 + LINUX.md | 19 +++++ README.md | 15 +++- 19 files changed, 247 insertions(+), 69 deletions(-) create mode 100644 CefGlue.Avalonia/Platform/Linux/XWindow.cs create mode 100644 LINUX.md diff --git a/.gitignore b/.gitignore index 45520f4d..656a42d8 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ packages/ CefGlue.Interop.Gen/Classes.Handlers.tmpl/ CefGlue.Interop.Gen/Classes.Proxies.tmpl/ **/.DS_Store +*.nupkg diff --git a/CefGlue.Avalonia/Platform/AvaloniaControl.cs b/CefGlue.Avalonia/Platform/AvaloniaControl.cs index dda505d0..4ae258d8 100644 --- a/CefGlue.Avalonia/Platform/AvaloniaControl.cs +++ b/CefGlue.Avalonia/Platform/AvaloniaControl.cs @@ -7,6 +7,7 @@ using Avalonia.Input; using Avalonia.Platform; using Avalonia.Threading; +using Xilium.CefGlue.Avalonia.Platform.Linux; using Xilium.CefGlue.Avalonia.Platform.MacOS; using Xilium.CefGlue.Avalonia.Platform.Windows; using Xilium.CefGlue.Common.Helpers; @@ -54,7 +55,18 @@ protected IPlatformHandle GetHostWindowPlatformHandle() Dispatcher.UIThread.VerifyAccess(); if (_hostWindowPlatformHandle == null) { - _hostWindowPlatformHandle = new Window().TryGetPlatformHandle(); + switch (CefRuntime.Platform) + { + case CefRuntimePlatform.Windows: + _hostWindowPlatformHandle = new Window().TryGetPlatformHandle(); + break; + case CefRuntimePlatform.Linux: + // Avalonia window doesn't work. It's color depth is 32. + // We should create a x11 window with color depth 24. + // Cef creates browser window with CopyFromParent colormap, so the color depth must be same. + _hostWindowPlatformHandle = XWindow.CreateHostWindow(); + break; + } } return _hostWindowPlatformHandle; } @@ -83,7 +95,7 @@ public void OpenContextMenu(IEnumerable menuEntries, int x, int y, Ce var menu = new ContextMenu(); menu.Items.Clear(); - + foreach (var menuEntry in menuEntries) { if (menuEntry.IsSeparator) @@ -141,10 +153,17 @@ public virtual bool SetCursor(IntPtr cursorHandle, CefCursorType cursorType) public void InitializeRender(IntPtr browserHandle) { - if (CefRuntime.Platform == CefRuntimePlatform.Windows) + switch (CefRuntime.Platform) { - // store cef window handle, to dispose later - _browserView = new HostWindow(browserHandle); + case CefRuntimePlatform.Windows: + // store cef window handle, to dispose later + _browserView = new HostWindow(browserHandle); + break; + case CefRuntimePlatform.Linux: + // This window is created by cef. It should be closed when browser close. + // We shouldn't close it directly, or disposing browser will not work as expected. + _browserView = new XWindow(browserHandle); + break; } Dispatcher.UIThread.Post(() => diff --git a/CefGlue.Avalonia/Platform/Linux/XWindow.cs b/CefGlue.Avalonia/Platform/Linux/XWindow.cs new file mode 100644 index 00000000..1fc6d3ca --- /dev/null +++ b/CefGlue.Avalonia/Platform/Linux/XWindow.cs @@ -0,0 +1,66 @@ +using System; +using System.Runtime.InteropServices; +using Avalonia.Controls; +using Avalonia.Platform; + +namespace Xilium.CefGlue.Avalonia.Platform.Linux +{ + internal class XWindow : IHandleHolder, IPlatformHandle + { + [DllImport("libX11.so.6")] + private static extern int XDestroyWindow(IntPtr display, IntPtr w); + + [DllImport("libX11.so.6")] + private static extern IntPtr XOpenDisplay([MarshalAs(UnmanagedType.LPUTF8Str)] string display_name); + + [DllImport("libX11.so.6")] + private static extern IntPtr XCreateSimpleWindow(IntPtr display, IntPtr parent, int x, int y, uint width, uint height, uint border_width, UIntPtr border, UIntPtr background); + + [DllImport("libX11.so.6")] + private static extern IntPtr XDefaultRootWindow(IntPtr display); + + [DllImport("libX11.so.6")] + + private static extern int XFlush(IntPtr display); + private static IntPtr _display; + private readonly bool _needDispose; + + public XWindow(IntPtr handle) : this(handle, false) { } + + private XWindow(IntPtr handle, bool needDispose) + { + Handle = handle; + _needDispose = needDispose; + } + + public IntPtr Handle { get; } + + public string HandleDescriptor => "XWindow"; + + public static IPlatformHandle CreateHostWindow() + { + EnsureDisplay(); + var handle = XCreateSimpleWindow(_display, XDefaultRootWindow(_display), 0, 0, 100, 100, 0, (UIntPtr)0, (UIntPtr)0); + XFlush(_display); + return new XWindow(handle, true); + } + + private static void EnsureDisplay() + { + if (_display == IntPtr.Zero) + { + _display = XOpenDisplay(null); + } + } + + public void Dispose() + { + var display = _display; + if (_needDispose && display != IntPtr.Zero) + { + XDestroyWindow(display, Handle); + XFlush(display); + } + } + } +} diff --git a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj index 2f07aeea..e4a3182c 100644 --- a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj +++ b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj @@ -5,7 +5,7 @@ $(TargetDotnetVersions) Xilium.CefGlue.BrowserProcess Xilium.CefGlue.BrowserProcess - osx-x64;win-x64;osx-arm64;win-arm64 + osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64 OnOutputUpdated false Configuration=$(Configuration);Platform=$(Platform);TargetFramework=$(TargetFramework);IsPublishing=True;PublishTrimmed=True;SelfContained=True;RuntimeIdentifier= @@ -34,6 +34,10 @@ + + + + diff --git a/CefGlue.BrowserProcess/Helpers/NativeLibsLoader.cs b/CefGlue.BrowserProcess/Helpers/NativeLibsLoader.cs index 9396ef38..3bf150be 100644 --- a/CefGlue.BrowserProcess/Helpers/NativeLibsLoader.cs +++ b/CefGlue.BrowserProcess/Helpers/NativeLibsLoader.cs @@ -25,6 +25,10 @@ public static void Install() case CefRuntimePlatform.Windows: extension = "dll"; break; + + case CefRuntimePlatform.Linux: + extension = "so"; + break; } AssemblyLoadContext.Default.ResolvingUnmanagedDll += (_, libName) => diff --git a/CefGlue.Common/BrowserCefApp.cs b/CefGlue.Common/BrowserCefApp.cs index 10b4f4b7..4bcc74a9 100644 --- a/CefGlue.Common/BrowserCefApp.cs +++ b/CefGlue.Common/BrowserCefApp.cs @@ -21,6 +21,10 @@ protected override void OnBeforeCommandLineProcessing(string processType, CefCom { if (string.IsNullOrEmpty(processType)) { + if (CefRuntime.Platform == CefRuntimePlatform.Linux) + { + commandLine.AppendSwitch("no-zygote"); + } if (CefRuntimeLoader.IsOSREnabled) { commandLine.AppendSwitch("disable-gpu", "1"); diff --git a/CefGlue.Common/CefGlue.Common.csproj b/CefGlue.Common/CefGlue.Common.csproj index de922f26..62187d9b 100644 --- a/CefGlue.Common/CefGlue.Common.csproj +++ b/CefGlue.Common/CefGlue.Common.csproj @@ -59,6 +59,10 @@ bin\$(TargetFramework)\win-$(ArchitectureConfig) + + + bin\linux-$(ArchitectureConfig) + bin\$(TargetFramework)\osx-$(ArchitectureConfig) diff --git a/CefGlue.Common/CefRuntimeLoader.cs b/CefGlue.Common/CefRuntimeLoader.cs index 9f08ba7f..5f7e9d25 100644 --- a/CefGlue.Common/CefRuntimeLoader.cs +++ b/CefGlue.Common/CefRuntimeLoader.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Collections.Generic; using System.IO; +using System.Diagnostics; using System.Reflection; using Xilium.CefGlue.Common.Handlers; using Xilium.CefGlue.Common.Shared; @@ -11,7 +12,7 @@ namespace Xilium.CefGlue.Common public static class CefRuntimeLoader { private const string DefaultBrowserProcessDirectory = "CefGlueBrowserProcess"; - + private static Action _delayedInitialization; public static void Initialize(CefSettings settings = null, KeyValuePair[] flags = null, CustomScheme[] customSchemes = null) @@ -58,12 +59,25 @@ private static void InternalInitialize(CefSettings settings = null, KeyValuePair settings.FrameworkDirPath = basePath; settings.ResourcesDirPath = resourcesPath; break; + + case CefRuntimePlatform.Linux: + settings.NoSandbox = true; + settings.MultiThreadedMessageLoop = true; + break; } AppDomain.CurrentDomain.ProcessExit += delegate { CefRuntime.Shutdown(); }; IsOSREnabled = settings.WindowlessRenderingEnabled; - CefRuntime.Initialize(new CefMainArgs(new string[0]), settings, new BrowserCefApp(customSchemes, flags, browserProcessHandler), IntPtr.Zero); + + // On Linux, with osr disable, the filename in CefMainArgs will be used as accessible name. + // If the name is empty, chromium will crash at ui::AXNodeData:SetNamechecked. + var exeFileName = Process.GetCurrentProcess().MainModule.FileName; + if (string.IsNullOrEmpty(exeFileName)) + { + exeFileName = "CefGlue"; + } + CefRuntime.Initialize(new CefMainArgs(new[] { exeFileName }), settings, new BrowserCefApp(customSchemes, flags, browserProcessHandler), IntPtr.Zero); if (customSchemes != null) { @@ -102,8 +116,10 @@ internal static void Load(BrowserProcessHandler browserProcessHandler = null) internal static bool IsOSREnabled { get; private set; } - private static string BrowserProcessFileName { - get { + private static string BrowserProcessFileName + { + get + { const string Filename = "Xilium.CefGlue.BrowserProcess"; switch (CefRuntime.Platform) { diff --git a/CefGlue.Common/CommonBrowserAdapter.cs b/CefGlue.Common/CommonBrowserAdapter.cs index bd554cf8..defe822b 100644 --- a/CefGlue.Common/CommonBrowserAdapter.cs +++ b/CefGlue.Common/CommonBrowserAdapter.cs @@ -173,8 +173,8 @@ private void NavigateTo(string url) // Remove leading whitespace from the URL url = url.TrimStart(); - /// to play safe, load url must be called after which runs on CefThreadId.UI, - /// otherwise the navigation will be aborted + // to play safe, load url must be called after OnBrowserCreated(CefBrowser) which runs on CefThreadId.UI, + // otherwise the navigation will be aborted ActionTask.Run(() => { if (IsInitialized) @@ -254,9 +254,11 @@ public Task EvaluateJavaScript(string code, string url, int line, CefFrame public void ShowDeveloperTools() { var windowInfo = CefWindowInfo.Create(); - if (CefRuntime.Platform != CefRuntimePlatform.MacOS) + + if (CefRuntime.Platform == CefRuntimePlatform.Windows) { - // don't know why but I can't do this on macosx + // This function set ParentHandle (owner in Windows) and set Bounds to CW_USERDEFAULT (only works on Windows). + // So, it should be called only in Windows. windowInfo.SetAsPopup(BrowserHost?.GetWindowHandle() ?? IntPtr.Zero, "DevTools"); } @@ -484,6 +486,12 @@ protected virtual bool OnBrowserClose(CefBrowser browser) Control.DestroyRender(); Cleanup(browser); + if (CefRuntime.Platform == CefRuntimePlatform.Linux) + { + // On Linux, we should return false to let cef close the browser window. + // We shouldn't close the window directly, or disposing browser will not work as expected. + return false; + } return true; } diff --git a/CefGlue.Common/build/CefGlue.Common.props b/CefGlue.Common/build/CefGlue.Common.props index 1cc9a538..e4173245 100644 --- a/CefGlue.Common/build/CefGlue.Common.props +++ b/CefGlue.Common/build/CefGlue.Common.props @@ -1,7 +1,7 @@ - osx-x64;win-x64;osx-arm64;win-arm64 + osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64 @@ -10,6 +10,12 @@ win-arm64 win-x64 + + + linux-x64 + linux-arm64 + linux-x64 + diff --git a/CefGlue.Common/build/CefGlue.Common.targets b/CefGlue.Common/build/CefGlue.Common.targets index bd71af83..a4997064 100644 --- a/CefGlue.Common/build/CefGlue.Common.targets +++ b/CefGlue.Common/build/CefGlue.Common.targets @@ -41,6 +41,23 @@ + + + false + $(OutputDirectory)$(CefGlueBrowserProcessDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + PreserveNewest + Included + + + false + $(OutputDirectory)$(CefGlueBrowserProcessDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + PreserveNewest + Included + + + false diff --git a/CefGlue.CopyLocal.props b/CefGlue.CopyLocal.props index 88ec0599..642bc3c0 100644 --- a/CefGlue.CopyLocal.props +++ b/CefGlue.CopyLocal.props @@ -1,13 +1,18 @@ - -windows win-x64 win-arm64 + + + linux-x64 + linux-arm64 + + osx-x64 @@ -19,15 +24,17 @@ - $(MSBuildThisFileDirectory)CefGlue.BrowserProcess\bin\$(Platform)\$(Configuration)\$(OperatingSystemAgnosticTargetFramework) - osx-x64;win-x64;osx-arm64;win-arm64 + + $(MSBuildThisFileDirectory)CefGlue.BrowserProcess\bin\$(Platform)\$(Configuration)\$(OperatingSystemAgnosticTargetFramework) + osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64 - + - + \ No newline at end of file diff --git a/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj b/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj index 1174aaa9..568c7d02 100644 --- a/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj +++ b/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj @@ -11,7 +11,6 @@ - $(DefineConstants);WINDOWLESS @@ -28,7 +27,6 @@ NSApplication true - @@ -46,4 +44,4 @@ - + \ No newline at end of file diff --git a/CefGlue.Packages.props b/CefGlue.Packages.props index 13e0e08e..34f8510a 100644 --- a/CefGlue.Packages.props +++ b/CefGlue.Packages.props @@ -3,10 +3,12 @@ + + \ No newline at end of file diff --git a/CefGlue/CefRuntime.cs b/CefGlue/CefRuntime.cs index ebded169..4e666e6b 100644 --- a/CefGlue/CefRuntime.cs +++ b/CefGlue/CefRuntime.cs @@ -1,4 +1,7 @@ -namespace Xilium.CefGlue +using System.IO; +using System.Linq; + +namespace Xilium.CefGlue { using System; using System.Collections.Generic; @@ -22,46 +25,24 @@ static CefRuntime() #region Platform Detection private static CefRuntimePlatform DetectPlatform() { - var platformId = Environment.OSVersion.Platform; - - if (platformId == PlatformID.MacOSX) - return CefRuntimePlatform.MacOS; - - int p = (int)platformId; - if ((p == 4) || (p == 128)) - return IsRunningOnMac() ? CefRuntimePlatform.MacOS : CefRuntimePlatform.Linux; - - return CefRuntimePlatform.Windows; - } - - //From Managed.Windows.Forms/XplatUI - private static bool IsRunningOnMac() - { - IntPtr buf = IntPtr.Zero; - try + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - buf = Marshal.AllocHGlobal(8192); - // This is a hacktastic way of getting sysname from uname () - if (uname(buf) == 0) - { - string os = Marshal.PtrToStringAnsi(buf); - if (os == "Darwin") - return true; - } + return CefRuntimePlatform.Windows; } - catch { } - finally + + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + { + return CefRuntimePlatform.MacOS; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { - if (buf != IntPtr.Zero) - Marshal.FreeHGlobal(buf); + return CefRuntimePlatform.Linux; } - return false; + throw new PlatformNotSupportedException(); } - [DllImport("libc")] - private static extern int uname(IntPtr buf); - public static CefRuntimePlatform Platform { get { return _platform; } @@ -133,6 +114,17 @@ private static void CheckVersion() private static void CheckVersionByApiHash() { + // We need to load libCEF.so before getting API Hash on Linux. + if (Platform == CefRuntimePlatform.Linux) + { + // find all the libcef.so files inside the application folder and its subfolders + var libCefFile = Directory.EnumerateFiles(AppDomain.CurrentDomain.BaseDirectory, libcef.DllName + ".so", SearchOption.AllDirectories).FirstOrDefault(); + + // if found, load the first one. + if (libCefFile != null) + NativeLibrary.TryLoad(libCefFile, out _); + } + // get CEF_API_HASH_PLATFORM string actual; try @@ -144,10 +136,14 @@ private static void CheckVersionByApiHash() { throw new NotSupportedException("cef_api_hash call is not supported.", ex); } + catch (DllNotFoundException dllEx) + { + throw new NotSupportedException($"Can't find CEF in \"{AppDomain.CurrentDomain.BaseDirectory}\"", dllEx); + } if (string.IsNullOrEmpty(actual)) throw new NotSupportedException(); string expected; - switch (CefRuntime.Platform) + switch (Platform) { case CefRuntimePlatform.Windows: expected = libcef.CEF_API_HASH_PLATFORM_WIN; break; case CefRuntimePlatform.MacOS: expected = libcef.CEF_API_HASH_PLATFORM_MACOS; break; @@ -1095,15 +1091,5 @@ private static void LoadIfNeed() { if (!_loaded) Load(); } - - #region linux - - ///// - //// Return the singleton X11 display shared with Chromium. The display is not - //// thread-safe and must only be accessed on the browser process UI thread. - ///// - //CEF_EXPORT XDisplay* cef_get_xdisplay(); - - #endregion } } diff --git a/Directory.Build.props b/Directory.Build.props index eb7bb359..6c251ea4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,6 +6,7 @@ latest 126.2.18 120.1.8 + 120.1.8 x64;ARM64 Debug;DebugWindowlessRender;Release;ReleaseWPFAvalonia diff --git a/Directory.Packages.props b/Directory.Packages.props index e64e8552..a19c466a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,6 +28,9 @@ + + + diff --git a/LINUX.md b/LINUX.md new file mode 100644 index 00000000..751d5c5f --- /dev/null +++ b/LINUX.md @@ -0,0 +1,19 @@ +# Linux + +While porting CefGlue to Linux we tested on these platforms and confirmed to be working: + + - Arch Linux (rolling release, packages up-to-date as on 29 July 2024) on x64 + - Debian 12 on x64 + - Kylin V10 on ARM64 (see issues below) + +## ARM64 Issues + +We have not found the işsue why dynamic loading CEF is failing with "cannot allocate memory in static TLS block" and currently our guess is that CLR uses too much TLS. +Loading CEf with `LD_PRELOAD` environment variable works but needs to load HarfBuzzSharp first (`LD_PRELOAD=/path/to/libHarfBuzzSharp.so:/path/to/libcef.so`). + +One can also modify the ELF files using these commands before running their CefGlue application for CEF to load correctly: +````bash +patchelf --add-needed libHarfBuzzSharp.so --add-needed libcef.so path/to/Xilium.CefGlue.Demo.Avalonia +patchelf --add-needed libcef.so path/to/Xilium.CefGlue.BrowserProcess +# Browser process doesn't use Avalonia, so there's no need to add libHarfBuzzSharp.so +```` diff --git a/README.md b/README.md index 310a0d36..8bbdb10c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,20 @@ CefGlue lets you embed Chromium in .NET apps. It is a .NET wrapper control around the Chromium Embedded Framework ([CEF](https://bitbucket.org/chromiumembedded/cef/src/master/)). It can be used from C# or any other CLR language and provides both Avalonia and WPF web browser control implementations. -The Avalonia implementation runs on Windows and macOS. Linux is not supported yet. + +Here's a table for supported architectures, frameworks and operating systems: + +| OS | x64 | ARM64 | WPF | Avalonia | +|---------|-----|-------|-----|----------| +| Windows | ✔️ | ✔️ | ✔️ | ✔️ | +| macOS | ✔️ | ✔️ | ❌ | ✔️ | +| Linux | ✔️ | 🔘 | ❌ | ✔️ | + +✔️ Supported +❌ Not supported +🔘 Works with issues. + +See [LINUX.md](./LINUX.md) for more information about issues and tested distribution list. Currently only x64 and ARM64 architectures are supported. From c72bda2839d1fbc88f22ead193e693d63088cc47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neves?= Date: Wed, 31 Jul 2024 09:29:02 +0100 Subject: [PATCH 03/14] Raise version (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add previous attempts back * Update README.md * Minor fixes - Removed unnecessary stuff on CefGlue.Common.targets - Removed removal of important Avalonia stuff on the CefGlue.Demo.Avalonia project. - Added an exception for the case of libcef not found on CefRuntime.cs (still crashes on Linux). * load libcef before version check * Update README.md * Update README.md * Linux support * Missing check _needDispose. * Fix DevTools in Linux. * Update README.md * Update README.md * Update README.md Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/AvaloniaControl.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/AvaloniaControl.cs Co-authored-by: João Neves * Update README.md * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Apply suggestions from code review Co-authored-by: João Neves * Create LINUX.md * Update README.md * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs Co-authored-by: João Neves * Update README.md * Update README.md * Update CefGlue.CopyLocal.props Co-authored-by: João Neves * Update BrowserCefApp.cs * Update AvaloniaControl.cs * Put properties after the constructor * Apply suggestions from code review * Update CefGlue.Avalonia/Platform/Linux/XWindow.cs * Simplified platform detection logic * Update CefRuntime.cs * Update CefGlue/CefRuntime.cs Co-authored-by: João Neves * Update CefGlue/CefRuntime.cs Co-authored-by: João Neves * Fix build and update packages * Raise version --------- Co-authored-by: haltroy Co-authored-by: Shaojun Li --- CefGlue/CefRuntime.cs | 11 +++++------ Directory.Build.props | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CefGlue/CefRuntime.cs b/CefGlue/CefRuntime.cs index 4e666e6b..ecd08a37 100644 --- a/CefGlue/CefRuntime.cs +++ b/CefGlue/CefRuntime.cs @@ -1,13 +1,10 @@ -using System.IO; -using System.Linq; - -namespace Xilium.CefGlue +namespace Xilium.CefGlue { using System; - using System.Collections.Generic; + using System.IO; + using System.Linq; using System.Globalization; using System.Runtime.InteropServices; - using System.Text; using Xilium.CefGlue.Interop; public static unsafe class CefRuntime @@ -122,7 +119,9 @@ private static void CheckVersionByApiHash() // if found, load the first one. if (libCefFile != null) + { NativeLibrary.TryLoad(libCefFile, out _); + } } // get CEF_API_HASH_PLATFORM diff --git a/Directory.Build.props b/Directory.Build.props index 6c251ea4..6b705e98 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ net8.0 net6.0;$(DefaultTargetDotnetVersion) latest - 126.2.18 + 120.1.8 120.1.8 120.1.8 x64;ARM64 @@ -13,7 +13,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 126.6478.1 + 120.6099.204 XiliumHQ,OutSystems CefGlue CefGlue From dc6a24ff1537b193b5f17460789bf61192dcf27c Mon Sep 17 00:00:00 2001 From: Miguel Alves Date: Tue, 3 Sep 2024 15:47:20 +0100 Subject: [PATCH 04/14] Single targeting .NET 8 in CefGlue (#159) * Single targetting .NET 8 in CefGlue * Update CefGlue.CopyLocal.props * Increased timeout --- CefGlue.Avalonia/CefGlue.Avalonia.csproj | 2 +- CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj | 2 +- CefGlue.Common.Shared/CefGlue.Common.Shared.csproj | 2 +- CefGlue.Common/CefGlue.Common.csproj | 10 +++++----- CefGlue.Common/build/CefGlue.Common.props | 8 +------- CefGlue.CopyLocal.props | 11 ++--------- CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj | 2 +- CefGlue.Demo.WPF/CefGlue.Demo.WPF.csproj | 3 +-- CefGlue.Tests/CefGlue.Tests.csproj | 2 +- CefGlue.Tests/Properties/AssemblyInfo.cs | 2 +- CefGlue.WPF/CefGlue.WPF.csproj | 2 +- CefGlue/CefGlue.csproj | 2 +- Directory.Build.props | 5 ++--- 13 files changed, 19 insertions(+), 34 deletions(-) diff --git a/CefGlue.Avalonia/CefGlue.Avalonia.csproj b/CefGlue.Avalonia/CefGlue.Avalonia.csproj index 2f334a6b..90db6b3b 100644 --- a/CefGlue.Avalonia/CefGlue.Avalonia.csproj +++ b/CefGlue.Avalonia/CefGlue.Avalonia.csproj @@ -1,7 +1,7 @@  - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue.Avalonia Xilium.CefGlue.Avalonia true diff --git a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj index e4a3182c..cbc69938 100644 --- a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj +++ b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj @@ -2,7 +2,7 @@ WinExe - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue.BrowserProcess Xilium.CefGlue.BrowserProcess osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64 diff --git a/CefGlue.Common.Shared/CefGlue.Common.Shared.csproj b/CefGlue.Common.Shared/CefGlue.Common.Shared.csproj index 262c5f84..4b4ae342 100644 --- a/CefGlue.Common.Shared/CefGlue.Common.Shared.csproj +++ b/CefGlue.Common.Shared/CefGlue.Common.Shared.csproj @@ -1,7 +1,7 @@ - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue.Common.Shared Xilium.CefGlue.Common.Shared diff --git a/CefGlue.Common/CefGlue.Common.csproj b/CefGlue.Common/CefGlue.Common.csproj index 62187d9b..8af70f78 100644 --- a/CefGlue.Common/CefGlue.Common.csproj +++ b/CefGlue.Common/CefGlue.Common.csproj @@ -2,7 +2,7 @@ - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue.Common Xilium.CefGlue.Common true @@ -56,16 +56,16 @@ - - bin\$(TargetFramework)\win-$(ArchitectureConfig) + + bin\win-$(ArchitectureConfig) bin\linux-$(ArchitectureConfig) - - bin\$(TargetFramework)\osx-$(ArchitectureConfig) + + bin\osx-$(ArchitectureConfig) diff --git a/CefGlue.Common/build/CefGlue.Common.props b/CefGlue.Common/build/CefGlue.Common.props index e4173245..c59a49d0 100644 --- a/CefGlue.Common/build/CefGlue.Common.props +++ b/CefGlue.Common/build/CefGlue.Common.props @@ -5,7 +5,6 @@ - -windows win-x64 win-arm64 win-x64 @@ -18,7 +17,6 @@ - osx-x64 osx-arm64 osx-arm64 @@ -28,11 +26,7 @@ $(RuntimeIdentifier) - - $(TargetFramework) - - - + diff --git a/CefGlue.CopyLocal.props b/CefGlue.CopyLocal.props index 642bc3c0..7c31b9b1 100644 --- a/CefGlue.CopyLocal.props +++ b/CefGlue.CopyLocal.props @@ -1,31 +1,24 @@ + - -windows win-x64 win-arm64 - linux-x64 linux-arm64 - osx-x64 osx-arm64 - - $(TargetFramework) - - - - $(MSBuildThisFileDirectory)CefGlue.BrowserProcess\bin\$(Platform)\$(Configuration)\$(OperatingSystemAgnosticTargetFramework) + $(MSBuildThisFileDirectory)CefGlue.BrowserProcess\bin\$(Platform)\$(Configuration)\$(DotnetVersion) osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64 diff --git a/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj b/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj index 568c7d02..96af4d77 100644 --- a/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj +++ b/CefGlue.Demo.Avalonia/CefGlue.Demo.Avalonia.csproj @@ -3,7 +3,7 @@ WinExe LatestMajor - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue.Demo.Avalonia Xilium.CefGlue.Demo.Avalonia Major diff --git a/CefGlue.Demo.WPF/CefGlue.Demo.WPF.csproj b/CefGlue.Demo.WPF/CefGlue.Demo.WPF.csproj index 96ec7fd5..c2b5b960 100644 --- a/CefGlue.Demo.WPF/CefGlue.Demo.WPF.csproj +++ b/CefGlue.Demo.WPF/CefGlue.Demo.WPF.csproj @@ -2,8 +2,7 @@ WinExe - $(DefaultTargetDotnetVersion) - $(DefaultTargetDotnetVersion)-windows + $(DotnetVersion)-windows Xilium.CefGlue.Demo.WPF Xilium.CefGlue.Demo.WPF true diff --git a/CefGlue.Tests/CefGlue.Tests.csproj b/CefGlue.Tests/CefGlue.Tests.csproj index c0d03451..8c4c3b12 100644 --- a/CefGlue.Tests/CefGlue.Tests.csproj +++ b/CefGlue.Tests/CefGlue.Tests.csproj @@ -1,7 +1,7 @@  - $(TargetDotnetVersions) + $(DotnetVersion) false diff --git a/CefGlue.Tests/Properties/AssemblyInfo.cs b/CefGlue.Tests/Properties/AssemblyInfo.cs index 921a5361..559c4b55 100644 --- a/CefGlue.Tests/Properties/AssemblyInfo.cs +++ b/CefGlue.Tests/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ using NUnit.Framework; #if !DEBUG -[assembly: Timeout(10000)] +[assembly: Timeout(30000)] #endif \ No newline at end of file diff --git a/CefGlue.WPF/CefGlue.WPF.csproj b/CefGlue.WPF/CefGlue.WPF.csproj index 60a90bbb..15ae2475 100644 --- a/CefGlue.WPF/CefGlue.WPF.csproj +++ b/CefGlue.WPF/CefGlue.WPF.csproj @@ -1,7 +1,7 @@  - $(DefaultTargetDotnetVersion)-windows + $(DotnetVersion)-windows Library Xilium.CefGlue.WPF Xilium.CefGlue.WPF diff --git a/CefGlue/CefGlue.csproj b/CefGlue/CefGlue.csproj index 95b68bad..8a82e7ea 100644 --- a/CefGlue/CefGlue.csproj +++ b/CefGlue/CefGlue.csproj @@ -1,7 +1,7 @@  - $(TargetDotnetVersions) + $(DotnetVersion) Xilium.CefGlue true diff --git a/Directory.Build.props b/Directory.Build.props index 6b705e98..240ea6dc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,7 @@ - net8.0 - net6.0;$(DefaultTargetDotnetVersion) + net8.0 latest 120.1.8 120.1.8 @@ -13,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.204 + 120.6099.205 XiliumHQ,OutSystems CefGlue CefGlue From b2150f2e672f0976db3574132dec7eb448acdd9c Mon Sep 17 00:00:00 2001 From: Berkan Sasmaz Date: Thu, 26 Sep 2024 15:56:06 +0300 Subject: [PATCH 05/14] Update LINUX.md (#166) --- LINUX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LINUX.md b/LINUX.md index 751d5c5f..878beec8 100644 --- a/LINUX.md +++ b/LINUX.md @@ -1,6 +1,6 @@ # Linux -While porting CefGlue to Linux we tested on these platforms and confirmed to be working: +While porting CefGlue to Linux we tested on these platforms and confirmed it to be working: - Arch Linux (rolling release, packages up-to-date as on 29 July 2024) on x64 - Debian 12 on x64 @@ -8,7 +8,7 @@ While porting CefGlue to Linux we tested on these platforms and confirmed to be ## ARM64 Issues -We have not found the işsue why dynamic loading CEF is failing with "cannot allocate memory in static TLS block" and currently our guess is that CLR uses too much TLS. +We have not found the issue why dynamic loading CEF is failing with "cannot allocate memory in static TLS block" and currently our guess is that CLR uses too much TLS. Loading CEf with `LD_PRELOAD` environment variable works but needs to load HarfBuzzSharp first (`LD_PRELOAD=/path/to/libHarfBuzzSharp.so:/path/to/libcef.so`). One can also modify the ELF files using these commands before running their CefGlue application for CEF to load correctly: From b80cd246b73c934576bd772b03ae340dc47e31cd Mon Sep 17 00:00:00 2001 From: Tiago Braga Date: Fri, 18 Oct 2024 14:37:55 +0100 Subject: [PATCH 06/14] Increase stack size in windows OS (#171) * Increase stack size for cef browser * testing pipelines * testing pipelines * testing pipelines * Test ADO * Test ADO * Test ADO * Test ADO * Test ADO * Test ADO * PR improvements * Enable by default * Increase version * Check dirs on pipelines * Debug pipelines * Debug pipelines without sdk attr * Debug pipelines with sdk attr * Comment out code * revert * revert * dumpbin * Add edit bin * Parameterize exe name * Revert changes --- .../CefGlue.BrowserProcess.csproj | 33 +++++++++++++++---- Directory.Build.props | 2 +- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj index cbc69938..f1de4017 100644 --- a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj +++ b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj @@ -9,6 +9,7 @@ OnOutputUpdated false Configuration=$(Configuration);Platform=$(Platform);TargetFramework=$(TargetFramework);IsPublishing=True;PublishTrimmed=True;SelfContained=True;RuntimeIdentifier= + True @@ -27,19 +28,39 @@ - - + + + + + vcvars64.bat + vcvarsamd64_arm64.bat + $(DevEnvDir)..\..\VC\Auxiliary\Build\ + C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\ + True + + + + + + + - + - - + + - + diff --git a/Directory.Build.props b/Directory.Build.props index 240ea6dc..a26b1b85 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.205 + 120.6099.206 XiliumHQ,OutSystems CefGlue CefGlue From af1834e192d5868f2fe4b297efa4a30461fdc34a Mon Sep 17 00:00:00 2001 From: Tiago Braga Date: Mon, 21 Oct 2024 12:04:40 +0100 Subject: [PATCH 07/14] Increase stack size in windows OS (fixes #171) (#172) * Fix published artifacts * Raise version * Review comments --- .../CefGlue.BrowserProcess.csproj | 14 ++++++++------ Directory.Build.props | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj index f1de4017..5a233ba3 100644 --- a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj +++ b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj @@ -29,31 +29,33 @@ - + vcvars64.bat - vcvarsamd64_arm64.bat $(DevEnvDir)..\..\VC\Auxiliary\Build\ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\ True + $(ProjectDir)$(BaseIntermediateOutputPath)$(Platform)\$(Configuration)\$(TargetFramework)\ + $(ApphostLocation)$(RuntimeIdentifier)\ - + - + - + diff --git a/Directory.Build.props b/Directory.Build.props index a26b1b85..2c95d553 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.206 + 120.6099.207 XiliumHQ,OutSystems CefGlue CefGlue From 2950e119c80d32c5160e16f480027b78bacbd7bf Mon Sep 17 00:00:00 2001 From: Tiago Braga Date: Mon, 28 Oct 2024 14:49:01 +0000 Subject: [PATCH 08/14] Fix nuget restore and parameterize build (#174) * Fix nuget restore and parameterize build * Add comment * Fix command * PR improvements * Raise version --- .../CefGlue.BrowserProcess.csproj | 13 +++++-------- Directory.Build.props | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj index 5a233ba3..298bf60f 100644 --- a/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj +++ b/CefGlue.BrowserProcess/CefGlue.BrowserProcess.csproj @@ -29,17 +29,15 @@ - + - vcvars64.bat - $(DevEnvDir)..\..\VC\Auxiliary\Build\ - C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\ - True $(ProjectDir)$(BaseIntermediateOutputPath)$(Platform)\$(Configuration)\$(TargetFramework)\ $(ApphostLocation)$(RuntimeIdentifier)\ @@ -47,9 +45,8 @@ - + diff --git a/Directory.Build.props b/Directory.Build.props index 2c95d553..27bba717 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.207 + 120.6099.208 XiliumHQ,OutSystems CefGlue CefGlue From 38385a16edb1783458a756214196eed4f6ce7a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neves?= Date: Mon, 28 Oct 2024 15:42:46 +0000 Subject: [PATCH 09/14] Fix demo when launching multiple times (#175) * Fix demo when launching multiple times * Add comment * Fix wpf demo --- CefGlue.Demo.Avalonia/Program.cs | 34 ++++++++++++++++++++++++++------ CefGlue.Demo.WPF/Program.cs | 24 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/CefGlue.Demo.Avalonia/Program.cs b/CefGlue.Demo.Avalonia/Program.cs index 424dfe41..232cb58b 100644 --- a/CefGlue.Demo.Avalonia/Program.cs +++ b/CefGlue.Demo.Avalonia/Program.cs @@ -1,4 +1,5 @@ -using System.Runtime.InteropServices; +using System; +using System.IO; using Avalonia; using Xilium.CefGlue.Common; using Xilium.CefGlue.Common.Shared; @@ -10,14 +11,19 @@ class Program static int Main(string[] args) { + // generate a unique cache path to avoid problems when launching more than one process + // https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=19665 + var cachePath = Path.Combine(Path.GetTempPath(), "CefGlue_" + Guid.NewGuid().ToString().Replace("-", null)); + + AppDomain.CurrentDomain.ProcessExit += delegate { Cleanup(cachePath); }; + AppBuilder.Configure() .UsePlatformDetect() - .With(new Win32PlatformOptions() - { - // CompositionMode = new [] { Win32CompositionMode.WinUIComposition } - }) + .With(new Win32PlatformOptions()) .AfterSetup(_ => CefRuntimeLoader.Initialize(new CefSettings() { -#if WINDOWLESS + RootCachePath = cachePath, +#if WINDOWLESS + // its recommended to leave this off (false), since its less performant and can cause more issues WindowlessRenderingEnabled = true #else WindowlessRenderingEnabled = false @@ -34,5 +40,21 @@ static int Main(string[] args) return 0; } + + private static void Cleanup(string cachePath) + { + CefRuntime.Shutdown(); // must shutdown cef to free cache files (so that cleanup is able to delete files) + + try { + var dirInfo = new DirectoryInfo(cachePath); + if (dirInfo.Exists) { + dirInfo.Delete(true); + } + } catch (UnauthorizedAccessException) { + // ignore + } catch (IOException) { + // ignore + } + } } } diff --git a/CefGlue.Demo.WPF/Program.cs b/CefGlue.Demo.WPF/Program.cs index 6627f1b6..34bd0bcb 100644 --- a/CefGlue.Demo.WPF/Program.cs +++ b/CefGlue.Demo.WPF/Program.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Xilium.CefGlue.Common; namespace Xilium.CefGlue.Demo.WPF @@ -8,9 +9,16 @@ internal static class Program [STAThread] private static int Main(string[] args) { + // generate a unique cache path to avoid problems when launching more than one process + // https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=19665 + var cachePath = Path.Combine(Path.GetTempPath(), "CefGlue_" + Guid.NewGuid().ToString().Replace("-", null)); + + AppDomain.CurrentDomain.ProcessExit += delegate { Cleanup(cachePath); }; + var settings = new CefSettings() { #if WINDOWLESS + // its recommended to leave this off (false), since its less performant and can cause more issues WindowlessRenderingEnabled = true #else WindowlessRenderingEnabled = false @@ -24,5 +32,21 @@ private static int Main(string[] args) return 0; } + + private static void Cleanup(string cachePath) + { + CefRuntime.Shutdown(); // must shutdown cef to free cache files (so that cleanup is able to delete files) + + try { + var dirInfo = new DirectoryInfo(cachePath); + if (dirInfo.Exists) { + dirInfo.Delete(true); + } + } catch (UnauthorizedAccessException) { + // ignore + } catch (IOException) { + // ignore + } + } } } From e7cac1f631e332246e2cafc4ed623338b83139be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neves?= Date: Mon, 28 Oct 2024 15:44:54 +0000 Subject: [PATCH 10/14] Missing cache path set (#176) --- CefGlue.Demo.WPF/Program.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CefGlue.Demo.WPF/Program.cs b/CefGlue.Demo.WPF/Program.cs index 34bd0bcb..aa150243 100644 --- a/CefGlue.Demo.WPF/Program.cs +++ b/CefGlue.Demo.WPF/Program.cs @@ -17,6 +17,7 @@ private static int Main(string[] args) var settings = new CefSettings() { + RootCachePath = cachePath, #if WINDOWLESS // its recommended to leave this off (false), since its less performant and can cause more issues WindowlessRenderingEnabled = true From 507bdf303f74719f2df4d95a0bbfd6852111c643 Mon Sep 17 00:00:00 2001 From: Tiago Braga Date: Mon, 28 Oct 2024 17:21:22 +0000 Subject: [PATCH 11/14] Raise version (#177) --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 27bba717..4db07904 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.208 + 120.6099.209 XiliumHQ,OutSystems CefGlue CefGlue From d6c44e74cdc0b16595692ec2e4cf020a8ea4568d Mon Sep 17 00:00:00 2001 From: yangxuilyx <845243610@qq.com> Date: Wed, 6 Nov 2024 22:29:39 +0800 Subject: [PATCH 12/14] add windows cef locales file (#179) * add windows cef locales file * add windows cef locales file for demo * fix tabs --------- Co-authored-by: yangxuilyx --- CefGlue.Common/build/CefGlue.Common.targets | 15 +++++++++++++++ CefGlue.Packages.props | 4 ++++ Directory.Packages.props | 1 + 3 files changed, 20 insertions(+) diff --git a/CefGlue.Common/build/CefGlue.Common.targets b/CefGlue.Common/build/CefGlue.Common.targets index a4997064..bfdcecb3 100644 --- a/CefGlue.Common/build/CefGlue.Common.targets +++ b/CefGlue.Common/build/CefGlue.Common.targets @@ -82,5 +82,20 @@ Included + + + + false + runtimes\win-x64\native\locales\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + + + false + runtimes\win-arm64\native\locales\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + + diff --git a/CefGlue.Packages.props b/CefGlue.Packages.props index 34f8510a..74453cb3 100644 --- a/CefGlue.Packages.props +++ b/CefGlue.Packages.props @@ -11,4 +11,8 @@ + + + + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index a19c466a..77b40a34 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,6 +25,7 @@ + From 1ced728a41c1242b0cac5a0e2f008ee12bb54c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Neves?= Date: Thu, 7 Nov 2024 16:24:11 +0000 Subject: [PATCH 13/14] Fix crash accessing youtube (#184) --- CefGlue.Common/CefRuntimeLoader.cs | 12 ++++++++++++ Directory.Build.props | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CefGlue.Common/CefRuntimeLoader.cs b/CefGlue.Common/CefRuntimeLoader.cs index 5f7e9d25..685ed4a9 100644 --- a/CefGlue.Common/CefRuntimeLoader.cs +++ b/CefGlue.Common/CefRuntimeLoader.cs @@ -77,6 +77,18 @@ private static void InternalInitialize(CefSettings settings = null, KeyValuePair { exeFileName = "CefGlue"; } + + // Fix crash with youtube https://github.com/chromiumembedded/cef/issues/3643 + { +#if DEBUG + if (CefRuntime.ChromeVersion.Split(".").First() != "120") + { + throw new Exception("Remove this fix block after CEF upgrade"); + } +#endif + flags = (flags ?? []).Append(KeyValuePair.Create("disable-features", "FirstPartySets")).ToArray(); + } + CefRuntime.Initialize(new CefMainArgs(new[] { exeFileName }), settings, new BrowserCefApp(customSchemes, flags, browserProcessHandler), IntPtr.Zero); if (customSchemes != null) diff --git a/Directory.Build.props b/Directory.Build.props index 4db07904..74123bd5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.209 + 120.6099.210 XiliumHQ,OutSystems CefGlue CefGlue From c39e38a8530c6e83fdc21ca4b449de49f567111a Mon Sep 17 00:00:00 2001 From: Vasil Rimar <5660247+vrimar@users.noreply.github.com> Date: Sun, 21 Jul 2024 18:21:34 -0400 Subject: [PATCH 14/14] Update to cef_binary_126.2.18+g3647d39+chromium-126.0.6478.183 --- Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 74123bd5..40d8fac0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ net8.0 latest - 120.1.8 + 126.2.18 120.1.8 120.1.8 x64;ARM64 @@ -12,7 +12,7 @@ $(MSBuildProjectDirectory)\..\Nuget\output - 120.6099.210 + 126.6478.1 XiliumHQ,OutSystems CefGlue CefGlue