From ab34cf161b559e3c98354867bb8ac6845c2e9d63 Mon Sep 17 00:00:00 2001 From: amaitland <307872+amaitland@users.noreply.github.com> Date: Thu, 19 Sep 2024 19:03:26 +1000 Subject: [PATCH] Remove Alloy Bootstrap (M128) (continued) - Fix netcore lib Resolves #4795 --- .../CefSharp.Core.Runtime.netcore.cs | 11 +-- .../CefSharp.Core.Runtime.netcore.vcxproj | 4 - ...Sharp.Core.Runtime.netcore.vcxproj.filters | 14 +--- .../CefSharp.Core.Runtime.vcxproj | 1 - .../CefSharp.Core.Runtime.vcxproj.filters | 3 - .../CefGetExtensionResourceCallbackWrapper.h | 74 ------------------- CefSharp.Core/RequestContext.netcore.cs | 15 ---- 7 files changed, 2 insertions(+), 120 deletions(-) delete mode 100644 CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs index 91e1d8b3cf..8ac9aa96b7 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.netcore.cs @@ -57,7 +57,7 @@ public Cef() { } public static bool CrashReportingEnabled { get { throw null; } } public static System.Threading.Tasks.TaskFactory FileThreadTaskFactory { get { throw null; } set { } } public static System.Threading.Tasks.TaskFactory IOThreadTaskFactory { get { throw null; } set { } } - public static bool IsInitialized { get { throw null; } } + public static bool? IsInitialized { get { throw null; } } public static bool IsShutdown { get { throw null; } } public static System.Threading.Tasks.TaskFactory UIThreadTaskFactory { get { throw null; } set { } } public static bool AddCrossOriginWhitelistEntry(string sourceOrigin, string targetProtocol, string targetDomain, bool allowTargetSubdomains) { throw null; } @@ -103,7 +103,6 @@ public CefSettingsBase() { } public string CachePath { get { throw null; } set { } } public CefSharp.Internals.CommandLineArgDictionary CefCommandLineArgs { get { throw null; } } public System.Collections.Generic.IEnumerable CefCustomSchemes { get { throw null; } } - public bool ChromeRuntime { get { throw null; } set { } } public bool CommandLineArgsDisabled { get { throw null; } set { } } public bool CookieableSchemesExcludeDefaults { get { throw null; } set { } } public string CookieableSchemesList { get { throw null; } set { } } @@ -114,9 +113,7 @@ public CefSettingsBase() { } public string LogFile { get { throw null; } set { } } public CefSharp.LogSeverity LogSeverity { get { throw null; } set { } } public bool MultiThreadedMessageLoop { get { throw null; } set { } } - public bool PackLoadingDisabled { get { throw null; } set { } } public bool PersistSessionCookies { get { throw null; } set { } } - public bool PersistUserPreferences { get { throw null; } set { } } public int RemoteDebuggingPort { get { throw null; } set { } } public string ResourcesDirPath { get { throw null; } set { } } public string RootCachePath { get { throw null; } set { } } @@ -270,20 +267,15 @@ public virtual void ClearHttpAuthCredentials(CefSharp.ICompletionCallback callba public virtual bool ClearSchemeHandlerFactories() { throw null; } public virtual void CloseAllConnections(CefSharp.ICompletionCallback callback) { } public static CefSharp.IRequestContext CreateContext(CefSharp.IRequestContext other, CefSharp.IRequestContextHandler requestContextHandler) { throw null; } - public virtual bool DidLoadExtension(string extensionId) { throw null; } public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~RequestContext() { } public virtual System.Collections.Generic.IDictionary GetAllPreferences(bool includeDefaults) { throw null; } public virtual CefSharp.ICookieManager GetCookieManager(CefSharp.ICompletionCallback callback) { throw null; } - public virtual CefSharp.IExtension GetExtension(string extensionId) { throw null; } - public virtual bool GetExtensions(out System.Collections.Generic.IList extensionIds) { throw null; } public virtual object GetPreference(string name) { throw null; } - public virtual bool HasExtension(string extensionId) { throw null; } public virtual bool HasPreference(string name) { throw null; } public virtual bool IsSame(CefSharp.IRequestContext context) { throw null; } public virtual bool IsSharingWith(CefSharp.IRequestContext context) { throw null; } - public virtual void LoadExtension(string rootDirectory, string manifestJson, CefSharp.IExtensionHandler handler) { } public virtual bool RegisterSchemeHandlerFactory(string schemeName, string domainName, CefSharp.ISchemeHandlerFactory factory) { throw null; } public virtual System.Threading.Tasks.Task ResolveHostAsync(System.Uri origin) { throw null; } public virtual bool SetPreference(string name, object value, out string error) { throw null; } @@ -298,7 +290,6 @@ public RequestContextSettings() { } public bool CookieableSchemesExcludeDefaults { get { throw null; } set { } } public string CookieableSchemesList { get { throw null; } set { } } public bool PersistSessionCookies { get { throw null; } set { } } - public bool PersistUserPreferences { get { throw null; } set { } } public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~RequestContextSettings() { } diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj index 3d7f155cd7..ebe469fa2c 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj @@ -335,7 +335,6 @@ - @@ -374,9 +373,6 @@ - - - diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters index b9a360b8bd..f225404bd0 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters @@ -62,9 +62,6 @@ Source Files - - Source Files - Source Files @@ -124,7 +121,7 @@ Header Files - + Header Files @@ -262,15 +259,6 @@ Header Files - - Header Files - - - Header Files - - - Header Files - Header Files diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index 0a1fab68d7..207fb6e033 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -276,7 +276,6 @@ - diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters index 11ece6552f..203ef52396 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters @@ -253,9 +253,6 @@ Header Files - - Header Files - Header Files diff --git a/CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h deleted file mode 100644 index 600d6d103e..0000000000 --- a/CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright © 2015 The CefSharp Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. - -#pragma once - -#include "Stdafx.h" - -#include "include\cef_download_handler.h" -#include "CefWrapper.h" - -using namespace System::IO; - -namespace CefSharp -{ - namespace Internals - { - private ref class CefGetExtensionResourceCallbackWrapper : public IGetExtensionResourceCallback, public CefWrapper - { - private: - MCefRefPtr _callback; - - public: - CefGetExtensionResourceCallbackWrapper(CefRefPtr &callback) - : _callback(callback) - { - } - - !CefGetExtensionResourceCallbackWrapper() - { - _callback = nullptr; - } - - ~CefGetExtensionResourceCallbackWrapper() - { - this->!CefGetExtensionResourceCallbackWrapper(); - - _disposed = true; - } - - virtual void Cancel() - { - ThrowIfDisposed(); - - _callback->Cancel(); - - delete this; - } - - virtual void Continue(Stream^ stream) - { - ThrowIfDisposed(); - - throw gcnew NotImplementedException(); - - delete this; - } - - virtual void Continue(cli::array^ data) - { - ThrowIfDisposed(); - - pin_ptr src = &data[0]; - - auto streamReader = CefStreamReader::CreateForData(static_cast(src), data->Length); - - _callback->Continue(streamReader); - - delete this; - } - }; - } -} - diff --git a/CefSharp.Core/RequestContext.netcore.cs b/CefSharp.Core/RequestContext.netcore.cs index a41fc2d576..12a470970b 100644 --- a/CefSharp.Core/RequestContext.netcore.cs +++ b/CefSharp.Core/RequestContext.netcore.cs @@ -41,21 +41,6 @@ public RequestContext(CefSharp.RequestContextSettings settings, CefSharp.IReques { } - public override void LoadExtension(string rootDirectory, string manifestJson, IExtensionHandler handler) - { - if (Cef.CurrentlyOnThread(CefThreadIds.TID_UI)) - { - base.LoadExtension(rootDirectory, manifestJson, handler); - } - else - { - Cef.UIThreadTaskFactory.StartNew(() => - { - base.LoadExtension(rootDirectory, manifestJson, handler); - }); - } - } - /// /// Creates a new RequestContextBuilder which can be used to fluently set /// preferences