From 0f6a83e1a33397df0e0b0f0444a350a1249d090e Mon Sep 17 00:00:00 2001 From: mattkol Date: Wed, 22 Jul 2020 18:20:03 -0500 Subject: [PATCH] angular-react-vue Upgraded to Chromium/CefGlue v83. --- .../Browser/CefGlueBrowser.cs | 15 +- .../Classes.Handlers/CefAudioHandler.cs | 99 +++-- .../CefGlue/Classes.Handlers/CefClient.cs | 31 +- .../CefDevToolsMessageObserver.cs | 127 ++++++ .../CefMediaSinkDeviceInfoCallback.cs | 36 ++ .../Classes.Handlers/CefRequestHandler.cs | 18 + .../CefGlue/Classes.Proxies/CefBrowserHost.cs | 73 ++++ .../CefGlue/Classes.Proxies/CefMediaSink.cs | 14 + .../Classes.Proxies/CefNavigationEntry.cs | 2 +- .../CefGlue/Classes.g/CefAudioHandler.g.cs | 119 ++++++ .../CefGlue/Classes.g/CefClient.g.cs | 87 ++-- .../Classes.g/CefDevToolsMessageObserver.g.cs | 119 ++++++ .../CefMediaSinkDeviceInfoCallback.g.cs | 114 ++++++ .../CefGlue/Classes.g/CefRequestHandler.g.cs | 3 + .../CefGlue/Enums/CefChannelLayout.cs | 14 +- .../CefGlue/Enums/CefCookiePriority.cs | 16 + .../CefGlue/Enums/CefCookieSameSite.cs | 17 + .../CefGlue/Enums/CefCursorType.cs | 6 + .../CefGlue/Enums/CefErrorCode.cs | 13 + .../CefGlue/Enums/CefMediaSinkIconType.cs | 23 ++ .../Extensions/CefBrowserHostExtensions.cs | 23 ++ .../Classes.g/cef_audio_handler_t.g.cs | 97 +++++ .../Interop/Classes.g/cef_browser_host_t.g.cs | 376 +++++++++++------- .../Interop/Classes.g/cef_client_t.g.cs | 7 + .../cef_dev_tools_message_observer_t.g.cs | 97 +++++ ...cef_media_sink_device_info_callback_t.g.cs | 69 ++++ .../Interop/Classes.g/cef_media_sink_t.g.cs | 72 +++- .../Classes.g/cef_request_handler_t.g.cs | 7 + .../Interop/Structs/cef_audio_parameters_t.cs | 16 + .../CefGlue/Interop/Structs/cef_cookie_t.cs | 2 + .../Structs/cef_media_sink_device_info_t.cs | 16 + .../CefGlue/Interop/libcef.g.cs | 4 + .../CefGlue/Interop/version.g.cs | 22 +- .../CefGlue/Structs/CefAudioParameters.cs | 55 +++ .../CefGlue/Structs/CefCookie.cs | 57 +++ .../CefGlue/Structs/CefMediaSinkDeviceInfo.cs | 25 ++ .../Structs/CefRequestContextSettings.cs | 14 +- .../CefGlue/Structs/CefSettings.cs | 60 +-- src/Chromely.CefGlue/Chromely.CefGlue.csproj | 16 +- src/Chromely.Core/Chromely.Core.csproj | 16 +- src/Chromely/Chromely.csproj | 16 +- src/Chromely/build/Chromely.props | 2 +- .../build/chromely_win_cef_downloader.exe | Bin 97280 -> 97280 bytes 43 files changed, 1659 insertions(+), 356 deletions(-) create mode 100644 src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefDevToolsMessageObserver.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefMediaSinkDeviceInfoCallback.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Classes.g/CefAudioHandler.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Classes.g/CefDevToolsMessageObserver.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Classes.g/CefMediaSinkDeviceInfoCallback.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Enums/CefCookiePriority.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Enums/CefCookieSameSite.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Enums/CefMediaSinkIconType.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Extensions/CefBrowserHostExtensions.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_audio_handler_t.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_dev_tools_message_observer_t.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_device_info_callback_t.g.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_audio_parameters_t.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_media_sink_device_info_t.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Structs/CefAudioParameters.cs create mode 100644 src/Chromely.CefGlue/CefGlue/Structs/CefMediaSinkDeviceInfo.cs diff --git a/src/Chromely.CefGlue/Browser/CefGlueBrowser.cs b/src/Chromely.CefGlue/Browser/CefGlueBrowser.cs index 29c27259..0dc47492 100644 --- a/src/Chromely.CefGlue/Browser/CefGlueBrowser.cs +++ b/src/Chromely.CefGlue/Browser/CefGlueBrowser.cs @@ -1,13 +1,4 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2017-2019 Chromely Projects -// -// -// See the LICENSE.md file in the project root for more information. -// -// ---------------------------------------------------------------------------------------------------------------------- - -using System; +using System; using System.Reflection; using Chromely.CefGlue.Browser.EventParams; using Chromely.Core; @@ -15,10 +6,6 @@ using Chromely.Core.Network; using Xilium.CefGlue; using Xilium.CefGlue.Wrapper; -// ReSharper disable MemberCanBePrivate.Global -// ReSharper disable UnusedAutoPropertyAccessor.Global -// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global -// ReSharper disable UnusedMember.Global namespace Chromely.CefGlue.Browser { diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefAudioHandler.cs b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefAudioHandler.cs index 4737850d..ade6c19b 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefAudioHandler.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefAudioHandler.cs @@ -1,8 +1,4 @@ -// -// Feature removed since CEF 77. -// -/* -namespace Xilium.CefGlue +namespace Xilium.CefGlue { using System; using System.Collections.Generic; @@ -16,64 +12,97 @@ namespace Xilium.CefGlue /// public abstract unsafe partial class CefAudioHandler { - private void on_audio_stream_started(cef_audio_handler_t* self, cef_browser_t* browser, int audio_stream_id, int channels, CefChannelLayout channel_layout, int sample_rate, int frames_per_buffer) + private int get_audio_parameters(cef_audio_handler_t* self, cef_browser_t* browser, cef_audio_parameters_t* @params) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); - OnAudioStreamStarted(mBrowser, audio_stream_id, channels, channel_layout, sample_rate, frames_per_buffer); + + var mResult = GetAudioParameters(mBrowser, new CefAudioParameters(@params)); + return mResult ? 1 : 0; + } + + /// + /// Called on the UI thread to allow configuration of audio stream parameters. + /// Return true to proceed with audio stream capture, or false to cancel it. + /// All members of |params| can optionally be configured here, but they are + /// also pre-filled with some sensible defaults. + /// + protected abstract bool GetAudioParameters(CefBrowser browser, CefAudioParameters parameters); + + + private void on_audio_stream_started(cef_audio_handler_t* self, cef_browser_t* browser, cef_audio_parameters_t* @params, int channels) + { + CheckSelf(self); + + var mBrowser = CefBrowser.FromNative(browser); + OnAudioStreamStarted(mBrowser, new CefAudioParameters(@params), channels); } /// - /// Called when the stream identified by |audio_stream_id| has started. - /// |audio_stream_id| will uniquely identify the stream across all future - /// CefAudioHandler callbacks. OnAudioSteamStopped will always be called after - /// OnAudioStreamStarted; both methods may be called multiple times for the - /// same stream. |channels| is the number of channels, |channel_layout| is the - /// layout of the channels and |sample_rate| is the stream sample rate. - /// |frames_per_buffer| is the maximum number of frames that will occur in the - /// PCM packet passed to OnAudioStreamPacket. + /// Called on a browser audio capture thread when the browser starts + /// streaming audio. OnAudioSteamStopped will always be called after + /// OnAudioStreamStarted; both methods may be called multiple times + /// for the same browser. |params| contains the audio parameters like + /// sample rate and channel layout. |channels| is the number of channels. /// - protected abstract void OnAudioStreamStarted(CefBrowser browser, int audioStreamId, int channels, CefChannelLayout channelLayout, int sampleRate, int framesPerBuffer); + protected abstract void OnAudioStreamStarted(CefBrowser browser, in CefAudioParameters parameters, int channels); - private void on_audio_stream_packet(cef_audio_handler_t* self, cef_browser_t* browser, int audio_stream_id, float** data, int frames, long pts) + private void on_audio_stream_packet(cef_audio_handler_t* self, cef_browser_t* browser, float** data, int frames, long pts) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); - OnAudioStreamPacket(mBrowser, audio_stream_id, (IntPtr)data, frames, pts); + OnAudioStreamPacket(mBrowser, (IntPtr)data, frames, pts); } /// - /// Called when a PCM packet is received for the stream identified by - /// |audio_stream_id|. |data| is an array representing the raw PCM data as a - /// floating point type, i.e. 4-byte value(s). |frames| is the number of frames - /// in the PCM packet. |pts| is the presentation timestamp (in milliseconds - /// since the Unix Epoch) and represents the time at which the decompressed - /// packet should be presented to the user. Based on |frames| and the - /// |channel_layout| value passed to OnAudioStreamStarted you can calculate the - /// size of the |data| array in bytes. + /// Called on the audio stream thread when a PCM packet is received for the + /// stream. |data| is an array representing the raw PCM data as a floating + /// point type, i.e. 4-byte value(s). |frames| is the number of frames in the + /// PCM packet. |pts| is the presentation timestamp (in milliseconds since the + /// Unix Epoch) and represents the time at which the decompressed packet should + /// be presented to the user. Based on |frames| and the |channel_layout| value + /// passed to OnAudioStreamStarted you can calculate the size of the |data| + /// array in bytes. /// - /// |data| type is |float**| + /// |data| is |float**|, readonly! + /// + protected abstract void OnAudioStreamPacket(CefBrowser browser, IntPtr data, int frames, long pts); + + + private void on_audio_stream_stopped(cef_audio_handler_t* self, cef_browser_t* browser) + { + CheckSelf(self); + + var mBrowser = CefBrowser.FromNative(browser); + OnAudioStreamStopped(mBrowser); + } + + /// + /// Called on the UI thread when the stream has stopped. OnAudioSteamStopped + /// will always be called after OnAudioStreamStarted; both methods may be + /// called multiple times for the same stream. /// - protected abstract void OnAudioStreamPacket(CefBrowser browser, int audioStreamId, IntPtr data, int frames, long pts); + protected abstract void OnAudioStreamStopped(CefBrowser browser); - private void on_audio_stream_stopped(cef_audio_handler_t* self, cef_browser_t* browser, int audio_stream_id) + private void on_audio_stream_error(cef_audio_handler_t* self, cef_browser_t* browser, cef_string_t* message) { CheckSelf(self); var mBrowser = CefBrowser.FromNative(browser); - OnAudioStreamStopped(mBrowser, audio_stream_id); + var mMessage = cef_string_t.ToString(message); + OnAudioStreamError(mBrowser, mMessage); } /// - /// Called when the stream identified by |audio_stream_id| has stopped. - /// OnAudioSteamStopped will always be called after OnAudioStreamStarted; both - /// methods may be called multiple times for the same stream. + /// Called on the UI or audio stream thread when an error occurred. During the + /// stream creation phase this callback will be called on the UI thread while + /// in the capturing phase it will be called on the audio stream thread. The + /// stream will be stopped immediately. /// - protected abstract void OnAudioStreamStopped(CefBrowser browser, int audioStreamId); + protected abstract void OnAudioStreamError(CefBrowser browser, string message); } } -*/ diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefClient.cs b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefClient.cs index cd939d8f..97d0506c 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefClient.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefClient.cs @@ -8,23 +8,20 @@ public abstract unsafe partial class CefClient { - // - // Feature removed since CEF 77. - // - //private cef_audio_handler_t* get_audio_handler(cef_client_t* self) - //{ - // CheckSelf(self); - // var result = GetAudioHandler(); - // return result != null ? result.ToNative() : null; - //} - // - ///// - ///// Return the handler for audio rendering events. - ///// - //protected virtual CefAudioHandler GetAudioHandler() - //{ - // return null; - //} + private cef_audio_handler_t* get_audio_handler(cef_client_t* self) + { + CheckSelf(self); + var result = GetAudioHandler(); + return result != null ? result.ToNative() : null; + } + + /// + /// Return the handler for audio rendering events. + /// + protected virtual CefAudioHandler GetAudioHandler() + { + return null; + } private cef_context_menu_handler_t* get_context_menu_handler(cef_client_t* self) diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefDevToolsMessageObserver.cs b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefDevToolsMessageObserver.cs new file mode 100644 index 00000000..c4b7ca79 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefDevToolsMessageObserver.cs @@ -0,0 +1,127 @@ +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using Xilium.CefGlue.Interop; + + /// + /// Callback interface for CefBrowserHost::AddDevToolsMessageObserver. The + /// methods of this class will be called on the browser process UI thread. + /// + public abstract unsafe partial class CefDevToolsMessageObserver + { + private int on_dev_tools_message(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, void* message, UIntPtr message_size) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + + var m_result = OnDevToolsMessage(m_browser, (IntPtr)message, checked((int)message_size)); + + return m_result ? 1 : 0; + } + + /// + /// Method that will be called on receipt of a DevTools protocol message. + /// |browser| is the originating browser instance. |message| is a UTF8-encoded + /// JSON dictionary representing either a method result or an event. |message| + /// is only valid for the scope of this callback and should be copied if + /// necessary. Return true if the message was handled or false if the message + /// should be further processed and passed to the OnDevToolsMethodResult or + /// OnDevToolsEvent methods as appropriate. + /// Method result dictionaries include an "id" (int) value that identifies the + /// orginating method call sent from CefBrowserHost::SendDevToolsMessage, and + /// optionally either a "result" (dictionary) or "error" (dictionary) value. + /// The "error" dictionary will contain "code" (int) and "message" (string) + /// values. Event dictionaries include a "method" (string) value and optionally + /// a "params" (dictionary) value. See the DevTools protocol documentation at + /// https://chromedevtools.github.io/devtools-protocol/ for details of + /// supported method calls and the expected "result" or "params" dictionary + /// contents. JSON dictionaries can be parsed using the CefParseJSON function + /// if desired, however be aware of performance considerations when parsing + /// large messages (some of which may exceed 1MB in size). + /// + protected abstract bool OnDevToolsMessage(CefBrowser browser, IntPtr message, int messageSize); + + + private void on_dev_tools_method_result(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, int message_id, int success, void* result, UIntPtr result_size) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + + OnDevToolsMethodResult(m_browser, message_id, success != 0, (IntPtr)result, checked((int)result_size)); + } + + /// + /// Method that will be called after attempted execution of a DevTools protocol + /// method. |browser| is the originating browser instance. |message_id| is the + /// "id" value that identifies the originating method call message. If the + /// method succeeded |success| will be true and |result| will be the + /// UTF8-encoded JSON "result" dictionary value (which may be empty). If the + /// method failed |success| will be false and |result| will be the UTF8-encoded + /// JSON "error" dictionary value. |result| is only valid for the scope of this + /// callback and should be copied if necessary. See the OnDevToolsMessage + /// documentation for additional details on |result| contents. + /// + protected abstract void OnDevToolsMethodResult(CefBrowser browser, int messageId, bool success, IntPtr result, int resultSize); + + + private void on_dev_tools_event(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, cef_string_t* method, void* @params, UIntPtr params_size) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + var m_method = cef_string_t.ToString(method); + + OnDevToolsEvent(m_browser, m_method, (IntPtr)@params, checked((int)params_size)); + } + + /// + /// Method that will be called on receipt of a DevTools protocol event. + /// |browser| is the originating browser instance. |method| is the "method" + /// value. |params| is the UTF8-encoded JSON "params" dictionary value (which + /// may be empty). |params| is only valid for the scope of this callback and + /// should be copied if necessary. See the OnDevToolsMessage documentation for + /// additional details on |params| contents. + /// + protected abstract void OnDevToolsEvent(CefBrowser browser, string method, IntPtr parameters, int parametersSize); + + + private void on_dev_tools_agent_attached(cef_dev_tools_message_observer_t* self, cef_browser_t* browser) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + + OnDevToolsAgentAttached(m_browser); + } + + /// + /// Method that will be called when the DevTools agent has attached. |browser| + /// is the originating browser instance. This will generally occur in response + /// to the first message sent while the agent is detached. + /// + protected abstract void OnDevToolsAgentAttached(CefBrowser browser); + + + private void on_dev_tools_agent_detached(cef_dev_tools_message_observer_t* self, cef_browser_t* browser) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + + OnDevToolsAgentDetached(m_browser); + } + + /// + /// Method that will be called when the DevTools agent has detached. |browser| + /// is the originating browser instance. Any method results that were pending + /// before the agent became detached will not be delivered, and any active + /// event subscriptions will be canceled. + /// + protected abstract void OnDevToolsAgentDetached(CefBrowser browser); + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefMediaSinkDeviceInfoCallback.cs b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefMediaSinkDeviceInfoCallback.cs new file mode 100644 index 00000000..da42ee8f --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefMediaSinkDeviceInfoCallback.cs @@ -0,0 +1,36 @@ +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using Xilium.CefGlue.Interop; + + /// + /// Callback interface for CefMediaSink::GetDeviceInfo. The methods of this + /// class will be called on the browser process UI thread. + /// + public abstract unsafe partial class CefMediaSinkDeviceInfoCallback + { + private void on_media_sink_device_info(cef_media_sink_device_info_callback_t* self, cef_media_sink_device_info_t* device_info) + { + CheckSelf(self); + + var mIPAddress = cef_string_t.ToString(&device_info->ip_address); + var mModelName = cef_string_t.ToString(&device_info->model_name); + + var mDeviceInfo = new CefMediaSinkDeviceInfo( + ipAddress: mIPAddress, + port: device_info->port, + modelName: mModelName); + + OnMediaSinkDeviceInfo(in mDeviceInfo); + } + + /// + /// Method that will be executed asyncronously once device information has been + /// retrieved. + /// + protected abstract void OnMediaSinkDeviceInfo(in CefMediaSinkDeviceInfo deviceInfo); + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefRequestHandler.cs b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefRequestHandler.cs index 9cf0db62..9cc918c7 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefRequestHandler.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Handlers/CefRequestHandler.cs @@ -307,5 +307,23 @@ private void on_render_process_terminated(cef_request_handler_t* self, cef_brows protected virtual void OnRenderProcessTerminated(CefBrowser browser, CefTerminationStatus status) { } + + + private void on_document_available_in_main_frame(cef_request_handler_t* self, cef_browser_t* browser) + { + CheckSelf(self); + + var m_browser = CefBrowser.FromNative(browser); + + OnDocumentAvailableInMainFrame(m_browser); + } + + /// + /// Called on the browser process UI thread when the window.document object of + /// the main frame has been created. + /// + protected virtual void OnDocumentAvailableInMainFrame(CefBrowser browser) + { + } } } diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefBrowserHost.cs b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefBrowserHost.cs index 0d9766cb..ceef2df6 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefBrowserHost.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefBrowserHost.cs @@ -366,6 +366,79 @@ public bool HasDevTools } } + /// + /// Send a method call message over the DevTools protocol. |message| must be a + /// UTF8-encoded JSON dictionary that contains "id" (int), "method" (string) + /// and "params" (dictionary, optional) values. See the DevTools protocol + /// documentation at https://chromedevtools.github.io/devtools-protocol/ for + /// details of supported methods and the expected "params" dictionary contents. + /// |message| will be copied if necessary. This method will return true if + /// called on the UI thread and the message was successfully submitted for + /// validation, otherwise false. Validation will be applied asynchronously and + /// any messages that fail due to formatting errors or missing parameters may + /// be discarded without notification. Prefer ExecuteDevToolsMethod if a more + /// structured approach to message formatting is desired. + /// Every valid method call will result in an asynchronous method result or + /// error message that references the sent message "id". Event messages are + /// received while notifications are enabled (for example, between method calls + /// for "Page.enable" and "Page.disable"). All received messages will be + /// delivered to the observer(s) registered with AddDevToolsMessageObserver. + /// See CefDevToolsMessageObserver::OnDevToolsMessage documentation for details + /// of received message contents. + /// Usage of the SendDevToolsMessage, ExecuteDevToolsMethod and + /// AddDevToolsMessageObserver methods does not require an active DevTools + /// front-end or remote-debugging session. Other active DevTools sessions will + /// continue to function independently. However, any modification of global + /// browser state by one session may not be reflected in the UI of other + /// sessions. + /// Communication with the DevTools front-end (when displayed) can be logged + /// for development purposes by passing the + /// `--devtools-protocol-log-file=<path>` command-line flag. + /// + public bool SendDevToolsMessage(IntPtr message, int messageSize) + { + return cef_browser_host_t.send_dev_tools_message( + _self, (void*)message, checked((UIntPtr)messageSize)) != 0; + } + + /// + /// Execute a method call over the DevTools protocol. This is a more structured + /// version of SendDevToolsMessage. |message_id| is an incremental number that + /// uniquely identifies the message (pass 0 to have the next number assigned + /// automatically based on previous values). |method| is the method name. + /// |params| are the method parameters, which may be empty. See the DevTools + /// protocol documentation (linked above) for details of supported methods and + /// the expected |params| dictionary contents. This method will return the + /// assigned message ID if called on the UI thread and the message was + /// successfully submitted for validation, otherwise 0. See the + /// SendDevToolsMessage documentation for additional usage information. + /// + public int ExecuteDevToolsMethod(int messageId, string method, CefDictionaryValue parameters) + { + fixed (char* method_str = method) + { + var n_method = new cef_string_t(method_str, method != null ? method.Length : 0); + + return cef_browser_host_t.execute_dev_tools_method( + _self, messageId, &n_method, parameters.ToNative()); + } + } + + /// + /// Add an observer for DevTools protocol messages (method results and events). + /// The observer will remain registered until the returned Registration object + /// is destroyed. See the SendDevToolsMessage documentation for additional + /// usage information. + /// + public CefRegistration AddDevToolsMessageObserver(CefDevToolsMessageObserver observer) + { + if (observer == null) throw new ArgumentNullException(nameof(observer)); + + var n_registration = cef_browser_host_t.add_dev_tools_message_observer(_self, + observer.ToNative()); + return CefRegistration.FromNativeOrNull(n_registration); + } + /// /// Retrieve a snapshot of current navigation entries as values sent to the /// specified visitor. If |current_only| is true only the current navigation diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefMediaSink.cs b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefMediaSink.cs index bc015ca2..6c273a66 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefMediaSink.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefMediaSink.cs @@ -54,6 +54,20 @@ public string Description } } + /// + /// Returns the icon type for this sink. + /// + public CefMediaSinkIconType IconType => + cef_media_sink_t.get_icon_type(_self); + + /// + /// Asynchronously retrieves device info. + /// + public void GetDeviceInfo(CefMediaSinkDeviceInfoCallback callback) + { + cef_media_sink_t.get_device_info(_self, callback.ToNative()); + } + /// /// Returns true if this sink accepts content via Cast. /// diff --git a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefNavigationEntry.cs b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefNavigationEntry.cs index 2444636e..9f01b793 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefNavigationEntry.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.Proxies/CefNavigationEntry.cs @@ -36,7 +36,7 @@ public string Url /// /// Returns a display-friendly version of the URL. /// - public string GetDisplayUrl + public string DisplayUrl { get { diff --git a/src/Chromely.CefGlue/CefGlue/Classes.g/CefAudioHandler.g.cs b/src/Chromely.CefGlue/CefGlue/Classes.g/CefAudioHandler.g.cs new file mode 100644 index 00000000..e8d99201 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Classes.g/CefAudioHandler.g.cs @@ -0,0 +1,119 @@ +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using Xilium.CefGlue.Interop; + + // Role: HANDLER + public abstract unsafe partial class CefAudioHandler + { + private static Dictionary _roots = new Dictionary(); + + private int _refct; + private cef_audio_handler_t* _self; + + protected object SyncRoot { get { return this; } } + + private cef_audio_handler_t.add_ref_delegate _ds0; + private cef_audio_handler_t.release_delegate _ds1; + private cef_audio_handler_t.has_one_ref_delegate _ds2; + private cef_audio_handler_t.has_at_least_one_ref_delegate _ds3; + private cef_audio_handler_t.get_audio_parameters_delegate _ds4; + private cef_audio_handler_t.on_audio_stream_started_delegate _ds5; + private cef_audio_handler_t.on_audio_stream_packet_delegate _ds6; + private cef_audio_handler_t.on_audio_stream_stopped_delegate _ds7; + private cef_audio_handler_t.on_audio_stream_error_delegate _ds8; + + protected CefAudioHandler() + { + _self = cef_audio_handler_t.Alloc(); + + _ds0 = new cef_audio_handler_t.add_ref_delegate(add_ref); + _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); + _ds1 = new cef_audio_handler_t.release_delegate(release); + _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); + _ds2 = new cef_audio_handler_t.has_one_ref_delegate(has_one_ref); + _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); + _ds3 = new cef_audio_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_audio_handler_t.get_audio_parameters_delegate(get_audio_parameters); + _self->_get_audio_parameters = Marshal.GetFunctionPointerForDelegate(_ds4); + _ds5 = new cef_audio_handler_t.on_audio_stream_started_delegate(on_audio_stream_started); + _self->_on_audio_stream_started = Marshal.GetFunctionPointerForDelegate(_ds5); + _ds6 = new cef_audio_handler_t.on_audio_stream_packet_delegate(on_audio_stream_packet); + _self->_on_audio_stream_packet = Marshal.GetFunctionPointerForDelegate(_ds6); + _ds7 = new cef_audio_handler_t.on_audio_stream_stopped_delegate(on_audio_stream_stopped); + _self->_on_audio_stream_stopped = Marshal.GetFunctionPointerForDelegate(_ds7); + _ds8 = new cef_audio_handler_t.on_audio_stream_error_delegate(on_audio_stream_error); + _self->_on_audio_stream_error = Marshal.GetFunctionPointerForDelegate(_ds8); + } + + ~CefAudioHandler() + { + Dispose(false); + } + + protected virtual void Dispose(bool disposing) + { + if (_self != null) + { + cef_audio_handler_t.Free(_self); + _self = null; + } + } + + private void add_ref(cef_audio_handler_t* self) + { + lock (SyncRoot) + { + var result = ++_refct; + if (result == 1) + { + lock (_roots) { _roots.Add((IntPtr)_self, this); } + } + } + } + + private int release(cef_audio_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_audio_handler_t* self) + { + lock (SyncRoot) { return _refct == 1 ? 1 : 0; } + } + + private int has_at_least_one_ref(cef_audio_handler_t* self) + { + lock (SyncRoot) { return _refct != 0 ? 1 : 0; } + } + + internal cef_audio_handler_t* ToNative() + { + add_ref(_self); + return _self; + } + + [Conditional("DEBUG")] + private void CheckSelf(cef_audio_handler_t* self) + { + if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Classes.g/CefClient.g.cs b/src/Chromely.CefGlue/CefGlue/Classes.g/CefClient.g.cs index 84657cf4..24838b98 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.g/CefClient.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.g/CefClient.g.cs @@ -41,20 +41,21 @@ internal static CefClient FromNative(cef_client_t* ptr) private cef_client_t.release_delegate _ds1; private cef_client_t.has_one_ref_delegate _ds2; private cef_client_t.has_at_least_one_ref_delegate _ds3; - private cef_client_t.get_context_menu_handler_delegate _ds4; - private cef_client_t.get_dialog_handler_delegate _ds5; - private cef_client_t.get_display_handler_delegate _ds6; - private cef_client_t.get_download_handler_delegate _ds7; - private cef_client_t.get_drag_handler_delegate _ds8; - private cef_client_t.get_find_handler_delegate _ds9; - private cef_client_t.get_focus_handler_delegate _dsa; - private cef_client_t.get_jsdialog_handler_delegate _dsb; - private cef_client_t.get_keyboard_handler_delegate _dsc; - private cef_client_t.get_life_span_handler_delegate _dsd; - private cef_client_t.get_load_handler_delegate _dse; - private cef_client_t.get_render_handler_delegate _dsf; - private cef_client_t.get_request_handler_delegate _ds10; - private cef_client_t.on_process_message_received_delegate _ds11; + private cef_client_t.get_audio_handler_delegate _ds4; + private cef_client_t.get_context_menu_handler_delegate _ds5; + private cef_client_t.get_dialog_handler_delegate _ds6; + private cef_client_t.get_display_handler_delegate _ds7; + private cef_client_t.get_download_handler_delegate _ds8; + private cef_client_t.get_drag_handler_delegate _ds9; + private cef_client_t.get_find_handler_delegate _dsa; + private cef_client_t.get_focus_handler_delegate _dsb; + private cef_client_t.get_jsdialog_handler_delegate _dsc; + private cef_client_t.get_keyboard_handler_delegate _dsd; + private cef_client_t.get_life_span_handler_delegate _dse; + private cef_client_t.get_load_handler_delegate _dsf; + private cef_client_t.get_render_handler_delegate _ds10; + private cef_client_t.get_request_handler_delegate _ds11; + private cef_client_t.on_process_message_received_delegate _ds12; protected CefClient() { @@ -68,34 +69,36 @@ protected CefClient() _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); _ds3 = new cef_client_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_client_t.get_context_menu_handler_delegate(get_context_menu_handler); - _self->_get_context_menu_handler = Marshal.GetFunctionPointerForDelegate(_ds4); - _ds5 = new cef_client_t.get_dialog_handler_delegate(get_dialog_handler); - _self->_get_dialog_handler = Marshal.GetFunctionPointerForDelegate(_ds5); - _ds6 = new cef_client_t.get_display_handler_delegate(get_display_handler); - _self->_get_display_handler = Marshal.GetFunctionPointerForDelegate(_ds6); - _ds7 = new cef_client_t.get_download_handler_delegate(get_download_handler); - _self->_get_download_handler = Marshal.GetFunctionPointerForDelegate(_ds7); - _ds8 = new cef_client_t.get_drag_handler_delegate(get_drag_handler); - _self->_get_drag_handler = Marshal.GetFunctionPointerForDelegate(_ds8); - _ds9 = new cef_client_t.get_find_handler_delegate(get_find_handler); - _self->_get_find_handler = Marshal.GetFunctionPointerForDelegate(_ds9); - _dsa = new cef_client_t.get_focus_handler_delegate(get_focus_handler); - _self->_get_focus_handler = Marshal.GetFunctionPointerForDelegate(_dsa); - _dsb = new cef_client_t.get_jsdialog_handler_delegate(get_jsdialog_handler); - _self->_get_jsdialog_handler = Marshal.GetFunctionPointerForDelegate(_dsb); - _dsc = new cef_client_t.get_keyboard_handler_delegate(get_keyboard_handler); - _self->_get_keyboard_handler = Marshal.GetFunctionPointerForDelegate(_dsc); - _dsd = new cef_client_t.get_life_span_handler_delegate(get_life_span_handler); - _self->_get_life_span_handler = Marshal.GetFunctionPointerForDelegate(_dsd); - _dse = new cef_client_t.get_load_handler_delegate(get_load_handler); - _self->_get_load_handler = Marshal.GetFunctionPointerForDelegate(_dse); - _dsf = new cef_client_t.get_render_handler_delegate(get_render_handler); - _self->_get_render_handler = Marshal.GetFunctionPointerForDelegate(_dsf); - _ds10 = new cef_client_t.get_request_handler_delegate(get_request_handler); - _self->_get_request_handler = Marshal.GetFunctionPointerForDelegate(_ds10); - _ds11 = new cef_client_t.on_process_message_received_delegate(on_process_message_received); - _self->_on_process_message_received = Marshal.GetFunctionPointerForDelegate(_ds11); + _ds4 = new cef_client_t.get_audio_handler_delegate(get_audio_handler); + _self->_get_audio_handler = Marshal.GetFunctionPointerForDelegate(_ds4); + _ds5 = new cef_client_t.get_context_menu_handler_delegate(get_context_menu_handler); + _self->_get_context_menu_handler = Marshal.GetFunctionPointerForDelegate(_ds5); + _ds6 = new cef_client_t.get_dialog_handler_delegate(get_dialog_handler); + _self->_get_dialog_handler = Marshal.GetFunctionPointerForDelegate(_ds6); + _ds7 = new cef_client_t.get_display_handler_delegate(get_display_handler); + _self->_get_display_handler = Marshal.GetFunctionPointerForDelegate(_ds7); + _ds8 = new cef_client_t.get_download_handler_delegate(get_download_handler); + _self->_get_download_handler = Marshal.GetFunctionPointerForDelegate(_ds8); + _ds9 = new cef_client_t.get_drag_handler_delegate(get_drag_handler); + _self->_get_drag_handler = Marshal.GetFunctionPointerForDelegate(_ds9); + _dsa = new cef_client_t.get_find_handler_delegate(get_find_handler); + _self->_get_find_handler = Marshal.GetFunctionPointerForDelegate(_dsa); + _dsb = new cef_client_t.get_focus_handler_delegate(get_focus_handler); + _self->_get_focus_handler = Marshal.GetFunctionPointerForDelegate(_dsb); + _dsc = new cef_client_t.get_jsdialog_handler_delegate(get_jsdialog_handler); + _self->_get_jsdialog_handler = Marshal.GetFunctionPointerForDelegate(_dsc); + _dsd = new cef_client_t.get_keyboard_handler_delegate(get_keyboard_handler); + _self->_get_keyboard_handler = Marshal.GetFunctionPointerForDelegate(_dsd); + _dse = new cef_client_t.get_life_span_handler_delegate(get_life_span_handler); + _self->_get_life_span_handler = Marshal.GetFunctionPointerForDelegate(_dse); + _dsf = new cef_client_t.get_load_handler_delegate(get_load_handler); + _self->_get_load_handler = Marshal.GetFunctionPointerForDelegate(_dsf); + _ds10 = new cef_client_t.get_render_handler_delegate(get_render_handler); + _self->_get_render_handler = Marshal.GetFunctionPointerForDelegate(_ds10); + _ds11 = new cef_client_t.get_request_handler_delegate(get_request_handler); + _self->_get_request_handler = Marshal.GetFunctionPointerForDelegate(_ds11); + _ds12 = new cef_client_t.on_process_message_received_delegate(on_process_message_received); + _self->_on_process_message_received = Marshal.GetFunctionPointerForDelegate(_ds12); } ~CefClient() diff --git a/src/Chromely.CefGlue/CefGlue/Classes.g/CefDevToolsMessageObserver.g.cs b/src/Chromely.CefGlue/CefGlue/Classes.g/CefDevToolsMessageObserver.g.cs new file mode 100644 index 00000000..070463aa --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Classes.g/CefDevToolsMessageObserver.g.cs @@ -0,0 +1,119 @@ +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using Xilium.CefGlue.Interop; + + // Role: HANDLER + public abstract unsafe partial class CefDevToolsMessageObserver + { + private static Dictionary _roots = new Dictionary(); + + private int _refct; + private cef_dev_tools_message_observer_t* _self; + + protected object SyncRoot { get { return this; } } + + private cef_dev_tools_message_observer_t.add_ref_delegate _ds0; + private cef_dev_tools_message_observer_t.release_delegate _ds1; + private cef_dev_tools_message_observer_t.has_one_ref_delegate _ds2; + private cef_dev_tools_message_observer_t.has_at_least_one_ref_delegate _ds3; + private cef_dev_tools_message_observer_t.on_dev_tools_message_delegate _ds4; + private cef_dev_tools_message_observer_t.on_dev_tools_method_result_delegate _ds5; + private cef_dev_tools_message_observer_t.on_dev_tools_event_delegate _ds6; + private cef_dev_tools_message_observer_t.on_dev_tools_agent_attached_delegate _ds7; + private cef_dev_tools_message_observer_t.on_dev_tools_agent_detached_delegate _ds8; + + protected CefDevToolsMessageObserver() + { + _self = cef_dev_tools_message_observer_t.Alloc(); + + _ds0 = new cef_dev_tools_message_observer_t.add_ref_delegate(add_ref); + _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); + _ds1 = new cef_dev_tools_message_observer_t.release_delegate(release); + _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); + _ds2 = new cef_dev_tools_message_observer_t.has_one_ref_delegate(has_one_ref); + _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); + _ds3 = new cef_dev_tools_message_observer_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_dev_tools_message_observer_t.on_dev_tools_message_delegate(on_dev_tools_message); + _self->_on_dev_tools_message = Marshal.GetFunctionPointerForDelegate(_ds4); + _ds5 = new cef_dev_tools_message_observer_t.on_dev_tools_method_result_delegate(on_dev_tools_method_result); + _self->_on_dev_tools_method_result = Marshal.GetFunctionPointerForDelegate(_ds5); + _ds6 = new cef_dev_tools_message_observer_t.on_dev_tools_event_delegate(on_dev_tools_event); + _self->_on_dev_tools_event = Marshal.GetFunctionPointerForDelegate(_ds6); + _ds7 = new cef_dev_tools_message_observer_t.on_dev_tools_agent_attached_delegate(on_dev_tools_agent_attached); + _self->_on_dev_tools_agent_attached = Marshal.GetFunctionPointerForDelegate(_ds7); + _ds8 = new cef_dev_tools_message_observer_t.on_dev_tools_agent_detached_delegate(on_dev_tools_agent_detached); + _self->_on_dev_tools_agent_detached = Marshal.GetFunctionPointerForDelegate(_ds8); + } + + ~CefDevToolsMessageObserver() + { + Dispose(false); + } + + protected virtual void Dispose(bool disposing) + { + if (_self != null) + { + cef_dev_tools_message_observer_t.Free(_self); + _self = null; + } + } + + private void add_ref(cef_dev_tools_message_observer_t* self) + { + lock (SyncRoot) + { + var result = ++_refct; + if (result == 1) + { + lock (_roots) { _roots.Add((IntPtr)_self, this); } + } + } + } + + private int release(cef_dev_tools_message_observer_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_dev_tools_message_observer_t* self) + { + lock (SyncRoot) { return _refct == 1 ? 1 : 0; } + } + + private int has_at_least_one_ref(cef_dev_tools_message_observer_t* self) + { + lock (SyncRoot) { return _refct != 0 ? 1 : 0; } + } + + internal cef_dev_tools_message_observer_t* ToNative() + { + add_ref(_self); + return _self; + } + + [Conditional("DEBUG")] + private void CheckSelf(cef_dev_tools_message_observer_t* self) + { + if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Classes.g/CefMediaSinkDeviceInfoCallback.g.cs b/src/Chromely.CefGlue/CefGlue/Classes.g/CefMediaSinkDeviceInfoCallback.g.cs new file mode 100644 index 00000000..949fe9d9 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Classes.g/CefMediaSinkDeviceInfoCallback.g.cs @@ -0,0 +1,114 @@ +// +// DO NOT MODIFY! THIS IS AUTOGENERATED FILE! +// +namespace Xilium.CefGlue +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Runtime.InteropServices; + using Xilium.CefGlue.Interop; + + // Role: HANDLER + public abstract unsafe partial class CefMediaSinkDeviceInfoCallback + { + private static Dictionary _roots = new Dictionary(); + + private int _refct; + private cef_media_sink_device_info_callback_t* _self; + + protected object SyncRoot { get { return this; } } + + private cef_media_sink_device_info_callback_t.add_ref_delegate _ds0; + private cef_media_sink_device_info_callback_t.release_delegate _ds1; + private cef_media_sink_device_info_callback_t.has_one_ref_delegate _ds2; + private cef_media_sink_device_info_callback_t.has_at_least_one_ref_delegate _ds3; + private cef_media_sink_device_info_callback_t.on_media_sink_device_info_delegate _ds4; + + protected CefMediaSinkDeviceInfoCallback() + { + _self = cef_media_sink_device_info_callback_t.Alloc(); + + _ds0 = new cef_media_sink_device_info_callback_t.add_ref_delegate(add_ref); + _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); + _ds1 = new cef_media_sink_device_info_callback_t.release_delegate(release); + _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); + _ds2 = new cef_media_sink_device_info_callback_t.has_one_ref_delegate(has_one_ref); + _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); + _ds3 = new cef_media_sink_device_info_callback_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_media_sink_device_info_callback_t.on_media_sink_device_info_delegate(on_media_sink_device_info); + _self->_on_media_sink_device_info = Marshal.GetFunctionPointerForDelegate(_ds4); + } + + ~CefMediaSinkDeviceInfoCallback() + { + Dispose(false); + } + + private void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (_self != null) + { + cef_media_sink_device_info_callback_t.Free(_self); + _self = null; + } + } + + private void add_ref(cef_media_sink_device_info_callback_t* self) + { + lock (SyncRoot) + { + var result = ++_refct; + if (result == 1) + { + lock (_roots) { _roots.Add((IntPtr)_self, this); } + } + } + } + + private int release(cef_media_sink_device_info_callback_t* self) + { + lock (SyncRoot) + { + var result = --_refct; + if (result == 0) + { + lock (_roots) { _roots.Remove((IntPtr)_self); } + Dispose(); + return 1; + } + return 0; + } + } + + private int has_one_ref(cef_media_sink_device_info_callback_t* self) + { + lock (SyncRoot) { return _refct == 1 ? 1 : 0; } + } + + private int has_at_least_one_ref(cef_media_sink_device_info_callback_t* self) + { + lock (SyncRoot) { return _refct != 0 ? 1 : 0; } + } + + internal cef_media_sink_device_info_callback_t* ToNative() + { + add_ref(_self); + return _self; + } + + [Conditional("DEBUG")] + private void CheckSelf(cef_media_sink_device_info_callback_t* self) + { + if (_self != self) throw ExceptionBuilder.InvalidSelfReference(); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Classes.g/CefRequestHandler.g.cs b/src/Chromely.CefGlue/CefGlue/Classes.g/CefRequestHandler.g.cs index eb7ead73..ace24c94 100644 --- a/src/Chromely.CefGlue/CefGlue/Classes.g/CefRequestHandler.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Classes.g/CefRequestHandler.g.cs @@ -33,6 +33,7 @@ public abstract unsafe partial class CefRequestHandler private cef_request_handler_t.on_plugin_crashed_delegate _dsb; private cef_request_handler_t.on_render_view_ready_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() { @@ -66,6 +67,8 @@ protected CefRequestHandler() _self->_on_render_view_ready = 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() diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefChannelLayout.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefChannelLayout.cs index 48d47bc7..7f416169 100644 --- a/src/Chromely.CefGlue/CefGlue/Enums/CefChannelLayout.cs +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefChannelLayout.cs @@ -1,8 +1,4 @@ // -// Feature removed since CEF 77. -// -/* -// // This file manually written from cef/include/internal/cef_types.h. // C API name: cef_channel_layout_t. // @@ -10,8 +6,6 @@ namespace Xilium.CefGlue { /// /// Enumerates the various representations of the ordering of audio channels. - /// Logged to UMA, so never reuse a value, always add new/greater ones! - /// See media\base\channel_layout.h /// public enum CefChannelLayout { @@ -122,7 +116,6 @@ public enum CefChannelLayout /// /// Stereo L, Stereo R, Front C, Rear L, Rear R, Rear C /// - Layout_Hexagonal = 22, /// @@ -180,10 +173,7 @@ public enum CefChannelLayout /// Bitstream = 32, - /// - /// Max value, must always equal the largest entry ever logged. - /// - Max = Bitstream + // Max value, must always equal the largest entry ever logged. + //CEF_CHANNEL_LAYOUT_MAX = CEF_CHANNEL_LAYOUT_BITSTREAM } } -*/ diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefCookiePriority.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefCookiePriority.cs new file mode 100644 index 00000000..2f49bbb5 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefCookiePriority.cs @@ -0,0 +1,16 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// C API name: cef_cookie_priority_t. +// +namespace Xilium.CefGlue +{ + /// + /// Cookie priority values. + /// + public enum CefCookiePriority + { + Low = -1, + Medium = 0, + High = 1, + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefCookieSameSite.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefCookieSameSite.cs new file mode 100644 index 00000000..be9dd644 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefCookieSameSite.cs @@ -0,0 +1,17 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// C API name: cef_cookie_same_site_t. +// +namespace Xilium.CefGlue +{ + /// + /// Cookie same site values. + /// + public enum CefCookieSameSite + { + Unspecified, + NoRestriction, + LaxMode, + StrictMode, + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefCursorType.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefCursorType.cs index 123daaf6..c5244c89 100644 --- a/src/Chromely.CefGlue/CefGlue/Enums/CefCursorType.cs +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefCursorType.cs @@ -56,6 +56,12 @@ public enum CefCursorType ZoomOut, Grab, Grabbing, + MiddlePanningVertical, + MiddlePanningHorizontal, Custom, + DragAndDropNone, + DragAndDropMove, + DragAndDropCopy, + DragAndDropLink, } } diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefErrorCode.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefErrorCode.cs index 68181a7b..59624a4d 100644 --- a/src/Chromely.CefGlue/CefGlue/Enums/CefErrorCode.cs +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefErrorCode.cs @@ -1245,6 +1245,19 @@ public enum CefErrorCode /// INVALID_WEB_BUNDLE = -505, + /// + /// A Trust Tokens protocol operation-executing request failed for one of a + /// number of reasons (precondition failure, internal error, bad response). + /// + TRUST_TOKEN_OPERATION_FAILED = -506, + + /// + /// When handling a Trust Tokens protocol operation-executing request, the system + /// found that the request's desired Trust Tokens results were already present in + /// a local cache; as a result, the main request was cancelled. + /// + TRUST_TOKEN_OPERATION_CACHE_HIT = -507, + // *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). *** /// diff --git a/src/Chromely.CefGlue/CefGlue/Enums/CefMediaSinkIconType.cs b/src/Chromely.CefGlue/CefGlue/Enums/CefMediaSinkIconType.cs new file mode 100644 index 00000000..9502c33e --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Enums/CefMediaSinkIconType.cs @@ -0,0 +1,23 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// C API name: cef_media_sink_icon_type_t +// +namespace Xilium.CefGlue +{ + /// + /// Connection state for a MediaRoute object. + /// + public enum CefMediaSinkIconType + { + Cast, + CastAudioGroup, + CastAudio, + Meeting, + Hangout, + Education, + WiredDisplay, + Generic, + + // CEF_MSIT_TOTAL_COUNT, + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Extensions/CefBrowserHostExtensions.cs b/src/Chromely.CefGlue/CefGlue/Extensions/CefBrowserHostExtensions.cs new file mode 100644 index 00000000..cc790ce2 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Extensions/CefBrowserHostExtensions.cs @@ -0,0 +1,23 @@ +using System; + +namespace Xilium.CefGlue +{ + public static class CefBrowserHostExtensions + { + public static unsafe bool SendDevToolsMessage(this CefBrowserHost browserHost, byte[] message) + { + fixed (byte* messagePtr = &message[0]) + { + return browserHost.SendDevToolsMessage((IntPtr)messagePtr, message.Length); + } + } + + public static unsafe bool SendDevToolsMessage(this CefBrowserHost browserHost, ArraySegment message) + { + fixed (byte* messagePtr = &message.Array[message.Offset]) + { + return browserHost.SendDevToolsMessage((IntPtr)messagePtr, message.Count); + } + } + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_audio_handler_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_audio_handler_t.g.cs new file mode 100644 index 00000000..a55ab656 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_audio_handler_t.g.cs @@ -0,0 +1,97 @@ +// +// 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_audio_handler_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _get_audio_parameters; + internal IntPtr _on_audio_stream_started; + internal IntPtr _on_audio_stream_packet; + internal IntPtr _on_audio_stream_stopped; + internal IntPtr _on_audio_stream_error; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_audio_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_audio_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_audio_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_audio_handler_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int get_audio_parameters_delegate(cef_audio_handler_t* self, cef_browser_t* browser, cef_audio_parameters_t* @params); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_audio_stream_started_delegate(cef_audio_handler_t* self, cef_browser_t* browser, cef_audio_parameters_t* @params, int channels); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_audio_stream_packet_delegate(cef_audio_handler_t* self, cef_browser_t* browser, float** data, int frames, long pts); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_audio_stream_stopped_delegate(cef_audio_handler_t* self, cef_browser_t* browser); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_audio_stream_error_delegate(cef_audio_handler_t* self, cef_browser_t* browser, cef_string_t* message); + + private static int _sizeof; + + static cef_audio_handler_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_audio_handler_t)); + } + + internal static cef_audio_handler_t* Alloc() + { + var ptr = (cef_audio_handler_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_audio_handler_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_audio_handler_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs index 4f7865ee..6824b999 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_browser_host_t.g.cs @@ -34,6 +34,9 @@ internal unsafe struct cef_browser_host_t 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 _set_mouse_cursor_change_disabled; internal IntPtr _is_mouse_cursor_change_disabled; @@ -231,6 +234,24 @@ internal unsafe struct cef_browser_host_t #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] @@ -884,648 +905,699 @@ public static int has_dev_tools(cef_browser_host_t* self) return d(self); } - // GetNavigationEntries + // SendDevToolsMessage private static IntPtr _p19; - private static get_navigation_entries_delegate _d19; + private static send_dev_tools_message_delegate _d19; + + 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 == _p19) { d = _d19; } + else + { + d = (send_dev_tools_message_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_dev_tools_message_delegate)); + if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + } + return d(self, message, message_size); + } + + // ExecuteDevToolsMethod + private static IntPtr _p1a; + private static execute_dev_tools_method_delegate _d1a; + + 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 == _p1a) { d = _d1a; } + else + { + d = (execute_dev_tools_method_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(execute_dev_tools_method_delegate)); + if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + } + return d(self, message_id, method, @params); + } + + // AddDevToolsMessageObserver + private static IntPtr _p1b; + private static add_dev_tools_message_observer_delegate _d1b; + + 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 == _p1b) { d = _d1b; } + else + { + d = (add_dev_tools_message_observer_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_dev_tools_message_observer_delegate)); + if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + } + return d(self, observer); + } + + // GetNavigationEntries + private static IntPtr _p1c; + private static get_navigation_entries_delegate _d1c; 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 == _p19) { d = _d19; } + if (p == _p1c) { d = _d1c; } else { d = (get_navigation_entries_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_navigation_entries_delegate)); - if (_p19 == IntPtr.Zero) { _d19 = d; _p19 = p; } + if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } } d(self, visitor, current_only); } // SetMouseCursorChangeDisabled - private static IntPtr _p1a; - private static set_mouse_cursor_change_disabled_delegate _d1a; + private static IntPtr _p1d; + private static set_mouse_cursor_change_disabled_delegate _d1d; public static void set_mouse_cursor_change_disabled(cef_browser_host_t* self, int disabled) { set_mouse_cursor_change_disabled_delegate d; var p = self->_set_mouse_cursor_change_disabled; - if (p == _p1a) { d = _d1a; } + if (p == _p1d) { d = _d1d; } else { d = (set_mouse_cursor_change_disabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_mouse_cursor_change_disabled_delegate)); - if (_p1a == IntPtr.Zero) { _d1a = d; _p1a = p; } + if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } } d(self, disabled); } // IsMouseCursorChangeDisabled - private static IntPtr _p1b; - private static is_mouse_cursor_change_disabled_delegate _d1b; + private static IntPtr _p1e; + private static is_mouse_cursor_change_disabled_delegate _d1e; public static int is_mouse_cursor_change_disabled(cef_browser_host_t* self) { is_mouse_cursor_change_disabled_delegate d; var p = self->_is_mouse_cursor_change_disabled; - if (p == _p1b) { d = _d1b; } + if (p == _p1e) { d = _d1e; } else { d = (is_mouse_cursor_change_disabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_mouse_cursor_change_disabled_delegate)); - if (_p1b == IntPtr.Zero) { _d1b = d; _p1b = p; } + if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } } return d(self); } // ReplaceMisspelling - private static IntPtr _p1c; - private static replace_misspelling_delegate _d1c; + private static IntPtr _p1f; + private static replace_misspelling_delegate _d1f; 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 == _p1c) { d = _d1c; } + if (p == _p1f) { d = _d1f; } else { d = (replace_misspelling_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(replace_misspelling_delegate)); - if (_p1c == IntPtr.Zero) { _d1c = d; _p1c = p; } + if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } } d(self, word); } // AddWordToDictionary - private static IntPtr _p1d; - private static add_word_to_dictionary_delegate _d1d; + private static IntPtr _p20; + private static add_word_to_dictionary_delegate _d20; 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 == _p1d) { d = _d1d; } + if (p == _p20) { d = _d20; } else { d = (add_word_to_dictionary_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_word_to_dictionary_delegate)); - if (_p1d == IntPtr.Zero) { _d1d = d; _p1d = p; } + if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } } d(self, word); } // IsWindowRenderingDisabled - private static IntPtr _p1e; - private static is_window_rendering_disabled_delegate _d1e; + private static IntPtr _p21; + private static is_window_rendering_disabled_delegate _d21; 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 == _p1e) { d = _d1e; } + if (p == _p21) { d = _d21; } else { d = (is_window_rendering_disabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_window_rendering_disabled_delegate)); - if (_p1e == IntPtr.Zero) { _d1e = d; _p1e = p; } + if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } } return d(self); } // WasResized - private static IntPtr _p1f; - private static was_resized_delegate _d1f; + private static IntPtr _p22; + private static was_resized_delegate _d22; public static void was_resized(cef_browser_host_t* self) { was_resized_delegate d; var p = self->_was_resized; - if (p == _p1f) { d = _d1f; } + if (p == _p22) { d = _d22; } else { d = (was_resized_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_resized_delegate)); - if (_p1f == IntPtr.Zero) { _d1f = d; _p1f = p; } + if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } } d(self); } // WasHidden - private static IntPtr _p20; - private static was_hidden_delegate _d20; + private static IntPtr _p23; + private static was_hidden_delegate _d23; public static void was_hidden(cef_browser_host_t* self, int hidden) { was_hidden_delegate d; var p = self->_was_hidden; - if (p == _p20) { d = _d20; } + if (p == _p23) { d = _d23; } else { d = (was_hidden_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(was_hidden_delegate)); - if (_p20 == IntPtr.Zero) { _d20 = d; _p20 = p; } + if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } } d(self, hidden); } // NotifyScreenInfoChanged - private static IntPtr _p21; - private static notify_screen_info_changed_delegate _d21; + private static IntPtr _p24; + private static notify_screen_info_changed_delegate _d24; 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 == _p21) { d = _d21; } + if (p == _p24) { d = _d24; } else { d = (notify_screen_info_changed_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_screen_info_changed_delegate)); - if (_p21 == IntPtr.Zero) { _d21 = d; _p21 = p; } + if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } } d(self); } // Invalidate - private static IntPtr _p22; - private static invalidate_delegate _d22; + private static IntPtr _p25; + private static invalidate_delegate _d25; public static void invalidate(cef_browser_host_t* self, CefPaintElementType type) { invalidate_delegate d; var p = self->_invalidate; - if (p == _p22) { d = _d22; } + if (p == _p25) { d = _d25; } else { d = (invalidate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(invalidate_delegate)); - if (_p22 == IntPtr.Zero) { _d22 = d; _p22 = p; } + if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } } d(self, type); } // SendExternalBeginFrame - private static IntPtr _p23; - private static send_external_begin_frame_delegate _d23; + private static IntPtr _p26; + private static send_external_begin_frame_delegate _d26; 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 == _p23) { d = _d23; } + if (p == _p26) { d = _d26; } else { d = (send_external_begin_frame_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_external_begin_frame_delegate)); - if (_p23 == IntPtr.Zero) { _d23 = d; _p23 = p; } + if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } } d(self); } // SendKeyEvent - private static IntPtr _p24; - private static send_key_event_delegate _d24; + private static IntPtr _p27; + private static send_key_event_delegate _d27; 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 == _p24) { d = _d24; } + if (p == _p27) { d = _d27; } else { d = (send_key_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_key_event_delegate)); - if (_p24 == IntPtr.Zero) { _d24 = d; _p24 = p; } + if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } } d(self, @event); } // SendMouseClickEvent - private static IntPtr _p25; - private static send_mouse_click_event_delegate _d25; + private static IntPtr _p28; + private static send_mouse_click_event_delegate _d28; 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 == _p25) { d = _d25; } + if (p == _p28) { d = _d28; } else { d = (send_mouse_click_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_click_event_delegate)); - if (_p25 == IntPtr.Zero) { _d25 = d; _p25 = p; } + if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } } d(self, @event, type, mouseUp, clickCount); } // SendMouseMoveEvent - private static IntPtr _p26; - private static send_mouse_move_event_delegate _d26; + private static IntPtr _p29; + private static send_mouse_move_event_delegate _d29; 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 == _p26) { d = _d26; } + if (p == _p29) { d = _d29; } else { d = (send_mouse_move_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_move_event_delegate)); - if (_p26 == IntPtr.Zero) { _d26 = d; _p26 = p; } + if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } } d(self, @event, mouseLeave); } // SendMouseWheelEvent - private static IntPtr _p27; - private static send_mouse_wheel_event_delegate _d27; + private static IntPtr _p2a; + private static send_mouse_wheel_event_delegate _d2a; 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 == _p27) { d = _d27; } + if (p == _p2a) { d = _d2a; } else { d = (send_mouse_wheel_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_mouse_wheel_event_delegate)); - if (_p27 == IntPtr.Zero) { _d27 = d; _p27 = p; } + if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } } d(self, @event, deltaX, deltaY); } // SendTouchEvent - private static IntPtr _p28; - private static send_touch_event_delegate _d28; + private static IntPtr _p2b; + private static send_touch_event_delegate _d2b; 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 == _p28) { d = _d28; } + if (p == _p2b) { d = _d2b; } else { d = (send_touch_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_touch_event_delegate)); - if (_p28 == IntPtr.Zero) { _d28 = d; _p28 = p; } + if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } } d(self, @event); } // SendFocusEvent - private static IntPtr _p29; - private static send_focus_event_delegate _d29; + private static IntPtr _p2c; + private static send_focus_event_delegate _d2c; public static void send_focus_event(cef_browser_host_t* self, int setFocus) { send_focus_event_delegate d; var p = self->_send_focus_event; - if (p == _p29) { d = _d29; } + if (p == _p2c) { d = _d2c; } else { d = (send_focus_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_focus_event_delegate)); - if (_p29 == IntPtr.Zero) { _d29 = d; _p29 = p; } + if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } } d(self, setFocus); } // SendCaptureLostEvent - private static IntPtr _p2a; - private static send_capture_lost_event_delegate _d2a; + 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 == _p2a) { d = _d2a; } + if (p == _p2d) { d = _d2d; } else { d = (send_capture_lost_event_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(send_capture_lost_event_delegate)); - if (_p2a == IntPtr.Zero) { _d2a = d; _p2a = p; } + if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } } d(self); } // NotifyMoveOrResizeStarted - private static IntPtr _p2b; - private static notify_move_or_resize_started_delegate _d2b; + 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 == _p2b) { d = _d2b; } + if (p == _p2e) { d = _d2e; } else { d = (notify_move_or_resize_started_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(notify_move_or_resize_started_delegate)); - if (_p2b == IntPtr.Zero) { _d2b = d; _p2b = p; } + if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } } d(self); } // GetWindowlessFrameRate - private static IntPtr _p2c; - private static get_windowless_frame_rate_delegate _d2c; + 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 == _p2c) { d = _d2c; } + if (p == _p2f) { d = _d2f; } else { d = (get_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_windowless_frame_rate_delegate)); - if (_p2c == IntPtr.Zero) { _d2c = d; _p2c = p; } + if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } } return d(self); } // SetWindowlessFrameRate - private static IntPtr _p2d; - private static set_windowless_frame_rate_delegate _d2d; + 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 == _p2d) { d = _d2d; } + if (p == _p30) { d = _d30; } else { d = (set_windowless_frame_rate_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_windowless_frame_rate_delegate)); - if (_p2d == IntPtr.Zero) { _d2d = d; _p2d = p; } + if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } } d(self, frame_rate); } // ImeSetComposition - private static IntPtr _p2e; - private static ime_set_composition_delegate _d2e; + 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 == _p2e) { d = _d2e; } + if (p == _p31) { d = _d31; } else { d = (ime_set_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_set_composition_delegate)); - if (_p2e == IntPtr.Zero) { _d2e = d; _p2e = p; } + if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } } d(self, text, underlinesCount, underlines, replacement_range, selection_range); } // ImeCommitText - private static IntPtr _p2f; - private static ime_commit_text_delegate _d2f; + 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 == _p2f) { d = _d2f; } + if (p == _p32) { d = _d32; } else { d = (ime_commit_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_commit_text_delegate)); - if (_p2f == IntPtr.Zero) { _d2f = d; _p2f = p; } + if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } } d(self, text, replacement_range, relative_cursor_pos); } // ImeFinishComposingText - private static IntPtr _p30; - private static ime_finish_composing_text_delegate _d30; + 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 == _p30) { d = _d30; } + if (p == _p33) { d = _d33; } else { d = (ime_finish_composing_text_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_finish_composing_text_delegate)); - if (_p30 == IntPtr.Zero) { _d30 = d; _p30 = p; } + if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } } d(self, keep_selection); } // ImeCancelComposition - private static IntPtr _p31; - private static ime_cancel_composition_delegate _d31; + 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 == _p31) { d = _d31; } + if (p == _p34) { d = _d34; } else { d = (ime_cancel_composition_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(ime_cancel_composition_delegate)); - if (_p31 == IntPtr.Zero) { _d31 = d; _p31 = p; } + if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } } d(self); } // DragTargetDragEnter - private static IntPtr _p32; - private static drag_target_drag_enter_delegate _d32; + 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 == _p32) { d = _d32; } + if (p == _p35) { d = _d35; } else { d = (drag_target_drag_enter_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_enter_delegate)); - if (_p32 == IntPtr.Zero) { _d32 = d; _p32 = p; } + if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } } d(self, drag_data, @event, allowed_ops); } // DragTargetDragOver - private static IntPtr _p33; - private static drag_target_drag_over_delegate _d33; + 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 == _p33) { d = _d33; } + if (p == _p36) { d = _d36; } else { d = (drag_target_drag_over_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_over_delegate)); - if (_p33 == IntPtr.Zero) { _d33 = d; _p33 = p; } + if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } } d(self, @event, allowed_ops); } // DragTargetDragLeave - private static IntPtr _p34; - private static drag_target_drag_leave_delegate _d34; + 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 == _p34) { d = _d34; } + if (p == _p37) { d = _d37; } else { d = (drag_target_drag_leave_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drag_leave_delegate)); - if (_p34 == IntPtr.Zero) { _d34 = d; _p34 = p; } + if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } } d(self); } // DragTargetDrop - private static IntPtr _p35; - private static drag_target_drop_delegate _d35; + 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 == _p35) { d = _d35; } + if (p == _p38) { d = _d38; } else { d = (drag_target_drop_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_target_drop_delegate)); - if (_p35 == IntPtr.Zero) { _d35 = d; _p35 = p; } + if (_p38 == IntPtr.Zero) { _d38 = d; _p38 = p; } } d(self, @event); } // DragSourceEndedAt - private static IntPtr _p36; - private static drag_source_ended_at_delegate _d36; + 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 == _p36) { d = _d36; } + if (p == _p39) { d = _d39; } else { d = (drag_source_ended_at_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_ended_at_delegate)); - if (_p36 == IntPtr.Zero) { _d36 = d; _p36 = p; } + if (_p39 == IntPtr.Zero) { _d39 = d; _p39 = p; } } d(self, x, y, op); } // DragSourceSystemDragEnded - private static IntPtr _p37; - private static drag_source_system_drag_ended_delegate _d37; + 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 == _p37) { d = _d37; } + if (p == _p3a) { d = _d3a; } else { d = (drag_source_system_drag_ended_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(drag_source_system_drag_ended_delegate)); - if (_p37 == IntPtr.Zero) { _d37 = d; _p37 = p; } + if (_p3a == IntPtr.Zero) { _d3a = d; _p3a = p; } } d(self); } // GetVisibleNavigationEntry - private static IntPtr _p38; - private static get_visible_navigation_entry_delegate _d38; + 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 == _p38) { d = _d38; } + if (p == _p3b) { d = _d3b; } else { d = (get_visible_navigation_entry_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_visible_navigation_entry_delegate)); - if (_p38 == IntPtr.Zero) { _d38 = d; _p38 = p; } + if (_p3b == IntPtr.Zero) { _d3b = d; _p3b = p; } } return d(self); } // SetAccessibilityState - private static IntPtr _p39; - private static set_accessibility_state_delegate _d39; + 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 == _p39) { d = _d39; } + if (p == _p3c) { d = _d3c; } else { d = (set_accessibility_state_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_accessibility_state_delegate)); - if (_p39 == IntPtr.Zero) { _d39 = d; _p39 = p; } + if (_p3c == IntPtr.Zero) { _d3c = d; _p3c = p; } } d(self, accessibility_state); } // SetAutoResizeEnabled - private static IntPtr _p3a; - private static set_auto_resize_enabled_delegate _d3a; + 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 == _p3a) { d = _d3a; } + if (p == _p3d) { d = _d3d; } else { d = (set_auto_resize_enabled_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_auto_resize_enabled_delegate)); - if (_p3a == IntPtr.Zero) { _d3a = d; _p3a = p; } + if (_p3d == IntPtr.Zero) { _d3d = d; _p3d = p; } } d(self, enabled, min_size, max_size); } // GetExtension - private static IntPtr _p3b; - private static get_extension_delegate _d3b; + 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 == _p3b) { d = _d3b; } + if (p == _p3e) { d = _d3e; } else { d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate)); - if (_p3b == IntPtr.Zero) { _d3b = d; _p3b = p; } + if (_p3e == IntPtr.Zero) { _d3e = d; _p3e = p; } } return d(self); } // IsBackgroundHost - private static IntPtr _p3c; - private static is_background_host_delegate _d3c; + 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 == _p3c) { d = _d3c; } + if (p == _p3f) { d = _d3f; } else { d = (is_background_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_background_host_delegate)); - if (_p3c == IntPtr.Zero) { _d3c = d; _p3c = p; } + if (_p3f == IntPtr.Zero) { _d3f = d; _p3f = p; } } return d(self); } // SetAudioMuted - private static IntPtr _p3d; - private static set_audio_muted_delegate _d3d; + 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 == _p3d) { d = _d3d; } + if (p == _p40) { d = _d40; } else { d = (set_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_audio_muted_delegate)); - if (_p3d == IntPtr.Zero) { _d3d = d; _p3d = p; } + if (_p40 == IntPtr.Zero) { _d40 = d; _p40 = p; } } d(self, mute); } // IsAudioMuted - private static IntPtr _p3e; - private static is_audio_muted_delegate _d3e; + 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 == _p3e) { d = _d3e; } + if (p == _p41) { d = _d41; } else { d = (is_audio_muted_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_audio_muted_delegate)); - if (_p3e == IntPtr.Zero) { _d3e = d; _p3e = p; } + if (_p41 == IntPtr.Zero) { _d41 = d; _p41 = p; } } return d(self); } diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_client_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_client_t.g.cs index dcf1952e..7e84a4dc 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_client_t.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_client_t.g.cs @@ -13,6 +13,7 @@ namespace Xilium.CefGlue.Interop internal unsafe struct cef_client_t { internal cef_base_ref_counted_t _base; + internal IntPtr _get_audio_handler; internal IntPtr _get_context_menu_handler; internal IntPtr _get_dialog_handler; internal IntPtr _get_display_handler; @@ -52,6 +53,12 @@ internal unsafe struct cef_client_t #endif internal delegate int has_at_least_one_ref_delegate(cef_client_t* self); + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate cef_audio_handler_t* get_audio_handler_delegate(cef_client_t* self); + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] #if !DEBUG [SuppressUnmanagedCodeSecurity] diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_dev_tools_message_observer_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_dev_tools_message_observer_t.g.cs new file mode 100644 index 00000000..a13b95c2 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_dev_tools_message_observer_t.g.cs @@ -0,0 +1,97 @@ +// +// 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_dev_tools_message_observer_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _on_dev_tools_message; + internal IntPtr _on_dev_tools_method_result; + internal IntPtr _on_dev_tools_event; + internal IntPtr _on_dev_tools_agent_attached; + internal IntPtr _on_dev_tools_agent_detached; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_dev_tools_message_observer_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_dev_tools_message_observer_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_dev_tools_message_observer_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_dev_tools_message_observer_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int on_dev_tools_message_delegate(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, void* message, UIntPtr message_size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_dev_tools_method_result_delegate(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, int message_id, int success, void* result, UIntPtr result_size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_dev_tools_event_delegate(cef_dev_tools_message_observer_t* self, cef_browser_t* browser, cef_string_t* method, void* @params, UIntPtr params_size); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_dev_tools_agent_attached_delegate(cef_dev_tools_message_observer_t* self, cef_browser_t* browser); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_dev_tools_agent_detached_delegate(cef_dev_tools_message_observer_t* self, cef_browser_t* browser); + + private static int _sizeof; + + static cef_dev_tools_message_observer_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_dev_tools_message_observer_t)); + } + + internal static cef_dev_tools_message_observer_t* Alloc() + { + var ptr = (cef_dev_tools_message_observer_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_dev_tools_message_observer_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_dev_tools_message_observer_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_device_info_callback_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_device_info_callback_t.g.cs new file mode 100644 index 00000000..a822cdae --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_device_info_callback_t.g.cs @@ -0,0 +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_media_sink_device_info_callback_t + { + internal cef_base_ref_counted_t _base; + internal IntPtr _on_media_sink_device_info; + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void add_ref_delegate(cef_media_sink_device_info_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int release_delegate(cef_media_sink_device_info_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_one_ref_delegate(cef_media_sink_device_info_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate int has_at_least_one_ref_delegate(cef_media_sink_device_info_callback_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + internal delegate void on_media_sink_device_info_delegate(cef_media_sink_device_info_callback_t* self, cef_media_sink_device_info_t* device_info); + + private static int _sizeof; + + static cef_media_sink_device_info_callback_t() + { + _sizeof = Marshal.SizeOf(typeof(cef_media_sink_device_info_callback_t)); + } + + internal static cef_media_sink_device_info_callback_t* Alloc() + { + var ptr = (cef_media_sink_device_info_callback_t*)Marshal.AllocHGlobal(_sizeof); + *ptr = new cef_media_sink_device_info_callback_t(); + ptr->_base._size = (UIntPtr)_sizeof; + return ptr; + } + + internal static void Free(cef_media_sink_device_info_callback_t* ptr) + { + Marshal.FreeHGlobal((IntPtr)ptr); + } + + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_t.g.cs index e9fff339..e7b7969b 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_t.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_media_sink_t.g.cs @@ -17,6 +17,8 @@ internal unsafe struct cef_media_sink_t internal IntPtr _is_valid; internal IntPtr _get_name; internal IntPtr _get_description; + internal IntPtr _get_icon_type; + internal IntPtr _get_device_info; internal IntPtr _is_cast_sink; internal IntPtr _is_dial_sink; internal IntPtr _is_compatible_with; @@ -69,6 +71,18 @@ internal unsafe struct cef_media_sink_t #endif private delegate cef_string_userfree* get_description_delegate(cef_media_sink_t* self); + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate CefMediaSinkIconType get_icon_type_delegate(cef_media_sink_t* self); + + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] + #if !DEBUG + [SuppressUnmanagedCodeSecurity] + #endif + private delegate void get_device_info_delegate(cef_media_sink_t* self, cef_media_sink_device_info_callback_t* callback); + [UnmanagedFunctionPointer(libcef.CEF_CALLBACK)] #if !DEBUG [SuppressUnmanagedCodeSecurity] @@ -223,53 +237,87 @@ public static int is_valid(cef_media_sink_t* self) return d(self); } - // IsCastSink + // GetIconType private static IntPtr _p8; - private static is_cast_sink_delegate _d8; + private static get_icon_type_delegate _d8; + + public static CefMediaSinkIconType get_icon_type(cef_media_sink_t* self) + { + get_icon_type_delegate d; + var p = self->_get_icon_type; + if (p == _p8) { d = _d8; } + else + { + d = (get_icon_type_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_icon_type_delegate)); + if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + } + return d(self); + } + + // GetDeviceInfo + private static IntPtr _p9; + private static get_device_info_delegate _d9; + + public static void get_device_info(cef_media_sink_t* self, cef_media_sink_device_info_callback_t* callback) + { + get_device_info_delegate d; + var p = self->_get_device_info; + if (p == _p9) { d = _d9; } + else + { + d = (get_device_info_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_device_info_delegate)); + if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + } + d(self, callback); + } + + // IsCastSink + private static IntPtr _pa; + private static is_cast_sink_delegate _da; public static int is_cast_sink(cef_media_sink_t* self) { is_cast_sink_delegate d; var p = self->_is_cast_sink; - if (p == _p8) { d = _d8; } + if (p == _pa) { d = _da; } else { d = (is_cast_sink_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_cast_sink_delegate)); - if (_p8 == IntPtr.Zero) { _d8 = d; _p8 = p; } + if (_pa == IntPtr.Zero) { _da = d; _pa = p; } } return d(self); } // IsDialSink - private static IntPtr _p9; - private static is_dial_sink_delegate _d9; + private static IntPtr _pb; + private static is_dial_sink_delegate _db; public static int is_dial_sink(cef_media_sink_t* self) { is_dial_sink_delegate d; var p = self->_is_dial_sink; - if (p == _p9) { d = _d9; } + if (p == _pb) { d = _db; } else { d = (is_dial_sink_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_dial_sink_delegate)); - if (_p9 == IntPtr.Zero) { _d9 = d; _p9 = p; } + if (_pb == IntPtr.Zero) { _db = d; _pb = p; } } return d(self); } // IsCompatibleWith - private static IntPtr _pa; - private static is_compatible_with_delegate _da; + private static IntPtr _pc; + private static is_compatible_with_delegate _dc; public static int is_compatible_with(cef_media_sink_t* self, cef_media_source_t* source) { is_compatible_with_delegate d; var p = self->_is_compatible_with; - if (p == _pa) { d = _da; } + if (p == _pc) { d = _dc; } else { d = (is_compatible_with_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_compatible_with_delegate)); - if (_pa == IntPtr.Zero) { _da = d; _pa = p; } + if (_pc == IntPtr.Zero) { _dc = d; _pc = p; } } return d(self, source); } diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs index 172c150e..964c244c 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/Classes.g/cef_request_handler_t.g.cs @@ -23,6 +23,7 @@ internal unsafe struct cef_request_handler_t internal IntPtr _on_plugin_crashed; 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 @@ -108,6 +109,12 @@ internal unsafe struct cef_request_handler_t #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() diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_audio_parameters_t.cs b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_audio_parameters_t.cs new file mode 100644 index 00000000..4d4da102 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_audio_parameters_t.cs @@ -0,0 +1,16 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + internal unsafe struct cef_audio_parameters_t + { + public CefChannelLayout channel_layout; + public int sample_rate; + public int frames_per_buffer; + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_cookie_t.cs b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_cookie_t.cs index 27e7966b..7cadcb4d 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_cookie_t.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_cookie_t.cs @@ -19,6 +19,8 @@ internal unsafe struct cef_cookie_t public cef_time_t last_access; public int has_expires; public cef_time_t expires; + public CefCookieSameSite same_site; + public CefCookiePriority priority; internal static void Clear(cef_cookie_t* ptr) { diff --git a/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_media_sink_device_info_t.cs b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_media_sink_device_info_t.cs new file mode 100644 index 00000000..6c4ecabc --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Interop/Structs/cef_media_sink_device_info_t.cs @@ -0,0 +1,16 @@ +// +// This file manually written from cef/include/internal/cef_types.h. +// +namespace Xilium.CefGlue.Interop +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack = libcef.ALIGN)] + internal unsafe struct cef_media_sink_device_info_t + { + public cef_string_t ip_address; + public int port; + public cef_string_t model_name; + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Interop/libcef.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/libcef.g.cs index da066c50..d3df0d8a 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/libcef.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/libcef.g.cs @@ -133,6 +133,10 @@ internal static unsafe partial class libcef [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, CefJsonParserError* error_code_out, cef_string_t* error_msg_out); diff --git a/src/Chromely.CefGlue/CefGlue/Interop/version.g.cs b/src/Chromely.CefGlue/CefGlue/Interop/version.g.cs index b6282f70..c79e1811 100644 --- a/src/Chromely.CefGlue/CefGlue/Interop/version.g.cs +++ b/src/Chromely.CefGlue/CefGlue/Interop/version.g.cs @@ -9,20 +9,20 @@ namespace Xilium.CefGlue.Interop internal static unsafe partial class libcef { - public const string CEF_VERSION = "81.2.21+ge864886+chromium-81.0.4044.113"; - public const int CEF_VERSION_MAJOR = 81; - public const int CEF_COMMIT_NUMBER = 2173; - public const string CEF_COMMIT_HASH = "e864886056e3747d08ae3cdec5828629a5083a96"; + public const string CEF_VERSION = "83.5.0+gbf03589+chromium-83.0.4103.106"; + public const int CEF_VERSION_MAJOR = 83; + public const int CEF_COMMIT_NUMBER = 2207; + public const string CEF_COMMIT_HASH = "bf03589c4d7c450ecc37294e7ac47d0e8b12e403"; - public const int CHROME_VERSION_MAJOR = 81; + public const int CHROME_VERSION_MAJOR = 83; public const int CHROME_VERSION_MINOR = 0; - public const int CHROME_VERSION_BUILD = 4044; - public const int CHROME_VERSION_PATCH = 113; + public const int CHROME_VERSION_BUILD = 4103; + public const int CHROME_VERSION_PATCH = 106; - public const string CEF_API_HASH_UNIVERSAL = "f76dc8c40e454ef26318d0f83312dadaf909e4c5"; + public const string CEF_API_HASH_UNIVERSAL = "385d8af3c6da76f123f3aa292d3a3308ef456297"; - public const string CEF_API_HASH_PLATFORM_WIN = "831ef33853bb8575bcd097ba65851d4d98a08db8"; - public const string CEF_API_HASH_PLATFORM_MACOSX = "0944363458590a23d84e99eb1b81372be6784b97"; - public const string CEF_API_HASH_PLATFORM_LINUX = "dfd012193a93782cd4b041f4cd71e1e8f2ca401e"; + public const string CEF_API_HASH_PLATFORM_WIN = "4bb528b0bb076ed5177d6581cfca12dd7b2fee04"; + public const string CEF_API_HASH_PLATFORM_MACOSX = "f6580fc0858f3580b7d25e1d094dd0a336132522"; + public const string CEF_API_HASH_PLATFORM_LINUX = "83f3053840abba3b83e43ade58230f10b48591dd"; } } diff --git a/src/Chromely.CefGlue/CefGlue/Structs/CefAudioParameters.cs b/src/Chromely.CefGlue/CefGlue/Structs/CefAudioParameters.cs new file mode 100644 index 00000000..6aaae223 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Structs/CefAudioParameters.cs @@ -0,0 +1,55 @@ +using System; +using Xilium.CefGlue.Interop; + +namespace Xilium.CefGlue +{ + /// + /// Structure representing the audio parameters for setting up the audio handler. + /// + public unsafe ref struct CefAudioParameters + { + private readonly cef_audio_parameters_t* _target; + + internal CefAudioParameters(cef_audio_parameters_t* target) + { + _target = target; + } + + /// + /// Layout of the audio channels. + /// + public CefChannelLayout ChannelLayout + { + readonly get { CheckSelf(); return _target->channel_layout; } + set { CheckSelf(); _target->channel_layout = value; } + } + + /// + /// Sample rate. + /// + public int SampleRate + { + readonly get { CheckSelf(); return _target->sample_rate; } + set { CheckSelf(); _target->sample_rate = value; } + } + + /// + /// Number of frames per buffer. + /// + public int FramesPerBuffer + { + readonly get { CheckSelf(); return _target->frames_per_buffer; } + set { CheckSelf(); _target->frames_per_buffer = value; } + } + + private readonly void CheckSelf() + { + if (_target == null) ThrowCheckSelfFailed(); + } + + private static void ThrowCheckSelfFailed() + { + throw new InvalidOperationException("CefAudioParameters is null."); + } + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Structs/CefCookie.cs b/src/Chromely.CefGlue/CefGlue/Structs/CefCookie.cs index 6dd6937c..97deb3c1 100644 --- a/src/Chromely.CefGlue/CefGlue/Structs/CefCookie.cs +++ b/src/Chromely.CefGlue/CefGlue/Structs/CefCookie.cs @@ -5,21 +5,74 @@ using System.Text; using Xilium.CefGlue.Interop; + /// + /// Cookie information. + /// public sealed unsafe class CefCookie { public CefCookie() { } + /// + /// The cookie name. + /// public string Name { get; set; } + + /// + /// The cookie value. + /// public string Value { get; set; } + + /// + /// If |domain| is empty a host cookie will be created instead of a domain + /// cookie. Domain cookies are stored with a leading "." and are visible to + /// sub-domains whereas host cookies are not. + /// public string Domain { get; set; } + + /// + /// If |path| is non-empty only URLs at or below the path will get the cookie + /// value. + /// public string Path { get; set; } + + /// + /// If |secure| is true the cookie will only be sent for HTTPS requests. + /// public bool Secure { get; set; } + + /// + /// If |httponly| is true the cookie will only be sent for HTTP requests. + /// public bool HttpOnly { get; set; } + + /// + /// The cookie creation date. This is automatically populated by the system on + /// cookie creation. + /// public DateTime Creation { get; set; } + + /// + /// The cookie last access date. This is automatically populated by the system + /// on access. + /// public DateTime LastAccess { get; set; } + + /// + /// The cookie expiration date. + /// public DateTime? Expires { get; set; } + /// + /// Same site. + /// + public CefCookieSameSite SameSite { get; set; } + + /// + /// Priority. + /// + public CefCookiePriority Priority { get; set; } + internal static CefCookie FromNative(cef_cookie_t* ptr) { return new CefCookie @@ -33,6 +86,8 @@ internal static CefCookie FromNative(cef_cookie_t* ptr) Creation = cef_time_t.ToDateTime(&ptr->creation), LastAccess = cef_time_t.ToDateTime(&ptr->last_access), Expires = ptr->has_expires != 0 ? (DateTime?)cef_time_t.ToDateTime(&ptr->expires) : null, + SameSite = ptr->same_site, + Priority = ptr->priority, }; } @@ -50,6 +105,8 @@ internal static CefCookie FromNative(cef_cookie_t* ptr) ptr->last_access = new cef_time_t(LastAccess); ptr->has_expires = Expires != null ? 1 : 0; ptr->expires = Expires != null ? new cef_time_t(Expires.Value) : new cef_time_t(); + ptr->same_site = SameSite; + ptr->priority = Priority; return ptr; } diff --git a/src/Chromely.CefGlue/CefGlue/Structs/CefMediaSinkDeviceInfo.cs b/src/Chromely.CefGlue/CefGlue/Structs/CefMediaSinkDeviceInfo.cs new file mode 100644 index 00000000..26c81ba5 --- /dev/null +++ b/src/Chromely.CefGlue/CefGlue/Structs/CefMediaSinkDeviceInfo.cs @@ -0,0 +1,25 @@ +namespace Xilium.CefGlue +{ + /// + /// Device information for a MediaSink object. + /// + public readonly struct CefMediaSinkDeviceInfo + { + private readonly string _ipAddress; + private readonly int _port; + private readonly string _modelName; + + public CefMediaSinkDeviceInfo(string ipAddress, int port, string modelName) + { + _ipAddress = ipAddress; + _port = port; + _modelName = modelName; + } + + public readonly string IPAddress => _ipAddress; + + public readonly int Port => _port; + + public readonly string ModelName => _modelName; + } +} diff --git a/src/Chromely.CefGlue/CefGlue/Structs/CefRequestContextSettings.cs b/src/Chromely.CefGlue/CefGlue/Structs/CefRequestContextSettings.cs index ae0c61c6..01c36759 100644 --- a/src/Chromely.CefGlue/CefGlue/Structs/CefRequestContextSettings.cs +++ b/src/Chromely.CefGlue/CefGlue/Structs/CefRequestContextSettings.cs @@ -13,13 +13,13 @@ public sealed class CefRequestContextSettings { /// /// The location where cache data for this request context will be stored on - /// disk. If non-empty this must be either equal to or a child directory of - /// CefSettings.root_cache_path. If empty then browsers will be created in - /// "incognito mode" where in-memory caches are used for storage and no data is - /// persisted to disk. HTML5 databases such as localStorage will only persist - /// across sessions if a cache path is specified. To share the global browser - /// cache and related configuration set this value to match the - /// CefSettings.cache_path value. + /// disk. If this value is non-empty then it must be an absolute path that is + /// either equal to or a child directory of CefSettings.root_cache_path. If + /// this value is empty then browsers will be created in "incognito mode" where + /// in-memory caches are used for storage and no data is persisted to disk. + /// HTML5 databases such as localStorage will only persist across sessions if a + /// cache path is specified. To share the global browser cache and related + /// configuration set this value to match the CefSettings.cache_path value. /// public string CachePath { get; set; } diff --git a/src/Chromely.CefGlue/CefGlue/Structs/CefSettings.cs b/src/Chromely.CefGlue/CefGlue/Structs/CefSettings.cs index c1d4a95d..f23e3aea 100644 --- a/src/Chromely.CefGlue/CefGlue/Structs/CefSettings.cs +++ b/src/Chromely.CefGlue/CefGlue/Structs/CefSettings.cs @@ -30,23 +30,25 @@ public CefSettings() /// will be used. If this value is empty on macOS then a helper executable must /// exist at "Contents/Frameworks/<app> Helper.app/Contents/MacOS/<app> Helper" /// in the top-level app bundle. See the comments on CefExecuteProcess() for - /// details. Also configurable using the "browser-subprocess-path" command-line - /// switch. + /// details. If this value is non-empty then it must be an absolute path. Also + /// configurable using the "browser-subprocess-path" command-line switch. /// public string BrowserSubprocessPath { get; set; } /// /// The path to the CEF framework directory on macOS. If this value is empty /// then the framework must exist at "Contents/Frameworks/Chromium Embedded - /// Framework.framework" in the top-level app bundle. Also configurable using - /// the "framework-dir-path" command-line switch. + /// Framework.framework" in the top-level app bundle. If this value is + /// non-empty then it must be an absolute path. Also configurable using the + /// "framework-dir-path" command-line switch. /// public string FrameworkDirPath { get; set; } /// /// The path to the main bundle on macOS. If this value is empty then it - /// defaults to the top-level app bundle. Also configurable using - /// the "main-bundle-path" command-line switch. + /// defaults to the top-level app bundle. If this value is non-empty then it + /// must be an absolute path. Also configurable using the "main-bundle-path" + /// command-line switch. /// public string MainBundlePath { get; set; } @@ -87,33 +89,35 @@ public CefSettings() /// /// The location where data for the global browser cache will be stored on - /// disk. If non-empty this must be either equal to or a child directory of - /// CefSettings.root_cache_path. If empty then browsers will be created in - /// "incognito mode" where in-memory caches are used for storage and no data is - /// persisted to disk. HTML5 databases such as localStorage will only persist - /// across sessions if a cache path is specified. Can be overridden for - /// individual CefRequestContext instances via the - /// CefRequestContextSettings.cache_path value. + /// disk. If this value is non-empty then it must be an absolute path that is + /// either equal to or a child directory of CefSettings.root_cache_path. If + /// this value is empty then browsers will be created in "incognito mode" where + /// in-memory caches are used for storage and no data is persisted to disk. + /// HTML5 databases such as localStorage will only persist across sessions if a + /// cache path is specified. Can be overridden for individual CefRequestContext + /// instances via the CefRequestContextSettings.cache_path value. /// public string CachePath { get; set; } /// /// The root directory that all CefSettings.cache_path and /// CefRequestContextSettings.cache_path values must have in common. If this - /// value is empty and CefSettings.cache_path is non-empty then this value will - /// default to the CefSettings.cache_path value. Failure to set this value - /// correctly may result in the sandbox blocking read/write access to the - /// cache_path directory. + /// value is empty and CefSettings.cache_path is non-empty then it will + /// default to the CefSettings.cache_path value. If this value is non-empty + /// then it must be an absolute path. Failure to set this value correctly may + /// result in the sandbox blocking read/write access to the cache_path + /// directory. /// public string RootCachePath { get; set; } /// /// The location where user data such as spell checking dictionary files will - /// be stored on disk. If empty then the default platform-specific user data - /// directory will be used ("~/.cef_user_data" directory on Linux, - /// "~/Library/Application Support/CEF/User Data" directory on Mac OS X, - /// "Local Settings\Application Data\CEF\User Data" directory under the user - /// profile directory on Windows). + /// be stored on disk. If this value is empty then the default + /// platform-specific user data directory will be used ("~/.cef_user_data" + /// directory on Linux, "~/Library/Application Support/CEF/User Data" directory + /// on Mac OS X, "Local Settings\Application Data\CEF\User Data" directory + /// under the user profile directory on Windows). If this value is non-empty + /// then it must be an absolute path. /// public string UserDataPath { get; set; } @@ -193,17 +197,17 @@ public CefSettings() /// The fully qualified path for the resources directory. If this value is /// empty the cef.pak and/or devtools_resources.pak files must be located in /// the module directory on Windows/Linux or the app bundle Resources directory - /// on Mac OS X. Also configurable using the "resources-dir-path" command-line - /// switch. + /// on Mac OS X. If this value is non-empty then it must be an absolute path. + /// Also configurable using the "resources-dir-path" command-line switch. /// public string ResourcesDirPath { get; set; } /// /// The fully qualified path for the locales directory. If this value is empty - /// the locales directory must be located in the module directory. This value - /// is ignored on Mac OS X where pack files are always loaded from the app - /// bundle resource directory. Also configurable using the "locales-dir-path" - /// command-line switch. + /// the locales directory must be located in the module directory. If this + /// value is non-empty then it must be an absolute path. This value is ignored + /// on Mac OS X where pack files are always loaded from the app bundle + /// Resources directory. Also configurable using the "locales-dir-path" /// public string LocalesDirPath { get; set; } diff --git a/src/Chromely.CefGlue/Chromely.CefGlue.csproj b/src/Chromely.CefGlue/Chromely.CefGlue.csproj index a7825982..8ea9e68d 100644 --- a/src/Chromely.CefGlue/Chromely.CefGlue.csproj +++ b/src/Chromely.CefGlue/Chromely.CefGlue.csproj @@ -1,12 +1,12 @@  - netstandard2.0 + netstandard2.1 AnyCPU - 5.0.81.0 - 5.0.81.0 - 5.0.81.0 - 5.0.81.0 + 5.0.83.0 + 5.0.83.0 + 5.0.83.0 + 5.0.83.0 false true Chromely.CefGlue @@ -18,7 +18,7 @@ Cef Chromium HTML5 Desktop Chromely CefGlue Restful Ajax HTTP XHR MessageRouter .NET Core Chromely CefGlue implementation library - this is in .NET Standard 2.0 as it can be used in both .NET (Windows) and .NET Core (Windows, Linux, MacOS). Chromely.CefGlue version naming is based Chromely and Chromium versions implemented- major.minor.chromuim version.patch e.g 1.0.70.0. - Upgrade to Chromium v81 - 81.2.21+ge864886+chromium-81.0.4044.113. + Upgrade to Chromium v83 - 83.5.0+gbf03589+chromium-83.0.4103.106. Github Repository https://github.com/chromelyapps/Chromely @@ -28,12 +28,12 @@ - bin\Debug\netstandard2.0\Chromely.CefGlue.xml + bin\Debug\netstandard2.1\Chromely.CefGlue.xml 1701;1702; NU5125;7035 - bin\Release\netstandard2.0\Chromely.CefGlue.xml + bin\Release\netstandard2.1\Chromely.CefGlue.xml 1701;1702; NU5125;7035 diff --git a/src/Chromely.Core/Chromely.Core.csproj b/src/Chromely.Core/Chromely.Core.csproj index 0e54f96f..81408f1b 100644 --- a/src/Chromely.Core/Chromely.Core.csproj +++ b/src/Chromely.Core/Chromely.Core.csproj @@ -1,12 +1,12 @@  - netstandard2.0 + netstandard2.1 AnyCPU - 5.0.0.5 - 5.0.0.5 - 5.0.0.5 - 5.0.0.5 + 5.0.0.6 + 5.0.0.6 + 5.0.0.6 + 5.0.0.6 Chromely.Core Chromely Projects Chromely Projects @@ -18,7 +18,7 @@ true false - Upgrade to Chromium v81 - 81.2.21+ge864886+chromium-81.0.4044.113. + Upgrade to Chromium v83 - 83.5.0+gbf03589+chromium-83.0.4103.106. https://github.com/chromelyapps/Chromely Github Repository @@ -28,13 +28,13 @@ - bin\Debug\netstandard2.0\Chromely.Core.xml + bin\Debug\netstandard2.1\Chromely.Core.xml NU1605 1701;1702; NU5125 - bin\Release\netstandard2.0\Chromely.Core.xml + bin\Release\netstandard2.1\Chromely.Core.xml 1701;1702; NU5125;7035 diff --git a/src/Chromely/Chromely.csproj b/src/Chromely/Chromely.csproj index bac3d289..15a3cc0b 100644 --- a/src/Chromely/Chromely.csproj +++ b/src/Chromely/Chromely.csproj @@ -1,12 +1,12 @@  - netstandard2.0 + netstandard2.1 AnyCPU - 5.0.81.0 - 5.0.81.0 - 5.0.81.0 - 5.0.81.0 + 5.0.83.0 + 5.0.83.0 + 5.0.83.0 + 5.0.83.0 false true Chromely @@ -18,7 +18,7 @@ Cef Chromium HTML5 Desktop Chromely CefGlue Restful Ajax HTTP XHR MessageRouter .NET Core Primary Chromely implementation library - this is in .NET Standard 2.0 as it can be used in both .NET (Windows) and .NET Core (Windows, Linux, MacOS). Chromely version naming is based Chromely and Chromium versions implemented- major.minor.chromuim version.patch e.g 1.0.70.0. - Upgrade to Chromium v81 - 81.2.21+ge864886+chromium-81.0.4044.113. + Upgrade to Chromium v83 - 83.5.0+gbf03589+chromium-83.0.4103.106. Github Repository https://github.com/chromelyapps/Chromely @@ -28,12 +28,12 @@ - bin\Debug\netstandard2.0\Chromely.xml + bin\Debug\netstandard2.1\Chromely.xml 1701;1702; NU5125;7035 - bin\Release\netstandard2.0\Chromely.xml + bin\Release\netstandard2.1\Chromely.xml 1701;1702; NU5125;7035 diff --git a/src/Chromely/build/Chromely.props b/src/Chromely/build/Chromely.props index 7836e3e6..3f9d64a3 100644 --- a/src/Chromely/build/Chromely.props +++ b/src/Chromely/build/Chromely.props @@ -10,7 +10,7 @@ chromely_win_cef_downloader.exe download -h "$(MSBuildThisFileDirectory)\chromely_win_cef_downloader.exe" - v81 + v83 diff --git a/src/Chromely/build/chromely_win_cef_downloader.exe b/src/Chromely/build/chromely_win_cef_downloader.exe index ffaea577378063798f4982d947f74813ef1190ce..0769f38122ae3553265200a3d65f4f5f38b33284 100644 GIT binary patch delta 1385 zcmcIkZA?>F7=GWY?d>ImbXHjlQzh-FTrObhKqWVW(kjIC!z1tJu? zfi9@6r>%RjqC^YBU2NW`NJ&RewZawLkz~f=k`)C`gb>ZKc4q_ z-uIk)PVNnk>w@FD@cx4v)z*2ntG(at?sBvt$QKI|;C zh7iP4OD2I1672ww`v64sO9cI}Oj)~Vv&Gj+MwetkzPX{M%Wi@|@g{(@1r;(YO97|M zDpSBEvzip}%4}5%>~Qqbe72qnEI>}r9tqAt^FF&w&c=+hiL#S>l{!P!_u24kx#e@H zt%=;LZT?wAjU_4WaOd*|cctXcy#Gi*%+_(Sf#2g-sEYK z>azGXPvIN8vmlUGlELiRBI?;+{JAG=Gvq+P;y)p_zH)~DXNt@`Rmzo$GX>Se>^Xe! zvbnJTy zYOB<77hq<`ZF2rQVkhbO+|=ll7UlEC#y-oLe1Q3`b#OTdV5D1^?{s}oLopG@jhFIV zpYNg^x}kpVRiy_#(u;5H7Rm?|n@5!WczP0|c)Ux65%b)fT0;cSPLoEkUz55?8o^-=og{Pw?@m*4{9WU=LKHZT zYv?>YR5*s)#0w_39mQiR3V{uy5XFt{*@8?iAH`Ps%%-F}q8OGHT`HH#;32|I2c5->v4fSpaVbK8*eQ9fSv-p=G!!f|sYb83Wvt;Id2xedMeN; zah`D~w{F|FKMbt+v34})#e<@eShE+uDb=b^C#z!msrHM$iAzrm<^5GQqxL7HVPFek dtaK?_Bx`7Jg%2mv2QwHxlcmZfgSZEu;(w+^Qgr|T delta 1151 zcmZvcTTByM6o%It?36)cDoCYT1w;{BFp9=Y|17fzAtYIy+bvz-A1aXILg zzyKF~0Bc$RMD-AY9Fr;Yi8h<+luYH)N8sDml{8FC0dLM0fTX;sMmD=2<``K~KP)n` z#r?3_Uc*)pv1$r3dnbgs)W7pS1sh8mO;R?6U!`+Gx;s>wp|^RGNh?VGU7IEyCOvND zfr>(@GnGH6;AvJfcs+m9x|7)?kv^m}TV_SP#$}b-E&PzHN>VNSt1EldOAC0D>?2w0 zSTV|M8K1g7WUID<*Wx)VcD^*hbBjji8z@bXa?C>7%v!Dd_4>xC!w+DhL(M8JUs6KjbTx0&o%HgGKPZPrSeyBm62$Ww z1=DU?WjKJ>G&%wEQ=cdYFs4x$a?+kC&FK46^bw^v5)a}V+CmvHpq z>B(Kn5ge`)Q@WH^OzGEpm7_RLqj+}+vxbmeqy2CjWC&rAPP0(Zsv%C7uGPUSC4@T~ zGz_O@j&~%6ao-?o7@Kr!1zE#*Ql~beV|aCtlcTC@)er%WPj$KhZxoJ|yTt>>w;jP6 zjrM~LBM`wEzHvf~FCW1|`l<%34)tjL?lFmV^yxi@x}a)0v2-5K>$XV#c3#@Omw$S; zNG<64hGyVdW>sm^&f8;7r5sOC+g{}a%|W^93*d66L~~!JyQ~qR z%pLv5jb`~9<=@=VA8wpzS~;)p#-n@E%J!z-j)lel_C|9n@l3v6y|-1b(ri0AosaV! yMQ@WoY=3m5ME^60oo^O-MmW