From 54fb53d24e575f70db9dd314f9ffaaa45d0cf05a Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sat, 21 Nov 2020 13:03:30 +1000 Subject: [PATCH 01/37] Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll Partial rename, only Net Core, folder not renamed --- .../CefSharp.Core.RefAssembly.csproj | 6 +++--- ...vcxproj => CefSharp.Core.Runtime.netcore.vcxproj} | 12 ++++++------ ...=> CefSharp.Core.Runtime.netcore.vcxproj.filters} | 0 ...=> packages.CefSharp.Core.Runtime.netcore.config} | 0 CefSharp.Example/CefSharp.Example.netcore.csproj | 2 +- .../CefSharp.OffScreen.Example.netcore.csproj | 2 +- CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj | 2 +- CefSharp.Test/CefSharp.Test.netcore.csproj | 2 +- .../CefSharp.WinForms.Example.netcore.csproj | 2 +- CefSharp.WinForms/CefSharp.WinForms.netcore.csproj | 2 +- .../CefSharp.Wpf.Example.netcore.csproj | 2 +- CefSharp.Wpf/CefSharp.Wpf.netcore.csproj | 2 +- CefSharp3.netcore.sln | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) rename CefSharp.Core/{CefSharp.Core.netcore.vcxproj => CefSharp.Core.Runtime.netcore.vcxproj} (98%) rename CefSharp.Core/{CefSharp.Core.netcore.vcxproj.filters => CefSharp.Core.Runtime.netcore.vcxproj.filters} (100%) rename CefSharp.Core/{packages.CefSharp.Core.netcore.config => packages.CefSharp.Core.Runtime.netcore.config} (100%) diff --git a/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj b/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj index 9654975c51..95777bb8bd 100644 --- a/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj +++ b/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj @@ -15,7 +15,7 @@ false - + false @@ -33,12 +33,12 @@ - $(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.dll + $(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.Runtime.dll - $(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.dll + $(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.Runtime.dll diff --git a/CefSharp.Core/CefSharp.Core.netcore.vcxproj b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj similarity index 98% rename from CefSharp.Core/CefSharp.Core.netcore.vcxproj rename to CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj index 5dbbf01492..0fdadaafe2 100644 --- a/CefSharp.Core/CefSharp.Core.netcore.vcxproj +++ b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj @@ -22,7 +22,7 @@ 16.0 {7B495581-2271-4F41-9476-ACB86E8C864F} - CefSharp.Core + CefSharp.Core.Runtime CefSharp NetCoreCProj netcoreapp3.1 @@ -76,7 +76,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -86,7 +86,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime bin.netcore\$(Platform)\$(Configuration)\ obj.netcore\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -97,7 +97,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime ..\CefSharp.snk obj.netcore\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -107,7 +107,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime ..\CefSharp.snk bin.netcore\$(Platform)\$(Configuration)\ obj.netcore\$(Platform)\$(Configuration)\ @@ -356,7 +356,7 @@ - + diff --git a/CefSharp.Core/CefSharp.Core.netcore.vcxproj.filters b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters similarity index 100% rename from CefSharp.Core/CefSharp.Core.netcore.vcxproj.filters rename to CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters diff --git a/CefSharp.Core/packages.CefSharp.Core.netcore.config b/CefSharp.Core/packages.CefSharp.Core.Runtime.netcore.config similarity index 100% rename from CefSharp.Core/packages.CefSharp.Core.netcore.config rename to CefSharp.Core/packages.CefSharp.Core.Runtime.netcore.config diff --git a/CefSharp.Example/CefSharp.Example.netcore.csproj b/CefSharp.Example/CefSharp.Example.netcore.csproj index 48036ed04e..0311a62f77 100644 --- a/CefSharp.Example/CefSharp.Example.netcore.csproj +++ b/CefSharp.Example/CefSharp.Example.netcore.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj index 245c57bd7e..ee74073c9b 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj @@ -22,7 +22,7 @@ - + diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj index 5aa11ea4e8..ac04d2ad3b 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp.Test/CefSharp.Test.netcore.csproj b/CefSharp.Test/CefSharp.Test.netcore.csproj index 1fe79708b8..43ea09301a 100644 --- a/CefSharp.Test/CefSharp.Test.netcore.csproj +++ b/CefSharp.Test/CefSharp.Test.netcore.csproj @@ -22,7 +22,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj index 34fe73b2db..3e81a91779 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj @@ -22,7 +22,7 @@ - + diff --git a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj index a2263111b8..93cd07bcbf 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj index 30c25dbb2e..9686827789 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj index c78155c2e8..b8e54f4b5e 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln index 4389eb5a40..0822e9ff46 100644 --- a/CefSharp3.netcore.sln +++ b/CefSharp3.netcore.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.30223.230 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.netcore", "CefSharp\CefSharp.netcore.csproj", "{39E385AD-DC5C-451E-B061-09AF3EE038EB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core.netcore", "CefSharp.Core\CefSharp.Core.netcore.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core.Runtime.netcore", "CefSharp.Core\CefSharp.Core.Runtime.netcore.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.BrowserSubprocess.Core.netcore", "CefSharp.BrowserSubprocess.Core\CefSharp.BrowserSubprocess.Core.netcore.vcxproj", "{6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}" EndProject From 870e2d33f74ebb1eea6bf73d973e4892a62656ad Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sat, 21 Nov 2020 13:11:18 +1000 Subject: [PATCH 02/37] Net Core - Renaem CefSharp.Core.RefAssembly to CefSharp.Core.netcore Remove GenApi --- .../CefSharp.Core.RefAssembly.csproj | 67 ------------------- .../CefSharp.Core.netcore.csproj | 22 ++++++ .../Properties/AssemblyInfo.cs | 0 CefSharp3.netcore.sln | 2 +- 4 files changed, 23 insertions(+), 68 deletions(-) delete mode 100644 CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj create mode 100644 CefSharp.Core.netcore/CefSharp.Core.netcore.csproj rename {CefSharp.Core.RefAssembly => CefSharp.Core.netcore}/Properties/AssemblyInfo.cs (100%) diff --git a/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj b/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj deleted file mode 100644 index 95777bb8bd..0000000000 --- a/CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj +++ /dev/null @@ -1,67 +0,0 @@ - - - netcoreapp3.1 - CefSharp.Core - CefSharp.Core - $(BaseOutputPath)$(PlatformTarget)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml - false - true - ..\CefSharp.snk - MinimumRecommendedRules.ruleset - CS1591,CS0436 - - - - - false - - - false - - - - - - - - - - - - - $(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.Runtime.dll - - - - - $(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.Runtime.dll - - - - - false - $(ProjectDir) - $(GenAPITargetDir)$(AssemblyName).cs - - - - - - - - - - - - - diff --git a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj new file mode 100644 index 0000000000..f1caab5cba --- /dev/null +++ b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj @@ -0,0 +1,22 @@ + + + netcoreapp3.1 + CefSharp.Core + CefSharp.Core + $(BaseOutputPath)$(PlatformTarget)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + CS1591,CS0436 + + + + + false + + + false + + + \ No newline at end of file diff --git a/CefSharp.Core.RefAssembly/Properties/AssemblyInfo.cs b/CefSharp.Core.netcore/Properties/AssemblyInfo.cs similarity index 100% rename from CefSharp.Core.RefAssembly/Properties/AssemblyInfo.cs rename to CefSharp.Core.netcore/Properties/AssemblyInfo.cs diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln index 0822e9ff46..90c1f0d3c0 100644 --- a/CefSharp3.netcore.sln +++ b/CefSharp3.netcore.sln @@ -69,7 +69,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Test.netcore", "Ce {FBFBD752-467C-444F-93E4-80D6242E8513} = {FBFBD752-467C-444F-93E4-80D6242E8513} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.RefAssembly", "CefSharp.Core.RefAssembly\CefSharp.Core.RefAssembly.csproj", "{310E5602-C920-4A4C-B0B0-178155528149}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.netcore", "CefSharp.Core.netcore\CefSharp.Core.netcore.csproj", "{310E5602-C920-4A4C-B0B0-178155528149}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From df1a65c5b7bda9010cd3715eecb0f3d709a20bc2 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sat, 21 Nov 2020 13:20:39 +1000 Subject: [PATCH 03/37] Core - Rename CefDragDataWrapper to DragData Move into CefSharp.Core namespace --- .../CefSharp.Core.Runtime.netcore.vcxproj | 2 +- ...Sharp.Core.Runtime.netcore.vcxproj.filters | 8 +++--- CefSharp.Core/CefSharp.Core.vcxproj | 2 +- CefSharp.Core/CefSharp.Core.vcxproj.filters | 3 +++ .../CefDragDataWrapper.h => DragData.h} | 26 +++++++++---------- .../Internals/CefBrowserHostWrapper.cpp | 4 +-- CefSharp.Core/Internals/ClientAdapter.cpp | 4 +-- CefSharp.Core/Internals/RenderClientAdapter.h | 4 ++- CefSharp.Core/ManagedCefBrowserAdapter.h | 1 - CefSharp.Wpf/ChromiumWebBrowser.cs | 2 +- CefSharp.Wpf/Internals/WpfExtensions.cs | 5 ++-- 11 files changed, 32 insertions(+), 29 deletions(-) rename CefSharp.Core/{Internals/CefDragDataWrapper.h => DragData.h} (89%) diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj index 0fdadaafe2..aef9ca1a73 100644 --- a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj @@ -284,7 +284,7 @@ - + diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters index 2c54a04f14..5d2cf7f776 100644 --- a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters +++ b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters @@ -124,9 +124,6 @@ Header Files - - Header Files - Header Files @@ -337,6 +334,9 @@ Header Files + + Header Files + Header Files @@ -353,6 +353,6 @@ - + \ No newline at end of file diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj index 4b41c38ebf..3f7fd58276 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj +++ b/CefSharp.Core/CefSharp.Core.vcxproj @@ -264,6 +264,7 @@ + @@ -290,7 +291,6 @@ - diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters index 5b2ccbc032..59011a4e50 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj.filters +++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters @@ -337,6 +337,9 @@ Header Files + + Header Files + Header Files diff --git a/CefSharp.Core/Internals/CefDragDataWrapper.h b/CefSharp.Core/DragData.h similarity index 89% rename from CefSharp.Core/Internals/CefDragDataWrapper.h rename to CefSharp.Core/DragData.h index 0c08418421..b5aa4fc04f 100644 --- a/CefSharp.Core/Internals/CefDragDataWrapper.h +++ b/CefSharp.Core/DragData.h @@ -8,25 +8,24 @@ #include "include/cef_drag_data.h" -#include "CefWrapper.h" -#include "CefImageWrapper.h" -#include "CefWriteHandlerWrapper.h" +#include "Internals\CefWrapper.h" +#include "Internals\CefImageWrapper.h" +#include "Internals\CefWriteHandlerWrapper.h" using namespace std; using namespace System::IO; namespace CefSharp { - namespace Internals + namespace Core { - //TODO: Rename to DragData and move from internals as this is used publically - public ref class CefDragDataWrapper : public IDragData, public CefWrapper + public ref class DragData : public IDragData, public CefWrapper { private: MCefRefPtr _wrappedDragData; internal: - CefDragDataWrapper(CefRefPtr &dragData) : + DragData(CefRefPtr &dragData) : _wrappedDragData(dragData) { IsReadOnly = dragData->IsReadOnly(); @@ -36,14 +35,14 @@ namespace CefSharp IsLink = dragData->IsLink(); } - !CefDragDataWrapper() + !DragData() { _wrappedDragData = nullptr; } - ~CefDragDataWrapper() + ~DragData() { - this->!CefDragDataWrapper(); + this->!DragData(); _disposed = true; } @@ -66,17 +65,16 @@ namespace CefSharp virtual IDragData^ Clone() { - return gcnew CefDragDataWrapper(_wrappedDragData->Clone()); + return gcnew DragData(_wrappedDragData->Clone()); } /// // Create a new CefDragData object. /// /*--cef()--*/ - static CefDragDataWrapper^ Create() + static IDragData^ Create() { - CefRefPtr cefDragData = CefDragData::Create(); - return gcnew CefDragDataWrapper(cefDragData); + return gcnew DragData(CefDragData::Create()); } //TODO: Vector is a pointer, so can potentially be updated (items may be possibly removed) diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp index d22d2c8761..0986ad0aee 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp @@ -11,7 +11,7 @@ #include "Cef.h" #include "CefExtensionWrapper.h" #include "CefTaskScheduler.h" -#include "CefDragDataWrapper.h" +#include "DragData.h" #include "CefRunFileDialogCallbackAdapter.h" #include "CefPdfPrintCallbackWrapper.h" #include "CefNavigationEntryVisitorAdapter.h" @@ -24,7 +24,7 @@ void CefBrowserHostWrapper::DragTargetDragEnter(IDragData^ dragData, MouseEvent { ThrowIfDisposed(); - auto dragDataWrapper = static_cast(dragData); + auto dragDataWrapper = static_cast(dragData); dragDataWrapper->ResetFileContents(); // Recommended by documentation to reset before calling DragEnter _browserHost->DragTargetDragEnter(static_cast>(dragDataWrapper), GetCefMouseEvent(mouseEvent), (CefBrowserHost::DragOperationsMask) allowedOperations); } diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp index 2c45434f17..4b888c554d 100644 --- a/CefSharp.Core/Internals/ClientAdapter.cpp +++ b/CefSharp.Core/Internals/ClientAdapter.cpp @@ -13,7 +13,7 @@ #include "CefCertificateCallbackWrapper.h" #include "CefContextMenuParamsWrapper.h" #include "CefDownloadItemCallbackWrapper.h" -#include "CefDragDataWrapper.h" +#include "DragData.h" #include "CefFileDialogCallbackWrapper.h" #include "CefFrameWrapper.h" #include "CefJSDialogCallbackWrapper.h" @@ -972,7 +972,7 @@ namespace CefSharp return false; } - CefDragDataWrapper dragDataWrapper(dragData); + DragData dragDataWrapper(dragData); auto browserWrapper = GetBrowserWrapper(browser->GetIdentifier(), browser->IsPopup()); return handler->OnDragEnter(_browserControl, browserWrapper, %dragDataWrapper, (CefSharp::Enums::DragOperationsMask)mask); diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h index 269137b586..ea43963a52 100644 --- a/CefSharp.Core/Internals/RenderClientAdapter.h +++ b/CefSharp.Core/Internals/RenderClientAdapter.h @@ -7,11 +7,13 @@ #include "Stdafx.h" #include +#include "DragData.h" #include "ClientAdapter.h" #include "CefValueWrapper.h" using namespace msclr; using namespace CefSharp::Structs; +using namespace CefSharp::Core; namespace CefSharp { @@ -179,7 +181,7 @@ namespace CefSharp virtual DECL bool StartDragging(CefRefPtr browser, CefRefPtr dragData, CefRenderHandler::DragOperationsMask allowedOps, int x, int y) OVERRIDE { - CefDragDataWrapper dragDataWrapper(dragData); + DragData dragDataWrapper(dragData); return _renderWebBrowser->StartDragging(%dragDataWrapper, (CefSharp::Enums::DragOperationsMask)allowedOps, x, y); } diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h index e6bff64e23..a01595c2e1 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.h +++ b/CefSharp.Core/ManagedCefBrowserAdapter.h @@ -14,7 +14,6 @@ #include "BrowserSettings.h" #include "RequestContext.h" #include "Internals/ClientAdapter.h" -#include "Internals/CefDragDataWrapper.h" #include "Internals/RenderClientAdapter.h" #include "Internals/JavascriptCallbackFactory.h" diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index bd87ef30f1..453761238c 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -1581,7 +1581,7 @@ private void OnDragEnter(object sender, DragEventArgs e) //DoDragDrop will fire this handler for internally sourced Drag/Drop operations //we use the existing IDragData (cloned copy) - var dragData = currentDragData ?? e.GetDragDataWrapper(); + var dragData = currentDragData ?? e.GetDragData(); browser.GetHost().DragTargetDragEnter(dragData, mouseEvent, effect); browser.GetHost().DragTargetDragOver(mouseEvent, effect); diff --git a/CefSharp.Wpf/Internals/WpfExtensions.cs b/CefSharp.Wpf/Internals/WpfExtensions.cs index fb04f69537..e3aea4a612 100644 --- a/CefSharp.Wpf/Internals/WpfExtensions.cs +++ b/CefSharp.Wpf/Internals/WpfExtensions.cs @@ -7,6 +7,7 @@ using System.Text; using System.Windows; using System.Windows.Input; +using CefSharp.Core; using CefSharp.Internals; namespace CefSharp.Wpf.Internals @@ -119,10 +120,10 @@ public static CefEventFlags GetModifiers(this KeyEventArgs e) /// /// The instance containing the event data. /// CefDragDataWrapper. - public static CefDragDataWrapper GetDragDataWrapper(this DragEventArgs e) + public static IDragData GetDragData(this DragEventArgs e) { // Convert Drag Data - var dragData = CefDragDataWrapper.Create(); + var dragData = DragData.Create(); // Files dragData.IsFile = e.Data.GetDataPresent(DataFormats.FileDrop); From b74847e4c670894894b226884bb65e5ebdb0dde5 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 11 Nov 2020 19:31:20 +1000 Subject: [PATCH 04/37] WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package --- .../CefSharp.BrowserSubprocess.Core.vcxproj | 5 ++- ...ges.CefSharp.BrowserSubprocess.Core.config | 1 + CefSharp.Core/CefSharp.Core.vcxproj | 5 ++- CefSharp.Core/packages.CefSharp.Core.config | 1 + CefSharp.OffScreen/CefSharp.OffScreen.csproj | 4 +++ CefSharp.OffScreen/packages.config | 1 + CefSharp.WinForms/CefSharp.WinForms.csproj | 2 ++ CefSharp.WinForms/packages.config | 1 + CefSharp.Wpf/CefSharp.Wpf.csproj | 2 ++ CefSharp.Wpf/packages.config | 1 + CefSharp/CefSharp.csproj | 2 ++ CefSharp/packages.config | 1 + build.ps1 | 36 +------------------ 13 files changed, 25 insertions(+), 37 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index 09f7e398eb..6a6008ac92 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -1,6 +1,7 @@  + Debug @@ -247,5 +248,7 @@ - + + + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config index 2fd4594c80..ab22f6d165 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config +++ b/CefSharp.BrowserSubprocess.Core/packages.CefSharp.BrowserSubprocess.Core.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj index 3f7fd58276..3e2ffae679 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj +++ b/CefSharp.Core/CefSharp.Core.vcxproj @@ -1,6 +1,7 @@  + Debug @@ -361,5 +362,7 @@ - + + + \ No newline at end of file diff --git a/CefSharp.Core/packages.CefSharp.Core.config b/CefSharp.Core/packages.CefSharp.Core.config index 2fd4594c80..ab22f6d165 100644 --- a/CefSharp.Core/packages.CefSharp.Core.config +++ b/CefSharp.Core/packages.CefSharp.Core.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj index 4255fcbf2c..f3d15dbc9d 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj @@ -1,5 +1,6 @@ + @@ -17,6 +18,8 @@ 7.1 + true + ..\CefSharp.snk true @@ -104,6 +107,7 @@ + + + obj.netcore\ + bin.netcore\ + + + + netcoreapp3.1 CefSharp.Core @@ -19,4 +29,6 @@ false + + \ No newline at end of file diff --git a/CefSharp.Core.netcore/PublicApi.cs b/CefSharp.Core.netcore/PublicApi.cs index 78ded6d498..90662e6f98 100644 --- a/CefSharp.Core.netcore/PublicApi.cs +++ b/CefSharp.Core.netcore/PublicApi.cs @@ -212,13 +212,13 @@ public static int ExecuteProcess() /// XMLHttpRequest requests on http://target.example.com if the /// http://target.example.com request returns an "Access-Control-Allow-Origin: /// https://source.example.com" response header. - // + /// /// Scripts in separate frames or iframes and hosted from the same protocol and /// domain suffix can execute cross-origin JavaScript if both pages set the /// document.domain value to the same domain suffix. For example, /// scheme://foo.example.com and scheme://bar.example.com can communicate using /// JavaScript if both domains set document.domain="example.com". - // + /// /// This method is used to allow access to origins that would otherwise violate /// the same-origin policy. Scripts hosted underneath the fully qualified /// URL (like http://www.example.com) will be allowed access to @@ -229,7 +229,7 @@ public static int ExecuteProcess() /// true sub-domain matches will be allowed. If is empty and /// if true all domains and IP addresses will be /// allowed. - // + /// /// This method cannot be used to bypass the restrictions on local or display /// isolated schemes. See the comments on for more /// information. From c00c57a3727d99651d26014d3f1a2c6283a5f15b Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 17:02:46 +1000 Subject: [PATCH 08/37] Net Core - Restructure nuget packages --- CefSharp.BrowserSubprocess.Core/Resource.rc | 8 ++--- CefSharp.BrowserSubprocess/app.manifest | 2 +- CefSharp.Core/Resource.rc | 8 ++--- CefSharp.OffScreen.Example/app.manifest | 2 +- CefSharp.WinForms.Example/app.manifest | 2 +- CefSharp.Wpf.Example/app.manifest | 2 +- CefSharp.shfbproj | 4 +-- CefSharp/Properties/AssemblyInfo.cs | 4 +-- .../CefSharp.Common.NETCore.nuspec | 30 ++++++++++--------- .../CefSharp.Common.NETCore.targets | 4 +-- build.netcore.ps1 | 4 +-- 11 files changed, 36 insertions(+), 34 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index 8e931a3681..a8f3e00993 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 86,0,20 - PRODUCTVERSION 86,0,20 + FILEVERSION 87,1,6 + PRODUCTVERSION 87,1,6 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "86.0.20" + VALUE "FileVersion", "87.1.6" VALUE "LegalCopyright", "Copyright © 2020 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "86.0.20" + VALUE "ProductVersion", "87.1.6" END END BLOCK "VarFileInfo" diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index bfa62ccd9e..65c66abca9 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core/Resource.rc b/CefSharp.Core/Resource.rc index 86c834d3c4..4715bee3a0 100644 --- a/CefSharp.Core/Resource.rc +++ b/CefSharp.Core/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 86,0,20 - PRODUCTVERSION 86,0,20 + FILEVERSION 87,1,6 + PRODUCTVERSION 87,1,6 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "86.0.20" + VALUE "FileVersion", "87.1.6" VALUE "LegalCopyright", "Copyright © 2020 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "86.0.20" + VALUE "ProductVersion", "87.1.6" END END BLOCK "VarFileInfo" diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index 9006e320f7..b6be50d068 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index 76fbe6494e..6031115aaf 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index 767fa3e415..d47a582262 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.shfbproj b/CefSharp.shfbproj index 78aa247e96..d942e3008a 100644 --- a/CefSharp.shfbproj +++ b/CefSharp.shfbproj @@ -31,7 +31,7 @@ - 86.0.20 + 87.1.6 2 False C#, Managed C++ @@ -59,7 +59,7 @@ InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected, EditorBrowsableNever, NonBrowsable - Version 86.0.20 + Version 87.1.6 https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE Interfaces, enums, structs and classes that make up the core API interface diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 1cdc48b7b7..552c1f0d12 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ public static class AssemblyInfo public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "86.0.20"; - public const string AssemblyFileVersion = "86.0.20.0"; + public const string AssemblyVersion = "87.1.6"; + public const string AssemblyFileVersion = "87.1.6.0"; public const string AssemblyCopyright = "Copyright © 2020 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec index cc9ed29227..db63c41e46 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec @@ -20,30 +20,32 @@ - - + + - - + + + + - - - + + + - - - + + + - - + + - - + + diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.targets b/NuGet/PackageReference/CefSharp.Common.NETCore.targets index 7eb2b0f109..768a670e10 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.targets +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.targets @@ -35,8 +35,8 @@ - - + + runtimes\win-x86\native\locales\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest diff --git a/build.netcore.ps1 b/build.netcore.ps1 index 16569c53b5..b74237b96b 100644 --- a/build.netcore.ps1 +++ b/build.netcore.ps1 @@ -14,7 +14,7 @@ $nuget = Join-Path $WorkingDir .\nuget\NuGet.exe # Extract the current CEF Redist version from the CefSharp.Core\packages.CefSharp.Core.config file # Save having to update this file manually Example 3.2704.1418 -$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\packages.CefSharp.Core.netcore.config')) +$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\packages.CefSharp.Core.Runtime.netcore.config')) $RedistVersion = $CefSharpCorePackagesXml.SelectSingleNode("//packages/package[@id='cef.sdk']/@version").value function Write-Diagnostic @@ -169,7 +169,7 @@ function Compile Write-Diagnostic "Restore Nuget Packages" # Restore packages - . $nuget restore CefSharp.Core\packages.CefSharp.Core.netcore.config -PackagesDirectory packages + . $nuget restore CefSharp.Core\packages.CefSharp.Core.Runtime.netcore.config -PackagesDirectory packages . $nuget restore CefSharp.BrowserSubprocess.Core\packages.CefSharp.BrowserSubprocess.Core.netcore.config -PackagesDirectory packages &msbuild /t:restore CefSharp3.netcore.sln From 11ecc7756bd216cda1c37984156fc1a378f0a4b0 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 17:49:02 +1000 Subject: [PATCH 09/37] Net Core - Add Cefsharp.Core.Runtime.RefAssembly --- ...rp.Core.Runtime.RefAssembly.netcore.csproj | 79 ++++ .../CefSharp.Core.Runtime.cs | 356 ++++++++++++++++++ .../Properties/AssemblyInfo.cs | 19 + .../CefSharp.Core.netcore.csproj | 10 +- CefSharp.Core.netcore/PublicApi.cs | 53 +++ CefSharp.Core/BrowserSubprocess/SelfHost.cpp | 49 --- CefSharp.Core/BrowserSubprocess/SelfHost.h | 39 -- .../CefSharp.Core.Runtime.netcore.vcxproj | 2 - ...Sharp.Core.Runtime.netcore.vcxproj.filters | 6 - CefSharp.Core/CookieManager.h | 2 +- CefSharp3.netcore.sln | 10 + .../CefSharp.Common.NETCore.nuspec | 13 +- 12 files changed, 534 insertions(+), 104 deletions(-) create mode 100644 CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj create mode 100644 CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs create mode 100644 CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs delete mode 100644 CefSharp.Core/BrowserSubprocess/SelfHost.cpp delete mode 100644 CefSharp.Core/BrowserSubprocess/SelfHost.h diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj new file mode 100644 index 0000000000..722b9aac2c --- /dev/null +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj @@ -0,0 +1,79 @@ + + + + + obj.netcore\ + bin.netcore\ + + + + + + netcoreapp3.1 + CefSharp.Core + CefSharp.Core.Runtime + $(BaseOutputPath)$(PlatformTarget)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + CS1591,CS0436 + + + + + false + + + false + + + + + + + + + + + + + $(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.runtime.dll + + + + + $(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.runtime.dll + + + + + false + $(ProjectDir) + $(GenAPITargetDir)$(AssemblyName).cs + + + + + + + + + + + + + + + diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs new file mode 100644 index 0000000000..eef82f0497 --- /dev/null +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs @@ -0,0 +1,356 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// GenAPI Version: 5.0.2.37403 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ +namespace CefSharp.Core +{ + public partial class BrowserSettings : CefSharp.IBrowserSettings + { + public BrowserSettings() { } + public BrowserSettings(bool autoDispose) { } + public virtual string AcceptLanguageList { get { throw null; } set { } } + public virtual CefSharp.CefState ApplicationCache { get { throw null; } set { } } + public virtual bool AutoDispose { get { throw null; } } + public virtual uint BackgroundColor { get { throw null; } set { } } + public virtual string CursiveFontFamily { get { throw null; } set { } } + public virtual CefSharp.CefState Databases { get { throw null; } set { } } + public virtual string DefaultEncoding { get { throw null; } set { } } + public virtual int DefaultFixedFontSize { get { throw null; } set { } } + public virtual int DefaultFontSize { get { throw null; } set { } } + public virtual string FantasyFontFamily { get { throw null; } set { } } + public virtual CefSharp.CefState FileAccessFromFileUrls { get { throw null; } set { } } + public virtual string FixedFontFamily { get { throw null; } set { } } + public virtual CefSharp.CefState ImageLoading { get { throw null; } set { } } + public virtual CefSharp.CefState ImageShrinkStandaloneToFit { get { throw null; } set { } } + public virtual bool IsDisposed { get { throw null; } } + public virtual CefSharp.CefState Javascript { get { throw null; } set { } } + public virtual CefSharp.CefState JavascriptAccessClipboard { get { throw null; } set { } } + public virtual CefSharp.CefState JavascriptCloseWindows { get { throw null; } set { } } + public virtual CefSharp.CefState JavascriptDomPaste { get { throw null; } set { } } + public virtual CefSharp.CefState LocalStorage { get { throw null; } set { } } + public virtual int MinimumFontSize { get { throw null; } set { } } + public virtual int MinimumLogicalFontSize { get { throw null; } set { } } + public virtual CefSharp.CefState Plugins { get { throw null; } set { } } + public virtual CefSharp.CefState RemoteFonts { get { throw null; } set { } } + public virtual string SansSerifFontFamily { get { throw null; } set { } } + public virtual string SerifFontFamily { get { throw null; } set { } } + public virtual string StandardFontFamily { get { throw null; } set { } } + public virtual CefSharp.CefState TabToLinks { get { throw null; } set { } } + public virtual CefSharp.CefState TextAreaResize { get { throw null; } set { } } + public virtual CefSharp.CefState UniversalAccessFromFileUrls { get { throw null; } set { } } + public virtual CefSharp.CefState WebGl { get { throw null; } set { } } + public virtual CefSharp.CefState WebSecurity { get { throw null; } set { } } + public virtual int WindowlessFrameRate { get { throw null; } set { } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~BrowserSettings() { } + } + public sealed partial class Cef + { + public Cef() { } + public static string CefCommitHash { get { throw null; } } + public static string CefSharpVersion { get { throw null; } } + public static string CefVersion { get { throw null; } } + public static string ChromiumVersion { get { throw null; } } + 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 System.Threading.Tasks.TaskFactory UIThreadTaskFactory { get { throw null; } set { } } + public static bool AddCrossOriginWhitelistEntry(string sourceOrigin, string targetProtocol, string targetDomain, bool allowTargetSubdomains) { throw null; } + public static void AddDisposable(System.IDisposable item) { } + public static bool ClearCrossOriginWhitelist() { throw null; } + public static bool ClearSchemeHandlerFactories() { throw null; } + public static uint ColorSetARGB(uint a, uint r, uint g, uint b) { throw null; } + public static bool CurrentlyOnThread(CefSharp.CefThreadIds threadId) { throw null; } + public static void DoMessageLoopWork() { } + public static void EnableHighDPISupport() { } + public static void EnableWaitForBrowsersToClose() { } + public static int ExecuteProcess() { throw null; } + public static CefSharp.ICookieManager GetGlobalCookieManager() { throw null; } + public static CefSharp.ICookieManager GetGlobalCookieManager(CefSharp.ICompletionCallback callback) { throw null; } + public static CefSharp.IRequestContext GetGlobalRequestContext() { throw null; } + public static string GetMimeType(string extension) { throw null; } + public static System.Threading.Tasks.Task> GetPlugins() { throw null; } + public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings) { throw null; } + public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck) { throw null; } + public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck, CefSharp.IApp cefApp) { throw null; } + public static bool Initialize(CefSharp.Core.CefSettingsBase cefSettings, bool performDependencyCheck, CefSharp.IBrowserProcessHandler browserProcessHandler) { throw null; } + public static void PreShutdown() { } + public static void QuitMessageLoop() { } + public static void RefreshWebPlugins() { } + public static void RegisterWidevineCdm(string path, CefSharp.IRegisterCdmCallback callback) { } + public static System.Threading.Tasks.Task RegisterWidevineCdmAsync(string path) { throw null; } + public static bool RemoveCrossOriginWhitelistEntry(string sourceOrigin, string targetProtocol, string targetDomain, bool allowTargetSubdomains) { throw null; } + public static void RemoveDisposable(System.IDisposable item) { } + public static void RunMessageLoop() { } + public static void SetCrashKeyValue(string key, string value) { } + public static void Shutdown() { } + public static void ShutdownWithoutChecks() { } + public static void UnregisterInternalWebPlugin(string path) { } + public static void VisitWebPluginInfo(CefSharp.IWebPluginInfoVisitor visitor) { } + public static void WaitForBrowsersToClose() { } + } + public abstract partial class CefSettingsBase : System.IDisposable + { + public CefSettingsBase() { } + public string AcceptLanguageList { get { throw null; } set { } } + public string ApplicationClientIdForFileScanning { get { throw null; } set { } } + public virtual uint BackgroundColor { get { throw null; } set { } } + public string BrowserSubprocessPath { get { throw null; } set { } } + public string CachePath { get { throw null; } set { } } + public virtual CefSharp.Internals.CommandLineArgDictionary CefCommandLineArgs { get { throw null; } } + public System.Collections.Generic.IEnumerable CefCustomSchemes { get { throw null; } } + public bool CommandLineArgsDisabled { get { throw null; } set { } } + public bool ExternalMessagePump { get { throw null; } set { } } + public bool IgnoreCertificateErrors { get { throw null; } set { } } + public string JavascriptFlags { get { throw null; } set { } } + public string Locale { get { throw null; } set { } } + public string LocalesDirPath { get { throw null; } set { } } + 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 string ProductVersion { 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 { } } + public int UncaughtExceptionStackSize { get { throw null; } set { } } + public string UserAgent { get { throw null; } set { } } + public string UserDataPath { get { throw null; } set { } } + public bool WindowlessRenderingEnabled { get { throw null; } set { } } + public void DisableGpuAcceleration() { } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + public void EnablePrintPreview() { } + ~CefSettingsBase() { } + public void RegisterScheme(CefSharp.CefCustomScheme cefCustomScheme) { } + public void SetOffScreenRenderingBestPerformanceArgs() { } + } + public partial class DragData : CefSharp.Internals.CefWrapper, CefSharp.IDragData + { + internal DragData() { } + public virtual string FileName { get { throw null; } set { } } + public virtual System.Collections.Generic.IList FileNames { get { throw null; } } + public virtual string FragmentBaseUrl { get { throw null; } set { } } + public virtual string FragmentHtml { get { throw null; } set { } } + public virtual string FragmentText { get { throw null; } set { } } + public virtual bool HasImage { get { throw null; } } + public virtual CefSharp.IImage Image { get { throw null; } } + public virtual CefSharp.Structs.Point ImageHotspot { get { throw null; } } + public virtual bool IsFile { get { throw null; } set { } } + public virtual bool IsFragment { get { throw null; } set { } } + public virtual bool IsLink { get { throw null; } set { } } + public virtual bool IsReadOnly { get { throw null; } set { } } + public virtual string LinkMetaData { get { throw null; } set { } } + public virtual string LinkTitle { get { throw null; } set { } } + public virtual string LinkUrl { get { throw null; } set { } } + public virtual void AddFile(string path, string displayName) { } + public virtual CefSharp.IDragData Clone() { throw null; } + public static CefSharp.IDragData Create() { throw null; } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~DragData() { } + public virtual long GetFileContents(System.IO.Stream stream) { throw null; } + public virtual void ResetFileContents() { } + } + public partial class ManagedCefBrowserAdapter : CefSharp.Internals.IBrowserAdapter, System.IDisposable + { + public ManagedCefBrowserAdapter(CefSharp.Internals.IWebBrowserInternal webBrowserInternal, bool offScreenRendering) { } + public virtual bool IsDisposed { get { throw null; } } + public virtual CefSharp.Internals.IJavascriptCallbackFactory JavascriptCallbackFactory { get { throw null; } } + public virtual CefSharp.Internals.IJavascriptObjectRepositoryInternal JavascriptObjectRepository { get { throw null; } } + public virtual CefSharp.Internals.IMethodRunnerQueue MethodRunnerQueue { get { throw null; } } + public void CreateBrowser(CefSharp.IWindowInfo windowInfo, CefSharp.Core.BrowserSettings browserSettings, CefSharp.Core.RequestContext requestContext, string address) { } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~ManagedCefBrowserAdapter() { } + public virtual CefSharp.IBrowser GetBrowser(int browserId) { throw null; } + public virtual void OnAfterBrowserCreated(CefSharp.IBrowser browser) { } + public virtual void Resize(int width, int height) { } + } + public sealed partial class NativeMethodWrapper + { + public NativeMethodWrapper() { } + public static bool IsFocused(System.IntPtr handle) { throw null; } + public static void MemoryCopy(System.IntPtr dest, System.IntPtr src, int numberOfBytes) { } + public static void RemoveExNoActivateStyle(System.IntPtr browserHwnd) { } + public static void SetWindowParent(System.IntPtr child, System.IntPtr newParent) { } + public static void SetWindowPosition(System.IntPtr handle, int x, int y, int width, int height) { } + } + public partial class PopupFeatures : CefSharp.IPopupFeatures, System.IDisposable + { + internal PopupFeatures() { } + public virtual int? Height { get { throw null; } } + public virtual bool MenuBarVisible { get { throw null; } } + public virtual bool ScrollbarsVisible { get { throw null; } } + public virtual bool StatusBarVisible { get { throw null; } } + public virtual bool ToolBarVisible { get { throw null; } } + public virtual int? Width { get { throw null; } } + public virtual int? X { get { throw null; } } + public virtual int? Y { get { throw null; } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~PopupFeatures() { } + } + public partial class PostData : CefSharp.Internals.CefWrapper, CefSharp.IPostData + { + public PostData() { } + public virtual System.Collections.Generic.IList Elements { get { throw null; } } + public virtual bool HasExcludedElements { get { throw null; } } + public virtual bool IsReadOnly { get { throw null; } } + public virtual bool AddElement(CefSharp.IPostDataElement element) { throw null; } + public virtual CefSharp.IPostDataElement CreatePostDataElement() { throw null; } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~PostData() { } + public virtual bool RemoveElement(CefSharp.IPostDataElement element) { throw null; } + public virtual void RemoveElements() { } + } + public partial class PostDataElement : CefSharp.Internals.CefWrapper, CefSharp.IPostDataElement + { + public PostDataElement() { } + public virtual byte[] Bytes { get { throw null; } set { } } + public virtual string File { get { throw null; } set { } } + public virtual bool IsReadOnly { get { throw null; } } + public virtual CefSharp.PostDataElementType Type { get { throw null; } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~PostDataElement() { } + public virtual void SetToEmpty() { } + } + public partial class Request : CefSharp.Internals.CefWrapper, CefSharp.IRequest + { + public Request() { } + public virtual CefSharp.UrlRequestFlags Flags { get { throw null; } set { } } + public virtual System.Collections.Specialized.NameValueCollection Headers { get { throw null; } set { } } + public virtual ulong Identifier { get { throw null; } } + public virtual bool IsReadOnly { get { throw null; } } + public virtual string Method { get { throw null; } set { } } + public virtual CefSharp.IPostData PostData { get { throw null; } set { } } + public virtual CefSharp.ReferrerPolicy ReferrerPolicy { get { throw null; } } + public virtual string ReferrerUrl { get { throw null; } } + public virtual CefSharp.ResourceType ResourceType { get { throw null; } } + public virtual CefSharp.TransitionType TransitionType { get { throw null; } } + public virtual string Url { get { throw null; } set { } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~Request() { } + public virtual string GetHeaderByName(string name) { throw null; } + public virtual void InitializePostData() { } + public virtual void SetHeaderByName(string name, string value, bool overwrite) { } + public virtual void SetReferrer(string referrerUrl, CefSharp.ReferrerPolicy policy) { } + } + public partial class RequestContext : CefSharp.Internals.CefWrapper, CefSharp.IRequestContext + { + public RequestContext() { } + public RequestContext(CefSharp.Core.RequestContextSettings settings) { } + public RequestContext(CefSharp.Core.RequestContextSettings settings, CefSharp.IRequestContextHandler requestContextHandler) { } + public RequestContext(CefSharp.IRequestContext otherRequestContext) { } + public RequestContext(CefSharp.IRequestContext otherRequestContext, CefSharp.IRequestContextHandler requestContextHandler) { } + public RequestContext(CefSharp.IRequestContextHandler requestContextHandler) { } + public virtual string CachePath { get { throw null; } } + public virtual bool IsGlobal { get { throw null; } } + public virtual bool CanSetPreference(string name) { throw null; } + public virtual void ClearCertificateExceptions(CefSharp.ICompletionCallback callback) { } + public virtual void ClearHttpAuthCredentials(CefSharp.ICompletionCallback callback) { } + public virtual bool ClearSchemeHandlerFactories() { throw null; } + public virtual void CloseAllConnections(CefSharp.ICompletionCallback callback) { } + public static CefSharp.Core.RequestContextBuilder Configure() { throw null; } + 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 void PurgePluginListCache(bool reloadPages) { } + 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; } + } + public partial class RequestContextBuilder + { + public RequestContextBuilder() { } + public CefSharp.IRequestContext Create() { throw null; } + public CefSharp.Core.RequestContextBuilder OnInitialize(System.Action action) { throw null; } + public CefSharp.Core.RequestContextBuilder PersistUserPreferences() { throw null; } + public CefSharp.Core.RequestContextBuilder WithCachePath(string cachePath) { throw null; } + public CefSharp.Core.RequestContextBuilder WithPreference(string name, object value) { throw null; } + public CefSharp.Core.RequestContextBuilder WithProxyServer(string host) { throw null; } + public CefSharp.Core.RequestContextBuilder WithProxyServer(string host, int? port) { throw null; } + public CefSharp.Core.RequestContextBuilder WithProxyServer(string scheme, string host, int? port) { throw null; } + public CefSharp.Core.RequestContextBuilder WithSharedSettings(CefSharp.IRequestContext other) { throw null; } + } + public partial class RequestContextSettings : System.IDisposable + { + public RequestContextSettings() { } + public string AcceptLanguageList { get { throw null; } set { } } + public string CachePath { get { throw null; } set { } } + public bool IgnoreCertificateErrors { 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() { } + } + public partial class UrlRequest : CefSharp.Internals.CefWrapper, CefSharp.IUrlRequest + { + public UrlRequest(CefSharp.IRequest request, CefSharp.IUrlRequestClient urlRequestClient) { } + public UrlRequest(CefSharp.IRequest request, CefSharp.IUrlRequestClient urlRequestClient, CefSharp.IRequestContext requestContext) { } + public virtual CefSharp.UrlRequestStatus RequestStatus { get { throw null; } } + public virtual CefSharp.IResponse Response { get { throw null; } } + public virtual bool ResponseWasCached { get { throw null; } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~UrlRequest() { } + } + public partial class WindowInfo : CefSharp.IWindowInfo + { + public WindowInfo() { } + public virtual uint ExStyle { get { throw null; } set { } } + public virtual bool ExternalBeginFrameEnabled { get { throw null; } set { } } + public virtual int Height { get { throw null; } set { } } + public virtual System.IntPtr ParentWindowHandle { get { throw null; } set { } } + public virtual bool SharedTextureEnabled { get { throw null; } set { } } + public virtual uint Style { get { throw null; } set { } } + public virtual int Width { get { throw null; } set { } } + public virtual System.IntPtr WindowHandle { get { throw null; } set { } } + public virtual bool WindowlessRenderingEnabled { get { throw null; } set { } } + public virtual int X { get { throw null; } set { } } + public virtual int Y { get { throw null; } set { } } + public void Dispose() { } + protected virtual void Dispose(bool A_0) { } + ~WindowInfo() { } + public virtual void SetAsChild(System.IntPtr parentHandle) { } + public virtual void SetAsChild(System.IntPtr parentHandle, int left, int top, int right, int bottom) { } + public virtual void SetAsPopup(System.IntPtr parentHandle, string windowName) { } + public virtual void SetAsWindowless(System.IntPtr parentHandle) { } + } +} +namespace CefSharp.Internals +{ + public abstract partial class CefWrapper + { + internal CefWrapper() { } + protected bool _disposed; + public virtual bool IsDisposed { get { throw null; } } + protected void ThrowIfDisposed() { } + protected void ThrowIfExecutedOnNonCefUiThread() { } + } +} diff --git a/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs b/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..5c33df57cf --- /dev/null +++ b/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; +using CefSharp; + +[assembly:AssemblyTitle("CefSharp.Core")] +[assembly:AssemblyDescription("CefSharp Core Library (VC++)")] +[assembly:AssemblyCompany(AssemblyInfo.AssemblyCompany)] +[assembly:AssemblyProduct(AssemblyInfo.AssemblyProduct)] +[assembly:AssemblyCopyright(AssemblyInfo.AssemblyCopyright)] + +[assembly:AssemblyVersion(AssemblyInfo.AssemblyVersion)] +[assembly:ComVisible(AssemblyInfo.ComVisible)] +[assembly:CLSCompliant(AssemblyInfo.ClsCompliant)] + + +[assembly:AssemblyConfiguration("")] +[assembly:AssemblyTrademark("")] +[assembly:AssemblyCulture("")] diff --git a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj index 669c149ca1..d5d7f32aa2 100644 --- a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj +++ b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj @@ -13,13 +13,21 @@ netcoreapp3.1 CefSharp.Core CefSharp.Core - $(BaseOutputPath)$(PlatformTarget)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + $(BaseOutputPath)$(PlatformTarget)$(Configuration)\$(TargetFramework)\$(AssemblyName).xml false true ..\CefSharp.snk MinimumRecommendedRules.ruleset CS1591,CS0436 + + + DEBUG;TRACE;NETCOREAPP + + + + TRACE;NETCOREAPP + diff --git a/CefSharp.Core.netcore/PublicApi.cs b/CefSharp.Core.netcore/PublicApi.cs index 90662e6f98..1e35aa1b60 100644 --- a/CefSharp.Core.netcore/PublicApi.cs +++ b/CefSharp.Core.netcore/PublicApi.cs @@ -4,9 +4,62 @@ using System; using System.Collections.Generic; +using System.IO; using System.Threading.Tasks; using CefSharp.Internals; +namespace CefSharp.BrowserSubprocess +{ + public class SelfHost + { + /// + /// This function should be called from the application entry point function (typically Program.Main) + /// to execute a secondary process e.g. gpu, plugin, renderer, utility + /// This overload is specifically used for .Net Core. For hosting your own BrowserSubProcess + /// it's preferable to use the Main method provided by this class. + /// - Pass in command line args + /// - To support High DPI Displays you should call Cef.EnableHighDPISupport before any other processing + /// or add the relevant entries to your app.manifest + /// + /// command line args + /// + /// If called for the browser process (identified by no "type" command-line value) it will return immediately + /// with a value of -1. If called for a recognized secondary process it will block until the process should exit + /// and then return the process exit code. + /// + public static int Main(string[] args) + { + var type = CommandLineArgsParser.GetArgumentValue(args, CefSharpArguments.SubProcessTypeArgument); + + if (string.IsNullOrEmpty(type)) + { + //If --type param missing from command line CEF/Chromium assums + //this is the main process (as all subprocesses must have a type param). + //Return -1 to indicate this behaviour. + return -1; + } + + var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(CefSharp.Core.BrowserSettings).Assembly.Location), "CefSharp.BrowserSubprocess.Core.dll"); +#if NETCOREAPP + var browserSubprocessDll = System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(browserSubprocessDllPath); +#else + var browserSubprocessDll = System.Reflection.Assembly.LoadFrom(browserSubprocessDllPath); +#endif + var browserSubprocessExecutableType = browserSubprocessDll.GetType("CefSharp.BrowserSubprocess.BrowserSubprocessExecutable"); + var browserSubprocessExecutable = Activator.CreateInstance(browserSubprocessExecutableType); + + var mainMethod = browserSubprocessExecutableType.GetMethod("MainSelfHost", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); + var argCount = mainMethod.GetParameters(); + + var methodArgs = new object[] {args } ; + + var exitCode = mainMethod.Invoke(null, methodArgs); + + return (int)exitCode; + } + } +} + //TODO: Split out into seperate classes namespace CefSharp { diff --git a/CefSharp.Core/BrowserSubprocess/SelfHost.cpp b/CefSharp.Core/BrowserSubprocess/SelfHost.cpp deleted file mode 100644 index b5a79cbc1e..0000000000 --- a/CefSharp.Core/BrowserSubprocess/SelfHost.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © 2020 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. - -#include "Stdafx.h" -#include "SelfHost.h" - -using namespace System; -using namespace System::IO; -using namespace CefSharp; - -namespace CefSharp -{ - namespace BrowserSubprocess - { - int SelfHost::Main(array^ args) - { - auto type = CommandLineArgsParser::GetArgumentValue(args, CefSharpArguments::SubProcessTypeArgument); - - if (String::IsNullOrEmpty(type)) - { - //If --type param missing from command line CEF/Chromium assums - //this is the main process (as all subprocesses must have a type param). - //Return -1 to indicate this behaviour. - return -1; - } - - auto browserSubprocessDllPath = Path::Combine(Path::GetDirectoryName(SelfHost::typeid->Assembly->Location), "CefSharp.BrowserSubprocess.Core.dll"); -#ifdef NETCOREAPP - auto browserSubprocessDll = System::Runtime::Loader::AssemblyLoadContext::Default->LoadFromAssemblyPath(browserSubprocessDllPath); -#else - auto browserSubprocessDll = System::Reflection::Assembly::LoadFrom(browserSubprocessDllPath); -#endif - auto browserSubprocessExecutableType = browserSubprocessDll->GetType("CefSharp.BrowserSubprocess.BrowserSubprocessExecutable"); - auto browserSubprocessExecutable = Activator::CreateInstance(browserSubprocessExecutableType); - - auto mainMethod = browserSubprocessExecutableType->GetMethod("MainSelfHost", System::Reflection::BindingFlags::Static | System::Reflection::BindingFlags::Public); - auto argCount = mainMethod->GetParameters(); - - auto methodArgs = gcnew array(1); - methodArgs[0] = args; - - auto exitCode = mainMethod->Invoke(nullptr, methodArgs); - - return (int)exitCode; - } - - } -} diff --git a/CefSharp.Core/BrowserSubprocess/SelfHost.h b/CefSharp.Core/BrowserSubprocess/SelfHost.h deleted file mode 100644 index 97deb898f6..0000000000 --- a/CefSharp.Core/BrowserSubprocess/SelfHost.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright © 2020 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" - -namespace CefSharp -{ - namespace BrowserSubprocess - { - /// - /// SelfHost can be used to self host the BrowserSubProcess in your - /// existing application (preferred approach for .Net Core). - /// - public ref class SelfHost - { - public: - /// - /// This function should be called from the application entry point function (typically Program.Main) - /// to execute a secondary process e.g. gpu, plugin, renderer, utility - /// This overload is specifically used for .Net Core. For hosting your own BrowserSubProcess - /// it's preferable to use the Main method provided by this class. - /// - Pass in command line args - /// - To support High DPI Displays you should call Cef.EnableHighDPISupport before any other processing - /// or add the relevant entries to your app.manifest - /// - /// command line args - /// - /// If called for the browser process (identified by no "type" command-line value) it will return immediately - /// with a value of -1. If called for a recognized secondary process it will block until the process should exit - /// and then return the process exit code. - /// ^ args); - - }; - } -} diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj index aef9ca1a73..8d4a5f6011 100644 --- a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj @@ -246,7 +246,6 @@ - Create Create @@ -306,7 +305,6 @@ - diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters index 5d2cf7f776..aeadb16348 100644 --- a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters +++ b/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters @@ -86,9 +86,6 @@ Source Files - - Source Files - @@ -337,9 +334,6 @@ Header Files - - Header Files - diff --git a/CefSharp.Core/CookieManager.h b/CefSharp.Core/CookieManager.h index 9aab8c52d3..3eb56cdcf8 100644 --- a/CefSharp.Core/CookieManager.h +++ b/CefSharp.Core/CookieManager.h @@ -13,7 +13,7 @@ namespace CefSharp { //TODO: No longer possible for users to create a CookieManager, can be made private now /// - public ref class CookieManager : public ICookieManager + private ref class CookieManager : public ICookieManager { private: MCefRefPtr _cookieManager; diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln index 90c1f0d3c0..1e53abe0a4 100644 --- a/CefSharp3.netcore.sln +++ b/CefSharp3.netcore.sln @@ -71,6 +71,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Test.netcore", "Ce EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.netcore", "CefSharp.Core.netcore\CefSharp.Core.netcore.csproj", "{310E5602-C920-4A4C-B0B0-178155528149}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.Runtime.RefAssembly.netcore", "CefSharp.Core.Runtime.RefAssembly\CefSharp.Core.Runtime.RefAssembly.netcore.csproj", "{A4AFD158-0B6F-4579-AE79-EC386C8BEA58}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -183,6 +185,14 @@ Global {310E5602-C920-4A4C-B0B0-178155528149}.Release|x64.Build.0 = Release|Any CPU {310E5602-C920-4A4C-B0B0-178155528149}.Release|x86.ActiveCfg = Release|Any CPU {310E5602-C920-4A4C-B0B0-178155528149}.Release|x86.Build.0 = Release|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Debug|x64.ActiveCfg = Debug|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Debug|x64.Build.0 = Debug|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Debug|x86.ActiveCfg = Debug|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Debug|x86.Build.0 = Debug|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Release|x64.ActiveCfg = Release|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Release|x64.Build.0 = Release|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Release|x86.ActiveCfg = Release|Any CPU + {A4AFD158-0B6F-4579-AE79-EC386C8BEA58}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec index db63c41e46..cef98d3ebe 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec @@ -20,18 +20,19 @@ - - + + + - - - - + + + + From 6b7d93204a963fc8e8fd2db4bdb4f7bcdbb40c35 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 19:37:02 +1000 Subject: [PATCH 10/37] Net Core - Hide CLI/C++ classes from intellisense Make sure users don't attempt to load them directly --- .../CefSharp.Core.Runtime.cs | 15 +++++++++++++++ CefSharp.Core.netcore/PublicApi.cs | 2 ++ CefSharp.Core/BrowserSettings.h | 1 + CefSharp.Core/Cef.h | 1 + CefSharp.Core/CefSettingsBase.h | 1 + CefSharp.Core/DragData.h | 1 + CefSharp.Core/ManagedCefBrowserAdapter.h | 1 + CefSharp.Core/NativeMethodWrapper.h | 1 + CefSharp.Core/PopupFeatures.h | 1 + CefSharp.Core/PostData.h | 1 + CefSharp.Core/PostDataElement.h | 1 + CefSharp.Core/Request.h | 1 + CefSharp.Core/RequestContext.h | 1 + CefSharp.Core/RequestContextBuilder.h | 1 + CefSharp.Core/RequestContextSettings.h | 1 + CefSharp.Core/UrlRequest.h | 1 + CefSharp.Core/WindowInfo.h | 1 + 17 files changed, 32 insertions(+) diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs index eef82f0497..2b82c3a0c7 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs @@ -9,6 +9,7 @@ //------------------------------------------------------------------------------ namespace CefSharp.Core { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class BrowserSettings : CefSharp.IBrowserSettings { public BrowserSettings() { } @@ -50,6 +51,7 @@ public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~BrowserSettings() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class Cef { public Cef() { } @@ -96,6 +98,7 @@ public static void UnregisterInternalWebPlugin(string path) { } public static void VisitWebPluginInfo(CefSharp.IWebPluginInfoVisitor visitor) { } public static void WaitForBrowsersToClose() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public abstract partial class CefSettingsBase : System.IDisposable { public CefSettingsBase() { } @@ -134,6 +137,7 @@ public void EnablePrintPreview() { } public void RegisterScheme(CefSharp.CefCustomScheme cefCustomScheme) { } public void SetOffScreenRenderingBestPerformanceArgs() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class DragData : CefSharp.Internals.CefWrapper, CefSharp.IDragData { internal DragData() { } @@ -161,6 +165,7 @@ protected virtual void Dispose(bool A_0) { } public virtual long GetFileContents(System.IO.Stream stream) { throw null; } public virtual void ResetFileContents() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class ManagedCefBrowserAdapter : CefSharp.Internals.IBrowserAdapter, System.IDisposable { public ManagedCefBrowserAdapter(CefSharp.Internals.IWebBrowserInternal webBrowserInternal, bool offScreenRendering) { } @@ -176,6 +181,7 @@ protected virtual void Dispose(bool A_0) { } public virtual void OnAfterBrowserCreated(CefSharp.IBrowser browser) { } public virtual void Resize(int width, int height) { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public sealed partial class NativeMethodWrapper { public NativeMethodWrapper() { } @@ -185,6 +191,7 @@ public static void RemoveExNoActivateStyle(System.IntPtr browserHwnd) { } public static void SetWindowParent(System.IntPtr child, System.IntPtr newParent) { } public static void SetWindowPosition(System.IntPtr handle, int x, int y, int width, int height) { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class PopupFeatures : CefSharp.IPopupFeatures, System.IDisposable { internal PopupFeatures() { } @@ -200,6 +207,7 @@ public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~PopupFeatures() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class PostData : CefSharp.Internals.CefWrapper, CefSharp.IPostData { public PostData() { } @@ -214,6 +222,7 @@ protected virtual void Dispose(bool A_0) { } public virtual bool RemoveElement(CefSharp.IPostDataElement element) { throw null; } public virtual void RemoveElements() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class PostDataElement : CefSharp.Internals.CefWrapper, CefSharp.IPostDataElement { public PostDataElement() { } @@ -226,6 +235,7 @@ protected virtual void Dispose(bool A_0) { } ~PostDataElement() { } public virtual void SetToEmpty() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class Request : CefSharp.Internals.CefWrapper, CefSharp.IRequest { public Request() { } @@ -248,6 +258,7 @@ public virtual void InitializePostData() { } public virtual void SetHeaderByName(string name, string value, bool overwrite) { } public virtual void SetReferrer(string referrerUrl, CefSharp.ReferrerPolicy policy) { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RequestContext : CefSharp.Internals.CefWrapper, CefSharp.IRequestContext { public RequestContext() { } @@ -284,6 +295,7 @@ public virtual void PurgePluginListCache(bool reloadPages) { } 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; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RequestContextBuilder { public RequestContextBuilder() { } @@ -297,6 +309,7 @@ public RequestContextBuilder() { } public CefSharp.Core.RequestContextBuilder WithProxyServer(string scheme, string host, int? port) { throw null; } public CefSharp.Core.RequestContextBuilder WithSharedSettings(CefSharp.IRequestContext other) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RequestContextSettings : System.IDisposable { public RequestContextSettings() { } @@ -309,6 +322,7 @@ public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~RequestContextSettings() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class UrlRequest : CefSharp.Internals.CefWrapper, CefSharp.IUrlRequest { public UrlRequest(CefSharp.IRequest request, CefSharp.IUrlRequestClient urlRequestClient) { } @@ -320,6 +334,7 @@ public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~UrlRequest() { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class WindowInfo : CefSharp.IWindowInfo { public WindowInfo() { } diff --git a/CefSharp.Core.netcore/PublicApi.cs b/CefSharp.Core.netcore/PublicApi.cs index 1e35aa1b60..e8b924b8ff 100644 --- a/CefSharp.Core.netcore/PublicApi.cs +++ b/CefSharp.Core.netcore/PublicApi.cs @@ -2,6 +2,8 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +//NOTE:Classes in the CefSharp.Core namespace have been hidden from intellisnse so users don't use them directly + using System; using System.Collections.Generic; using System.IO; diff --git a/CefSharp.Core/BrowserSettings.h b/CefSharp.Core/BrowserSettings.h index 42e70a0a33..ab42e2f62d 100644 --- a/CefSharp.Core/BrowserSettings.h +++ b/CefSharp.Core/BrowserSettings.h @@ -20,6 +20,7 @@ namespace CefSharp /// tested. Many of these and other settings can also configured using command- /// line switches. /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class BrowserSettings : IBrowserSettings { private: diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h index 62293f9313..140ed4fcea 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core/Cef.h @@ -42,6 +42,7 @@ namespace CefSharp /// CEF API Doc https://magpcss.org/ceforum/apidocs3/projects/(default)/(_globals).html /// This class cannot be inherited. /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class Cef sealed { private: diff --git a/CefSharp.Core/CefSettingsBase.h b/CefSharp.Core/CefSettingsBase.h index 2108f16ca4..91b7d69492 100644 --- a/CefSharp.Core/CefSettingsBase.h +++ b/CefSharp.Core/CefSettingsBase.h @@ -20,6 +20,7 @@ namespace CefSharp /// WPF/WinForms/OffScreen each have their own CefSettings implementation that sets /// relevant settings e.g. OffScreen starts with audio muted. /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class CefSettingsBase abstract { private: diff --git a/CefSharp.Core/DragData.h b/CefSharp.Core/DragData.h index b5aa4fc04f..12529dca23 100644 --- a/CefSharp.Core/DragData.h +++ b/CefSharp.Core/DragData.h @@ -19,6 +19,7 @@ namespace CefSharp { namespace Core { + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class DragData : public IDragData, public CefWrapper { private: diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h index e113f9a177..e23b744349 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.h +++ b/CefSharp.Core/ManagedCefBrowserAdapter.h @@ -30,6 +30,7 @@ namespace CefSharp namespace Core { /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class ManagedCefBrowserAdapter : public IBrowserAdapter { MCefRefPtr _clientAdapter; diff --git a/CefSharp.Core/NativeMethodWrapper.h b/CefSharp.Core/NativeMethodWrapper.h index da99bf66cf..814c41043e 100644 --- a/CefSharp.Core/NativeMethodWrapper.h +++ b/CefSharp.Core/NativeMethodWrapper.h @@ -11,6 +11,7 @@ namespace CefSharp namespace Core { /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class NativeMethodWrapper sealed { public: diff --git a/CefSharp.Core/PopupFeatures.h b/CefSharp.Core/PopupFeatures.h index 120f63e77c..d1fc89201b 100644 --- a/CefSharp.Core/PopupFeatures.h +++ b/CefSharp.Core/PopupFeatures.h @@ -16,6 +16,7 @@ namespace CefSharp /// Class representing popup window features. /// /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class PopupFeatures : IPopupFeatures { private: diff --git a/CefSharp.Core/PostData.h b/CefSharp.Core/PostData.h index 98bd5207b8..ab041bc870 100644 --- a/CefSharp.Core/PostData.h +++ b/CefSharp.Core/PostData.h @@ -25,6 +25,7 @@ namespace CefSharp /// Form Post Data /// /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class PostData : public IPostData, public CefWrapper { MCefRefPtr _postData; diff --git a/CefSharp.Core/PostDataElement.h b/CefSharp.Core/PostDataElement.h index e0d0137b60..3eafa0386b 100644 --- a/CefSharp.Core/PostDataElement.h +++ b/CefSharp.Core/PostDataElement.h @@ -18,6 +18,7 @@ namespace CefSharp namespace Core { #endif + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class PostDataElement : public IPostDataElement, public CefWrapper { MCefRefPtr _postDataElement; diff --git a/CefSharp.Core/Request.h b/CefSharp.Core/Request.h index ef625a7c14..7db808861b 100644 --- a/CefSharp.Core/Request.h +++ b/CefSharp.Core/Request.h @@ -17,6 +17,7 @@ namespace CefSharp namespace Core { #endif + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class Request : public IRequest, public CefWrapper { MCefRefPtr _request; diff --git a/CefSharp.Core/RequestContext.h b/CefSharp.Core/RequestContext.h index a73eb669d4..ed7a571a0e 100644 --- a/CefSharp.Core/RequestContext.h +++ b/CefSharp.Core/RequestContext.h @@ -37,6 +37,7 @@ namespace CefSharp /// This will be the first request context passed into a CefBrowserHost static factory method /// and all other request context objects will be ignored. /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class RequestContext : public IRequestContext, public CefWrapper { private: diff --git a/CefSharp.Core/RequestContextBuilder.h b/CefSharp.Core/RequestContextBuilder.h index 76131ae7b6..6cdd99a136 100644 --- a/CefSharp.Core/RequestContextBuilder.h +++ b/CefSharp.Core/RequestContextBuilder.h @@ -17,6 +17,7 @@ namespace CefSharp /// /// Fluent style builder for creating IRequestContext instances. /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class RequestContextBuilder { private: diff --git a/CefSharp.Core/RequestContextSettings.h b/CefSharp.Core/RequestContextSettings.h index 6bd9caba60..ed0aebb4c2 100644 --- a/CefSharp.Core/RequestContextSettings.h +++ b/CefSharp.Core/RequestContextSettings.h @@ -16,6 +16,7 @@ namespace CefSharp /// /// RequestContextSettings /// + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class RequestContextSettings { private: diff --git a/CefSharp.Core/UrlRequest.h b/CefSharp.Core/UrlRequest.h index 44d079e3dc..7009866c0d 100644 --- a/CefSharp.Core/UrlRequest.h +++ b/CefSharp.Core/UrlRequest.h @@ -24,6 +24,7 @@ namespace CefSharp // URL requests can be created on any valid CEF thread in either the browser // or render process. Once created the methods of the URL request object must // be accessed on the same thread that created it. + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class UrlRequest : public IUrlRequest, public CefWrapper { private: diff --git a/CefSharp.Core/WindowInfo.h b/CefSharp.Core/WindowInfo.h index a18aa90f01..97531028b7 100644 --- a/CefSharp.Core/WindowInfo.h +++ b/CefSharp.Core/WindowInfo.h @@ -14,6 +14,7 @@ namespace CefSharp namespace Core { #endif + [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class WindowInfo : public IWindowInfo { private: From a7214eba7be1e7a10424cc3ff77256007b017fbe Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 20:48:53 +1000 Subject: [PATCH 11/37] Rename CefSharp.Core to CefSharp.Core.Runtime --- .../Async/JavascriptAsyncMethodHandler.cpp | 4 ++-- .../BindObjectAsyncHandler.h | 4 ++-- .../CefAppUnmanagedWrapper.cpp | 4 ++-- ...efSharp.BrowserSubprocess.Core.netcore.filters | 14 +++++++------- ...efSharp.BrowserSubprocess.Core.netcore.vcxproj | 14 +++++++------- .../CefSharp.BrowserSubprocess.Core.vcxproj | 14 +++++++------- ...efSharp.BrowserSubprocess.Core.vcxproj.filters | 14 +++++++------- .../JavascriptPostMessageHandler.h | 4 ++-- .../JavascriptPromiseHandler.h | 4 ++-- .../RegisterBoundObjectHandler.h | 4 ++-- .../Serialization/JsObjectsSerialization.cpp | 4 ++-- .../Serialization/V8Serialization.cpp | 6 +++--- CefSharp.BrowserSubprocess.Core/Stdafx.h | 6 +++--- CefSharp.BrowserSubprocess.Core/TypeUtils.cpp | 2 +- ...fSharp.Core.Runtime.RefAssembly.netcore.csproj | 8 ++++---- .../Assembly.manifest | 0 .../AssemblyInfo.cpp | 0 .../BrowserSettings.h | 4 ---- {CefSharp.Core => CefSharp.Core.Runtime}/Cef.h | 4 ---- .../CefSettingsBase.h | 4 ---- .../CefSharp.Core.Runtime.netcore.vcxproj | 0 .../CefSharp.Core.Runtime.netcore.vcxproj.filters | 0 .../CefSharp.Core.Runtime.vcxproj | 12 +++++------- .../CefSharp.Core.Runtime.vcxproj.filters | 8 +------- .../CookieManager.cpp | 0 .../CookieManager.h | 0 .../DragData.h | 0 .../Internals/CefAuthCallbackWrapper.h | 0 .../Internals/CefBeforeDownloadCallbackWrapper.h | 0 .../Internals/CefBrowserHostWrapper.cpp | 4 ---- .../Internals/CefBrowserHostWrapper.h | 0 .../Internals/CefBrowserWrapper.cpp | 0 .../Internals/CefBrowserWrapper.h | 0 .../Internals/CefCallbackWrapper.h | 0 .../Internals/CefCertificateCallbackWrapper.h | 0 .../Internals/CefCompletionCallbackAdapter.h | 0 .../Internals/CefContextMenuParamsWrapper.cpp | 0 .../Internals/CefContextMenuParamsWrapper.h | 0 .../Internals/CefCookieAccessFilterAdapter.h | 0 .../Internals/CefCookieVisitorAdapter.h | 0 .../Internals/CefDeleteCookiesCallbackAdapter.h | 0 .../Internals/CefDevToolsMessageObserverAdapter.h | 0 .../Internals/CefDownloadItemCallbackWrapper.h | 0 .../Internals/CefExtensionHandlerAdapter.h | 0 .../Internals/CefExtensionWrapper.cpp | 0 .../Internals/CefExtensionWrapper.h | 0 .../Internals/CefFileDialogCallbackWrapper.h | 0 .../Internals/CefFrameWrapper.cpp | 0 .../Internals/CefFrameWrapper.h | 0 .../CefGetExtensionResourceCallbackWrapper.h | 0 .../Internals/CefImageWrapper.h | 0 .../Internals/CefJSDialogCallbackWrapper.h | 0 .../Internals/CefMenuModelWrapper.h | 0 .../Internals/CefNavigationEntryVisitorAdapter.h | 0 .../Internals/CefPdfPrintCallbackWrapper.h | 0 .../Internals/CefRegisterCdmCallbackAdapter.h | 0 .../Internals/CefRegistrationWrapper.h | 0 .../Internals/CefRequestCallbackWrapper.h | 0 .../Internals/CefRequestContextHandlerAdapter.cpp | 0 .../Internals/CefRequestContextHandlerAdapter.h | 0 .../Internals/CefResolveCallbackAdapter.h | 0 .../Internals/CefResourceHandlerAdapter.cpp | 0 .../Internals/CefResourceHandlerAdapter.h | 0 .../Internals/CefResourceReadCallbackWrapper.h | 0 .../Internals/CefResourceRequestHandlerAdapter.h | 0 .../Internals/CefResourceSkipCallbackWrapper.h | 0 .../Internals/CefResponseFilterAdapter.h | 0 .../Internals/CefResponseWrapper.h | 0 .../Internals/CefRunContextMenuCallbackWrapper.h | 0 .../Internals/CefRunFileDialogCallbackAdapter.h | 0 .../Internals/CefSchemeHandlerFactoryAdapter.h | 0 .../Internals/CefSchemeRegistrarWrapper.h | 0 .../Internals/CefSetCookieCallbackAdapter.h | 0 .../Internals/CefSharpApp.h | 0 .../Internals/CefSslInfoWrapper.h | 0 .../Internals/CefStringVisitorAdapter.h | 0 .../Internals/CefTaskScheduler.h | 0 .../Internals/CefTaskWrapper.h | 0 .../Internals/CefUrlRequestClientAdapter.cpp | 0 .../Internals/CefUrlRequestClientAdapter.h | 0 .../Internals/CefValueWrapper.cpp | 0 .../Internals/CefValueWrapper.h | 0 .../Internals/CefWebPluginInfoVisitorAdapter.h | 0 .../Internals/CefWrapper.h | 0 .../Internals/CefWriteHandlerWrapper.h | 0 .../Internals/ClientAdapter.cpp | 0 .../Internals/ClientAdapter.h | 0 .../Internals/JavascriptCallbackFactory.cpp | 0 .../Internals/JavascriptCallbackFactory.h | 0 .../Internals/JavascriptCallbackProxy.cpp | 0 .../Internals/JavascriptCallbackProxy.h | 0 .../Internals/MCefRefPtr.h | 0 .../Internals/Messaging/Messages.h | 0 .../Internals/RenderClientAdapter.h | 0 .../Internals/ReportUnhandledExceptions.h | 0 .../Serialization/JsObjectsSerialization.cpp | 0 .../Serialization/JsObjectsSerialization.h | 0 .../Serialization/ObjectsSerialization.cpp | 0 .../Serialization/ObjectsSerialization.h | 0 .../Internals/Serialization/Primitives.cpp | 0 .../Internals/Serialization/Primitives.h | 0 .../Internals/Serialization/V8Serialization.cpp | 0 .../Internals/Serialization/V8Serialization.h | 0 .../Internals/StringUtils.h | 0 .../Internals/TypeConversion.h | 0 .../ManagedCefBrowserAdapter.cpp | 0 .../ManagedCefBrowserAdapter.h | 0 .../NativeMethodWrapper.cpp | 0 .../NativeMethodWrapper.h | 0 .../PopupFeatures.h | 4 ---- .../PostData.h | 4 ---- .../PostDataElement.h | 4 ---- .../Request.cpp | 12 ------------ .../Request.h | 4 ---- .../RequestContext.cpp | 4 ---- .../RequestContext.h | 4 ---- .../RequestContextBuilder.cpp | 4 ---- .../RequestContextBuilder.h | 4 ---- .../RequestContextSettings.h | 4 ---- .../Resource.aps | Bin .../Resource.rc | 0 .../Stdafx.cpp | 0 {CefSharp.Core => CefSharp.Core.Runtime}/Stdafx.h | 0 .../UrlRequest.cpp | 0 .../UrlRequest.h | 4 ---- .../WindowInfo.h | 4 ---- .../packages.CefSharp.Core.Runtime.config | 0 .../packages.CefSharp.Core.Runtime.netcore.config | 0 .../resource.h | 0 .../vcclr_local.h | 0 .../CefSharp.Core.netcore.csproj | 2 +- CefSharp.Example/CefSharp.Example.csproj | 4 ++-- .../CefSharp.OffScreen.Example.csproj | 4 ++-- CefSharp.OffScreen/CefSharp.OffScreen.csproj | 4 ++-- CefSharp.Test/CefSharp.Test.csproj | 4 ++-- .../CefSharp.WinForms.Example.csproj | 4 ++-- CefSharp.WinForms/CefSharp.WinForms.csproj | 4 ++-- CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj | 4 ++-- CefSharp.Wpf/CefSharp.Wpf.csproj | 4 ++-- CefSharp3.netcore.sln | 2 +- CefSharp3.sln | 2 +- NuGet/CefSharp.Common.nuspec | 12 ++++++------ 142 files changed, 84 insertions(+), 164 deletions(-) rename {CefSharp.Core => CefSharp.Core.Runtime}/Assembly.manifest (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/AssemblyInfo.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/BrowserSettings.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Cef.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/CefSettingsBase.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/CefSharp.Core.Runtime.netcore.vcxproj (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/CefSharp.Core.Runtime.netcore.vcxproj.filters (100%) rename CefSharp.Core/CefSharp.Core.vcxproj => CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj (98%) rename CefSharp.Core/CefSharp.Core.vcxproj.filters => CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters (97%) rename {CefSharp.Core => CefSharp.Core.Runtime}/CookieManager.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/CookieManager.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/DragData.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefAuthCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefBeforeDownloadCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefBrowserHostWrapper.cpp (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefBrowserHostWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefBrowserWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefBrowserWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefCertificateCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefCompletionCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefContextMenuParamsWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefContextMenuParamsWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefCookieAccessFilterAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefCookieVisitorAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefDeleteCookiesCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefDevToolsMessageObserverAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefDownloadItemCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefExtensionHandlerAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefExtensionWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefExtensionWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefFileDialogCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefFrameWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefFrameWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefGetExtensionResourceCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefImageWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefJSDialogCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefMenuModelWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefNavigationEntryVisitorAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefPdfPrintCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRegisterCdmCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRegistrationWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRequestCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRequestContextHandlerAdapter.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRequestContextHandlerAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResolveCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResourceHandlerAdapter.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResourceHandlerAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResourceReadCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResourceRequestHandlerAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResourceSkipCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResponseFilterAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefResponseWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRunContextMenuCallbackWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefRunFileDialogCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefSchemeHandlerFactoryAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefSchemeRegistrarWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefSetCookieCallbackAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefSharpApp.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefSslInfoWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefStringVisitorAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefTaskScheduler.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefTaskWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefUrlRequestClientAdapter.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefUrlRequestClientAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefValueWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefValueWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefWebPluginInfoVisitorAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/CefWriteHandlerWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/ClientAdapter.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/ClientAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/JavascriptCallbackFactory.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/JavascriptCallbackFactory.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/JavascriptCallbackProxy.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/JavascriptCallbackProxy.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/MCefRefPtr.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Messaging/Messages.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/RenderClientAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/ReportUnhandledExceptions.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/JsObjectsSerialization.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/JsObjectsSerialization.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/ObjectsSerialization.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/ObjectsSerialization.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/Primitives.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/Primitives.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/V8Serialization.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/Serialization/V8Serialization.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/StringUtils.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Internals/TypeConversion.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/ManagedCefBrowserAdapter.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/ManagedCefBrowserAdapter.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/NativeMethodWrapper.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/NativeMethodWrapper.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/PopupFeatures.h (98%) rename {CefSharp.Core => CefSharp.Core.Runtime}/PostData.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/PostDataElement.h (98%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Request.cpp (95%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Request.h (98%) rename {CefSharp.Core => CefSharp.Core.Runtime}/RequestContext.cpp (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/RequestContext.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/RequestContextBuilder.cpp (98%) rename {CefSharp.Core => CefSharp.Core.Runtime}/RequestContextBuilder.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/RequestContextSettings.h (99%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Resource.aps (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Resource.rc (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Stdafx.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/Stdafx.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/UrlRequest.cpp (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/UrlRequest.h (98%) rename {CefSharp.Core => CefSharp.Core.Runtime}/WindowInfo.h (99%) rename CefSharp.Core/packages.CefSharp.Core.config => CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/packages.CefSharp.Core.Runtime.netcore.config (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/resource.h (100%) rename {CefSharp.Core => CefSharp.Core.Runtime}/vcclr_local.h (100%) diff --git a/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp b/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp index 790a16c94e..dd9d47e85d 100644 --- a/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp +++ b/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp @@ -4,8 +4,8 @@ #include "stdafx.h" #include "JavascriptAsyncMethodHandler.h" -#include "../CefSharp.Core/Internals/Messaging/Messages.h" -#include "../CefSharp.Core/Internals/Serialization/Primitives.h" +#include "../CefSharp.Core.Runtime/Internals/Messaging/Messages.h" +#include "../CefSharp.Core.Runtime/Internals/Serialization/Primitives.h" #include "Serialization/V8Serialization.h" #include "CefAppUnmanagedWrapper.h" diff --git a/CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h b/CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h index 3d6203ad3e..f129cde0de 100644 --- a/CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h +++ b/CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h @@ -6,8 +6,8 @@ #include "include/cef_v8.h" #include "RegisterBoundObjectRegistry.h" -#include "..\CefSharp.Core\Internals\Messaging\Messages.h" -#include "..\CefSharp.Core\Internals\Serialization\Primitives.h" +#include "..\CefSharp.Core.Runtime\Internals\Messaging\Messages.h" +#include "..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" using namespace System; using namespace CefSharp::Internals::Messaging; diff --git a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp index e35624f08d..c401cf89a6 100644 --- a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp @@ -19,8 +19,8 @@ #include "Wrapper\V8Context.h" #include "Wrapper\Frame.h" #include "Wrapper\Browser.h" -#include "..\CefSharp.Core\Internals\Messaging\Messages.h" -#include "..\CefSharp.Core\Internals\Serialization\Primitives.h" +#include "..\CefSharp.Core.Runtime\Internals\Messaging\Messages.h" +#include "..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" using namespace System; using namespace System::Diagnostics; diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters index f16d2fabba..adeeecfd00 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters @@ -32,10 +32,10 @@ Header Files - + Header Files - + Header Files @@ -56,10 +56,10 @@ Header Files - + Header Files - + Header Files @@ -77,7 +77,7 @@ Header Files - + Header Files @@ -148,7 +148,7 @@ Source Files - + Source Files @@ -166,7 +166,7 @@ Source Files - + Source Files diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj index 28a3e034f8..85e3ccf1b0 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj @@ -174,11 +174,11 @@ - - - - - + + + + + @@ -207,8 +207,8 @@ - - + + diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index 6a6008ac92..63a0059e5e 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -168,11 +168,11 @@ - - - - - + + + + + @@ -209,8 +209,8 @@ - - + + diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters index 71c703e934..90832c8d34 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj.filters @@ -32,10 +32,10 @@ Header Files - + Header Files - + Header Files @@ -56,10 +56,10 @@ Header Files - + Header Files - + Header Files @@ -77,7 +77,7 @@ Header Files - + Header Files @@ -154,7 +154,7 @@ Source Files - + Source Files @@ -172,7 +172,7 @@ Source Files - + Source Files diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptPostMessageHandler.h b/CefSharp.BrowserSubprocess.Core/JavascriptPostMessageHandler.h index 81fe6c0ea4..2ea73d8cc0 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptPostMessageHandler.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptPostMessageHandler.h @@ -5,8 +5,8 @@ #pragma once #include "include/cef_v8.h" -#include "..\CefSharp.Core\Internals\Messaging\Messages.h" -#include "..\CefSharp.Core\Internals\Serialization\Primitives.h" +#include "..\CefSharp.Core.Runtime\Internals\Messaging\Messages.h" +#include "..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" #include "Serialization\V8Serialization.h" using namespace System; diff --git a/CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h b/CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h index 918d9d127b..bfde170538 100644 --- a/CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h +++ b/CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h @@ -5,8 +5,8 @@ #pragma once #include "include/cef_v8.h" -#include "..\CefSharp.Core\Internals\Messaging\Messages.h" -#include "..\CefSharp.Core\Internals\Serialization\Primitives.h" +#include "..\CefSharp.Core.Runtime\Internals\Messaging\Messages.h" +#include "..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" #include "Serialization\V8Serialization.h" using namespace System; diff --git a/CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h b/CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h index acfdbb5ea8..44d51fee12 100644 --- a/CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h +++ b/CefSharp.BrowserSubprocess.Core/RegisterBoundObjectHandler.h @@ -6,8 +6,8 @@ #include "include/cef_v8.h" #include "RegisterBoundObjectRegistry.h" -#include "..\CefSharp.Core\Internals\Messaging\Messages.h" -#include "..\CefSharp.Core\Internals\Serialization\Primitives.h" +#include "..\CefSharp.Core.Runtime\Internals\Messaging\Messages.h" +#include "..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" using namespace System; using namespace CefSharp::Internals::Messaging; diff --git a/CefSharp.BrowserSubprocess.Core/Serialization/JsObjectsSerialization.cpp b/CefSharp.BrowserSubprocess.Core/Serialization/JsObjectsSerialization.cpp index 27b237ae80..64ef5b1424 100644 --- a/CefSharp.BrowserSubprocess.Core/Serialization/JsObjectsSerialization.cpp +++ b/CefSharp.BrowserSubprocess.Core/Serialization/JsObjectsSerialization.cpp @@ -4,8 +4,8 @@ #include "stdafx.h" #include "JsObjectsSerialization.h" -#include "../CefSharp.Core/Internals/Serialization/Primitives.h" -#include "../CefSharp.Core/Internals/Serialization/ObjectsSerialization.h" +#include "../CefSharp.Core.Runtime/Internals/Serialization/Primitives.h" +#include "../CefSharp.Core.Runtime/Internals/Serialization/ObjectsSerialization.h" namespace CefSharp { diff --git a/CefSharp.BrowserSubprocess.Core/Serialization/V8Serialization.cpp b/CefSharp.BrowserSubprocess.Core/Serialization/V8Serialization.cpp index a47b1286bf..9773b31fd9 100644 --- a/CefSharp.BrowserSubprocess.Core/Serialization/V8Serialization.cpp +++ b/CefSharp.BrowserSubprocess.Core/Serialization/V8Serialization.cpp @@ -1,11 +1,11 @@ -// Copyright © 2015 The CefSharp Authors. All rights reserved. +// 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. #include "Stdafx.h" #include "V8Serialization.h" #include "JavascriptCallbackRegistry.h" -#include "../CefSharp.Core/Internals/Serialization/Primitives.h" +#include "../CefSharp.Core.Runtime/Internals/Serialization/Primitives.h" #include @@ -185,4 +185,4 @@ namespace CefSharp template CefRefPtr DeserializeV8Object(const CefRefPtr& list, const CefString& index); } } -} \ No newline at end of file +} diff --git a/CefSharp.BrowserSubprocess.Core/Stdafx.h b/CefSharp.BrowserSubprocess.Core/Stdafx.h index fbdd796040..b450bb08cb 100644 --- a/CefSharp.BrowserSubprocess.Core/Stdafx.h +++ b/CefSharp.BrowserSubprocess.Core/Stdafx.h @@ -14,10 +14,10 @@ #include -#include ".\..\CefSharp.Core\Internals\MCefRefPtr.h" -#include ".\..\CefSharp.Core\Internals\StringUtils.h" +#include ".\..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h" +#include ".\..\CefSharp.Core.Runtime\Internals\StringUtils.h" #include "vcclr_local.h" using namespace System; using namespace CefSharp; -using namespace CefSharp::Internals; \ No newline at end of file +using namespace CefSharp::Internals; diff --git a/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp b/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp index e8ea19b9b1..f0355f2321 100644 --- a/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp +++ b/CefSharp.BrowserSubprocess.Core/TypeUtils.cpp @@ -5,7 +5,7 @@ #pragma once #include "Stdafx.h" -#include ".\..\CefSharp.Core\Internals\StringUtils.h" +#include ".\..\CefSharp.Core.Runtime\Internals\StringUtils.h" #include "TypeUtils.h" using namespace System::Collections::Generic; diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj index 722b9aac2c..2d9d3ba4db 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj @@ -22,7 +22,7 @@ - + false @@ -41,14 +41,14 @@ Haven't found a nice way to determine the Platform (resolves as AnyCPU) --> - + - $(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.runtime.dll + $(SolutionDir)CefSharp.Core.Runtime\bin.netcore\x64\$(Configuration)\CefSharp.Core.Runtime.dll - $(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.runtime.dll + $(SolutionDir)CefSharp.Core.Runtime\bin.netcore\win32\$(Configuration)\CefSharp.Core.Runtime.dll diff --git a/CefSharp.Core/Assembly.manifest b/CefSharp.Core.Runtime/Assembly.manifest similarity index 100% rename from CefSharp.Core/Assembly.manifest rename to CefSharp.Core.Runtime/Assembly.manifest diff --git a/CefSharp.Core/AssemblyInfo.cpp b/CefSharp.Core.Runtime/AssemblyInfo.cpp similarity index 100% rename from CefSharp.Core/AssemblyInfo.cpp rename to CefSharp.Core.Runtime/AssemblyInfo.cpp diff --git a/CefSharp.Core/BrowserSettings.h b/CefSharp.Core.Runtime/BrowserSettings.h similarity index 99% rename from CefSharp.Core/BrowserSettings.h rename to CefSharp.Core.Runtime/BrowserSettings.h index ab42e2f62d..3569f66812 100644 --- a/CefSharp.Core/BrowserSettings.h +++ b/CefSharp.Core.Runtime/BrowserSettings.h @@ -10,10 +10,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Browser initialization settings. Specify NULL or 0 to get the recommended /// default values. The consequences of using custom values may not be well @@ -411,7 +409,5 @@ namespace CefSharp bool get() { return _autoDispose; } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core.Runtime/Cef.h similarity index 99% rename from CefSharp.Core/Cef.h rename to CefSharp.Core.Runtime/Cef.h index 140ed4fcea..c1b8a56d06 100644 --- a/CefSharp.Core/Cef.h +++ b/CefSharp.Core.Runtime/Cef.h @@ -33,10 +33,8 @@ using namespace msclr::interop; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Global CEF methods are exposed through this class. e.g. CefInitalize maps to Cef.Initialize /// CEF API Doc https://magpcss.org/ceforum/apidocs3/projects/(default)/(_globals).html @@ -904,8 +902,6 @@ namespace CefSharp Thread::Sleep(50); } }; -#ifdef NETCOREAPP } -#endif } #endif // CEFSHARP_CORE_CEF_H_ diff --git a/CefSharp.Core/CefSettingsBase.h b/CefSharp.Core.Runtime/CefSettingsBase.h similarity index 99% rename from CefSharp.Core/CefSettingsBase.h rename to CefSharp.Core.Runtime/CefSettingsBase.h index 91b7d69492..9747323d50 100644 --- a/CefSharp.Core/CefSettingsBase.h +++ b/CefSharp.Core.Runtime/CefSettingsBase.h @@ -11,10 +11,8 @@ using namespace System::IO; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Initialization settings. Many of these and other settings can also configured using command-line switches. /// WPF/WinForms/OffScreen each have their own CefSettings implementation that sets @@ -441,7 +439,5 @@ namespace CefSharp } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj similarity index 100% rename from CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj rename to CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj diff --git a/CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters similarity index 100% rename from CefSharp.Core/CefSharp.Core.Runtime.netcore.vcxproj.filters rename to CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj similarity index 98% rename from CefSharp.Core/CefSharp.Core.vcxproj rename to CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index 3e2ffae679..4156ab6bed 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -78,7 +78,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -88,7 +88,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -99,7 +99,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime ..\CefSharp.snk obj\$(Platform)\$(Configuration)\ $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) @@ -109,7 +109,7 @@ AllRules.ruleset - CefSharp.Core + CefSharp.Core.Runtime ..\CefSharp.snk bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ @@ -230,7 +230,6 @@ - @@ -263,7 +262,6 @@ - @@ -359,7 +357,7 @@ - + diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters similarity index 97% rename from CefSharp.Core/CefSharp.Core.vcxproj.filters rename to CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters index 59011a4e50..2561611906 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj.filters +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters @@ -86,9 +86,6 @@ Source Files - - Source Files - @@ -340,9 +337,6 @@ Header Files - - Header Files - @@ -353,6 +347,6 @@ - + \ No newline at end of file diff --git a/CefSharp.Core/CookieManager.cpp b/CefSharp.Core.Runtime/CookieManager.cpp similarity index 100% rename from CefSharp.Core/CookieManager.cpp rename to CefSharp.Core.Runtime/CookieManager.cpp diff --git a/CefSharp.Core/CookieManager.h b/CefSharp.Core.Runtime/CookieManager.h similarity index 100% rename from CefSharp.Core/CookieManager.h rename to CefSharp.Core.Runtime/CookieManager.h diff --git a/CefSharp.Core/DragData.h b/CefSharp.Core.Runtime/DragData.h similarity index 100% rename from CefSharp.Core/DragData.h rename to CefSharp.Core.Runtime/DragData.h diff --git a/CefSharp.Core/Internals/CefAuthCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefAuthCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefAuthCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefAuthCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefBeforeDownloadCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefBeforeDownloadCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefBeforeDownloadCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefBeforeDownloadCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.cpp similarity index 99% rename from CefSharp.Core/Internals/CefBrowserHostWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.cpp index de301a1175..55ae02c348 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.cpp @@ -682,11 +682,7 @@ IRequestContext^ CefBrowserHostWrapper::RequestContext::get() { ThrowIfDisposed(); -#ifdef NETCOREAPP return gcnew CefSharp::Core::RequestContext(_browserHost->GetRequestContext()); -#else - return gcnew CefSharp::RequestContext(_browserHost->GetRequestContext()); -#endif } CefMouseEvent CefBrowserHostWrapper::GetCefMouseEvent(MouseEvent mouseEvent) diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.h b/CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefBrowserHostWrapper.h rename to CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.h diff --git a/CefSharp.Core/Internals/CefBrowserWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefBrowserWrapper.cpp similarity index 100% rename from CefSharp.Core/Internals/CefBrowserWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefBrowserWrapper.cpp diff --git a/CefSharp.Core/Internals/CefBrowserWrapper.h b/CefSharp.Core.Runtime/Internals/CefBrowserWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefBrowserWrapper.h rename to CefSharp.Core.Runtime/Internals/CefBrowserWrapper.h diff --git a/CefSharp.Core/Internals/CefCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefCertificateCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefCertificateCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefCertificateCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefCertificateCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefCompletionCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefCompletionCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefCompletionCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefCompletionCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefContextMenuParamsWrapper.cpp similarity index 100% rename from CefSharp.Core/Internals/CefContextMenuParamsWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefContextMenuParamsWrapper.cpp diff --git a/CefSharp.Core/Internals/CefContextMenuParamsWrapper.h b/CefSharp.Core.Runtime/Internals/CefContextMenuParamsWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefContextMenuParamsWrapper.h rename to CefSharp.Core.Runtime/Internals/CefContextMenuParamsWrapper.h diff --git a/CefSharp.Core/Internals/CefCookieAccessFilterAdapter.h b/CefSharp.Core.Runtime/Internals/CefCookieAccessFilterAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefCookieAccessFilterAdapter.h rename to CefSharp.Core.Runtime/Internals/CefCookieAccessFilterAdapter.h diff --git a/CefSharp.Core/Internals/CefCookieVisitorAdapter.h b/CefSharp.Core.Runtime/Internals/CefCookieVisitorAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefCookieVisitorAdapter.h rename to CefSharp.Core.Runtime/Internals/CefCookieVisitorAdapter.h diff --git a/CefSharp.Core/Internals/CefDeleteCookiesCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefDeleteCookiesCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefDeleteCookiesCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefDeleteCookiesCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefDevToolsMessageObserverAdapter.h b/CefSharp.Core.Runtime/Internals/CefDevToolsMessageObserverAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefDevToolsMessageObserverAdapter.h rename to CefSharp.Core.Runtime/Internals/CefDevToolsMessageObserverAdapter.h diff --git a/CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefDownloadItemCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefDownloadItemCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefExtensionHandlerAdapter.h b/CefSharp.Core.Runtime/Internals/CefExtensionHandlerAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefExtensionHandlerAdapter.h rename to CefSharp.Core.Runtime/Internals/CefExtensionHandlerAdapter.h diff --git a/CefSharp.Core/Internals/CefExtensionWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefExtensionWrapper.cpp similarity index 100% rename from CefSharp.Core/Internals/CefExtensionWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefExtensionWrapper.cpp diff --git a/CefSharp.Core/Internals/CefExtensionWrapper.h b/CefSharp.Core.Runtime/Internals/CefExtensionWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefExtensionWrapper.h rename to CefSharp.Core.Runtime/Internals/CefExtensionWrapper.h diff --git a/CefSharp.Core/Internals/CefFileDialogCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefFileDialogCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefFileDialogCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefFileDialogCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefFrameWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefFrameWrapper.cpp similarity index 100% rename from CefSharp.Core/Internals/CefFrameWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefFrameWrapper.cpp diff --git a/CefSharp.Core/Internals/CefFrameWrapper.h b/CefSharp.Core.Runtime/Internals/CefFrameWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefFrameWrapper.h rename to CefSharp.Core.Runtime/Internals/CefFrameWrapper.h diff --git a/CefSharp.Core/Internals/CefGetExtensionResourceCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefGetExtensionResourceCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefGetExtensionResourceCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefImageWrapper.h b/CefSharp.Core.Runtime/Internals/CefImageWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefImageWrapper.h rename to CefSharp.Core.Runtime/Internals/CefImageWrapper.h diff --git a/CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefJSDialogCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefJSDialogCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefJSDialogCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefMenuModelWrapper.h b/CefSharp.Core.Runtime/Internals/CefMenuModelWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefMenuModelWrapper.h rename to CefSharp.Core.Runtime/Internals/CefMenuModelWrapper.h diff --git a/CefSharp.Core/Internals/CefNavigationEntryVisitorAdapter.h b/CefSharp.Core.Runtime/Internals/CefNavigationEntryVisitorAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefNavigationEntryVisitorAdapter.h rename to CefSharp.Core.Runtime/Internals/CefNavigationEntryVisitorAdapter.h diff --git a/CefSharp.Core/Internals/CefPdfPrintCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefPdfPrintCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefPdfPrintCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefPdfPrintCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefRegisterCdmCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefRegisterCdmCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefRegisterCdmCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefRegisterCdmCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefRegistrationWrapper.h b/CefSharp.Core.Runtime/Internals/CefRegistrationWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefRegistrationWrapper.h rename to CefSharp.Core.Runtime/Internals/CefRegistrationWrapper.h diff --git a/CefSharp.Core/Internals/CefRequestCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefRequestCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefRequestCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefRequestCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefRequestContextHandlerAdapter.cpp b/CefSharp.Core.Runtime/Internals/CefRequestContextHandlerAdapter.cpp similarity index 100% rename from CefSharp.Core/Internals/CefRequestContextHandlerAdapter.cpp rename to CefSharp.Core.Runtime/Internals/CefRequestContextHandlerAdapter.cpp diff --git a/CefSharp.Core/Internals/CefRequestContextHandlerAdapter.h b/CefSharp.Core.Runtime/Internals/CefRequestContextHandlerAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefRequestContextHandlerAdapter.h rename to CefSharp.Core.Runtime/Internals/CefRequestContextHandlerAdapter.h diff --git a/CefSharp.Core/Internals/CefResolveCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefResolveCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefResolveCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefResolveCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefResourceHandlerAdapter.cpp b/CefSharp.Core.Runtime/Internals/CefResourceHandlerAdapter.cpp similarity index 100% rename from CefSharp.Core/Internals/CefResourceHandlerAdapter.cpp rename to CefSharp.Core.Runtime/Internals/CefResourceHandlerAdapter.cpp diff --git a/CefSharp.Core/Internals/CefResourceHandlerAdapter.h b/CefSharp.Core.Runtime/Internals/CefResourceHandlerAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefResourceHandlerAdapter.h rename to CefSharp.Core.Runtime/Internals/CefResourceHandlerAdapter.h diff --git a/CefSharp.Core/Internals/CefResourceReadCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefResourceReadCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefResourceReadCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefResourceReadCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefResourceRequestHandlerAdapter.h b/CefSharp.Core.Runtime/Internals/CefResourceRequestHandlerAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefResourceRequestHandlerAdapter.h rename to CefSharp.Core.Runtime/Internals/CefResourceRequestHandlerAdapter.h diff --git a/CefSharp.Core/Internals/CefResourceSkipCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefResourceSkipCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefResourceSkipCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefResourceSkipCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefResponseFilterAdapter.h b/CefSharp.Core.Runtime/Internals/CefResponseFilterAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefResponseFilterAdapter.h rename to CefSharp.Core.Runtime/Internals/CefResponseFilterAdapter.h diff --git a/CefSharp.Core/Internals/CefResponseWrapper.h b/CefSharp.Core.Runtime/Internals/CefResponseWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefResponseWrapper.h rename to CefSharp.Core.Runtime/Internals/CefResponseWrapper.h diff --git a/CefSharp.Core/Internals/CefRunContextMenuCallbackWrapper.h b/CefSharp.Core.Runtime/Internals/CefRunContextMenuCallbackWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefRunContextMenuCallbackWrapper.h rename to CefSharp.Core.Runtime/Internals/CefRunContextMenuCallbackWrapper.h diff --git a/CefSharp.Core/Internals/CefRunFileDialogCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefRunFileDialogCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefRunFileDialogCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefRunFileDialogCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefSchemeHandlerFactoryAdapter.h b/CefSharp.Core.Runtime/Internals/CefSchemeHandlerFactoryAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefSchemeHandlerFactoryAdapter.h rename to CefSharp.Core.Runtime/Internals/CefSchemeHandlerFactoryAdapter.h diff --git a/CefSharp.Core/Internals/CefSchemeRegistrarWrapper.h b/CefSharp.Core.Runtime/Internals/CefSchemeRegistrarWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefSchemeRegistrarWrapper.h rename to CefSharp.Core.Runtime/Internals/CefSchemeRegistrarWrapper.h diff --git a/CefSharp.Core/Internals/CefSetCookieCallbackAdapter.h b/CefSharp.Core.Runtime/Internals/CefSetCookieCallbackAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefSetCookieCallbackAdapter.h rename to CefSharp.Core.Runtime/Internals/CefSetCookieCallbackAdapter.h diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core.Runtime/Internals/CefSharpApp.h similarity index 100% rename from CefSharp.Core/Internals/CefSharpApp.h rename to CefSharp.Core.Runtime/Internals/CefSharpApp.h diff --git a/CefSharp.Core/Internals/CefSslInfoWrapper.h b/CefSharp.Core.Runtime/Internals/CefSslInfoWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefSslInfoWrapper.h rename to CefSharp.Core.Runtime/Internals/CefSslInfoWrapper.h diff --git a/CefSharp.Core/Internals/CefStringVisitorAdapter.h b/CefSharp.Core.Runtime/Internals/CefStringVisitorAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefStringVisitorAdapter.h rename to CefSharp.Core.Runtime/Internals/CefStringVisitorAdapter.h diff --git a/CefSharp.Core/Internals/CefTaskScheduler.h b/CefSharp.Core.Runtime/Internals/CefTaskScheduler.h similarity index 100% rename from CefSharp.Core/Internals/CefTaskScheduler.h rename to CefSharp.Core.Runtime/Internals/CefTaskScheduler.h diff --git a/CefSharp.Core/Internals/CefTaskWrapper.h b/CefSharp.Core.Runtime/Internals/CefTaskWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefTaskWrapper.h rename to CefSharp.Core.Runtime/Internals/CefTaskWrapper.h diff --git a/CefSharp.Core/Internals/CefUrlRequestClientAdapter.cpp b/CefSharp.Core.Runtime/Internals/CefUrlRequestClientAdapter.cpp similarity index 100% rename from CefSharp.Core/Internals/CefUrlRequestClientAdapter.cpp rename to CefSharp.Core.Runtime/Internals/CefUrlRequestClientAdapter.cpp diff --git a/CefSharp.Core/Internals/CefUrlRequestClientAdapter.h b/CefSharp.Core.Runtime/Internals/CefUrlRequestClientAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefUrlRequestClientAdapter.h rename to CefSharp.Core.Runtime/Internals/CefUrlRequestClientAdapter.h diff --git a/CefSharp.Core/Internals/CefValueWrapper.cpp b/CefSharp.Core.Runtime/Internals/CefValueWrapper.cpp similarity index 100% rename from CefSharp.Core/Internals/CefValueWrapper.cpp rename to CefSharp.Core.Runtime/Internals/CefValueWrapper.cpp diff --git a/CefSharp.Core/Internals/CefValueWrapper.h b/CefSharp.Core.Runtime/Internals/CefValueWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefValueWrapper.h rename to CefSharp.Core.Runtime/Internals/CefValueWrapper.h diff --git a/CefSharp.Core/Internals/CefWebPluginInfoVisitorAdapter.h b/CefSharp.Core.Runtime/Internals/CefWebPluginInfoVisitorAdapter.h similarity index 100% rename from CefSharp.Core/Internals/CefWebPluginInfoVisitorAdapter.h rename to CefSharp.Core.Runtime/Internals/CefWebPluginInfoVisitorAdapter.h diff --git a/CefSharp.Core/Internals/CefWrapper.h b/CefSharp.Core.Runtime/Internals/CefWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefWrapper.h rename to CefSharp.Core.Runtime/Internals/CefWrapper.h diff --git a/CefSharp.Core/Internals/CefWriteHandlerWrapper.h b/CefSharp.Core.Runtime/Internals/CefWriteHandlerWrapper.h similarity index 100% rename from CefSharp.Core/Internals/CefWriteHandlerWrapper.h rename to CefSharp.Core.Runtime/Internals/CefWriteHandlerWrapper.h diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core.Runtime/Internals/ClientAdapter.cpp similarity index 100% rename from CefSharp.Core/Internals/ClientAdapter.cpp rename to CefSharp.Core.Runtime/Internals/ClientAdapter.cpp diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core.Runtime/Internals/ClientAdapter.h similarity index 100% rename from CefSharp.Core/Internals/ClientAdapter.h rename to CefSharp.Core.Runtime/Internals/ClientAdapter.h diff --git a/CefSharp.Core/Internals/JavascriptCallbackFactory.cpp b/CefSharp.Core.Runtime/Internals/JavascriptCallbackFactory.cpp similarity index 100% rename from CefSharp.Core/Internals/JavascriptCallbackFactory.cpp rename to CefSharp.Core.Runtime/Internals/JavascriptCallbackFactory.cpp diff --git a/CefSharp.Core/Internals/JavascriptCallbackFactory.h b/CefSharp.Core.Runtime/Internals/JavascriptCallbackFactory.h similarity index 100% rename from CefSharp.Core/Internals/JavascriptCallbackFactory.h rename to CefSharp.Core.Runtime/Internals/JavascriptCallbackFactory.h diff --git a/CefSharp.Core/Internals/JavascriptCallbackProxy.cpp b/CefSharp.Core.Runtime/Internals/JavascriptCallbackProxy.cpp similarity index 100% rename from CefSharp.Core/Internals/JavascriptCallbackProxy.cpp rename to CefSharp.Core.Runtime/Internals/JavascriptCallbackProxy.cpp diff --git a/CefSharp.Core/Internals/JavascriptCallbackProxy.h b/CefSharp.Core.Runtime/Internals/JavascriptCallbackProxy.h similarity index 100% rename from CefSharp.Core/Internals/JavascriptCallbackProxy.h rename to CefSharp.Core.Runtime/Internals/JavascriptCallbackProxy.h diff --git a/CefSharp.Core/Internals/MCefRefPtr.h b/CefSharp.Core.Runtime/Internals/MCefRefPtr.h similarity index 100% rename from CefSharp.Core/Internals/MCefRefPtr.h rename to CefSharp.Core.Runtime/Internals/MCefRefPtr.h diff --git a/CefSharp.Core/Internals/Messaging/Messages.h b/CefSharp.Core.Runtime/Internals/Messaging/Messages.h similarity index 100% rename from CefSharp.Core/Internals/Messaging/Messages.h rename to CefSharp.Core.Runtime/Internals/Messaging/Messages.h diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core.Runtime/Internals/RenderClientAdapter.h similarity index 100% rename from CefSharp.Core/Internals/RenderClientAdapter.h rename to CefSharp.Core.Runtime/Internals/RenderClientAdapter.h diff --git a/CefSharp.Core/Internals/ReportUnhandledExceptions.h b/CefSharp.Core.Runtime/Internals/ReportUnhandledExceptions.h similarity index 100% rename from CefSharp.Core/Internals/ReportUnhandledExceptions.h rename to CefSharp.Core.Runtime/Internals/ReportUnhandledExceptions.h diff --git a/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.cpp b/CefSharp.Core.Runtime/Internals/Serialization/JsObjectsSerialization.cpp similarity index 100% rename from CefSharp.Core/Internals/Serialization/JsObjectsSerialization.cpp rename to CefSharp.Core.Runtime/Internals/Serialization/JsObjectsSerialization.cpp diff --git a/CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h b/CefSharp.Core.Runtime/Internals/Serialization/JsObjectsSerialization.h similarity index 100% rename from CefSharp.Core/Internals/Serialization/JsObjectsSerialization.h rename to CefSharp.Core.Runtime/Internals/Serialization/JsObjectsSerialization.h diff --git a/CefSharp.Core/Internals/Serialization/ObjectsSerialization.cpp b/CefSharp.Core.Runtime/Internals/Serialization/ObjectsSerialization.cpp similarity index 100% rename from CefSharp.Core/Internals/Serialization/ObjectsSerialization.cpp rename to CefSharp.Core.Runtime/Internals/Serialization/ObjectsSerialization.cpp diff --git a/CefSharp.Core/Internals/Serialization/ObjectsSerialization.h b/CefSharp.Core.Runtime/Internals/Serialization/ObjectsSerialization.h similarity index 100% rename from CefSharp.Core/Internals/Serialization/ObjectsSerialization.h rename to CefSharp.Core.Runtime/Internals/Serialization/ObjectsSerialization.h diff --git a/CefSharp.Core/Internals/Serialization/Primitives.cpp b/CefSharp.Core.Runtime/Internals/Serialization/Primitives.cpp similarity index 100% rename from CefSharp.Core/Internals/Serialization/Primitives.cpp rename to CefSharp.Core.Runtime/Internals/Serialization/Primitives.cpp diff --git a/CefSharp.Core/Internals/Serialization/Primitives.h b/CefSharp.Core.Runtime/Internals/Serialization/Primitives.h similarity index 100% rename from CefSharp.Core/Internals/Serialization/Primitives.h rename to CefSharp.Core.Runtime/Internals/Serialization/Primitives.h diff --git a/CefSharp.Core/Internals/Serialization/V8Serialization.cpp b/CefSharp.Core.Runtime/Internals/Serialization/V8Serialization.cpp similarity index 100% rename from CefSharp.Core/Internals/Serialization/V8Serialization.cpp rename to CefSharp.Core.Runtime/Internals/Serialization/V8Serialization.cpp diff --git a/CefSharp.Core/Internals/Serialization/V8Serialization.h b/CefSharp.Core.Runtime/Internals/Serialization/V8Serialization.h similarity index 100% rename from CefSharp.Core/Internals/Serialization/V8Serialization.h rename to CefSharp.Core.Runtime/Internals/Serialization/V8Serialization.h diff --git a/CefSharp.Core/Internals/StringUtils.h b/CefSharp.Core.Runtime/Internals/StringUtils.h similarity index 100% rename from CefSharp.Core/Internals/StringUtils.h rename to CefSharp.Core.Runtime/Internals/StringUtils.h diff --git a/CefSharp.Core/Internals/TypeConversion.h b/CefSharp.Core.Runtime/Internals/TypeConversion.h similarity index 100% rename from CefSharp.Core/Internals/TypeConversion.h rename to CefSharp.Core.Runtime/Internals/TypeConversion.h diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp similarity index 100% rename from CefSharp.Core/ManagedCefBrowserAdapter.cpp rename to CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h similarity index 100% rename from CefSharp.Core/ManagedCefBrowserAdapter.h rename to CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h diff --git a/CefSharp.Core/NativeMethodWrapper.cpp b/CefSharp.Core.Runtime/NativeMethodWrapper.cpp similarity index 100% rename from CefSharp.Core/NativeMethodWrapper.cpp rename to CefSharp.Core.Runtime/NativeMethodWrapper.cpp diff --git a/CefSharp.Core/NativeMethodWrapper.h b/CefSharp.Core.Runtime/NativeMethodWrapper.h similarity index 100% rename from CefSharp.Core/NativeMethodWrapper.h rename to CefSharp.Core.Runtime/NativeMethodWrapper.h diff --git a/CefSharp.Core/PopupFeatures.h b/CefSharp.Core.Runtime/PopupFeatures.h similarity index 98% rename from CefSharp.Core/PopupFeatures.h rename to CefSharp.Core.Runtime/PopupFeatures.h index d1fc89201b..0fc8afadaa 100644 --- a/CefSharp.Core/PopupFeatures.h +++ b/CefSharp.Core.Runtime/PopupFeatures.h @@ -8,10 +8,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Class representing popup window features. /// @@ -83,7 +81,5 @@ namespace CefSharp bool get() { return _popupFeatures->scrollbarsVisible == 1; } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/PostData.h b/CefSharp.Core.Runtime/PostData.h similarity index 99% rename from CefSharp.Core/PostData.h rename to CefSharp.Core.Runtime/PostData.h index ab041bc870..a62e39cbdc 100644 --- a/CefSharp.Core/PostData.h +++ b/CefSharp.Core.Runtime/PostData.h @@ -17,10 +17,8 @@ using namespace System::Collections::ObjectModel; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Form Post Data /// @@ -236,7 +234,5 @@ namespace CefSharp } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/PostDataElement.h b/CefSharp.Core.Runtime/PostDataElement.h similarity index 98% rename from CefSharp.Core/PostDataElement.h rename to CefSharp.Core.Runtime/PostDataElement.h index 3eafa0386b..9966da0492 100644 --- a/CefSharp.Core/PostDataElement.h +++ b/CefSharp.Core.Runtime/PostDataElement.h @@ -14,10 +14,8 @@ using namespace System::Collections::Specialized; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class PostDataElement : public IPostDataElement, public CefWrapper { @@ -127,7 +125,5 @@ namespace CefSharp } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/Request.cpp b/CefSharp.Core.Runtime/Request.cpp similarity index 95% rename from CefSharp.Core/Request.cpp rename to CefSharp.Core.Runtime/Request.cpp index 887b7de56e..c89d6f279f 100644 --- a/CefSharp.Core/Request.cpp +++ b/CefSharp.Core.Runtime/Request.cpp @@ -10,10 +10,8 @@ using namespace System::Text; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif UrlRequestFlags Request::Flags::get() { ThrowIfDisposed(); @@ -166,11 +164,7 @@ namespace CefSharp auto postData = _request->GetPostData(); if (postData.get()) { -#ifdef NETCOREAPP _postData = gcnew CefSharp::Core::PostData(postData); -#else - _postData = gcnew CefSharp::PostData(postData); -#endif } } return _postData; @@ -182,11 +176,7 @@ namespace CefSharp ThrowIfReadOnly(); -#ifdef NETCOREAPP _request->SetPostData((CefSharp::Core::PostData^)postData); -#else - _request->SetPostData((CefSharp::PostData^)postData); -#endif } bool Request::IsReadOnly::get() @@ -219,7 +209,5 @@ namespace CefSharp _request->SetHeaderByName(StringUtils::ToNative(name), StringUtils::ToNative(value), overwrite); } -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/Request.h b/CefSharp.Core.Runtime/Request.h similarity index 98% rename from CefSharp.Core/Request.h rename to CefSharp.Core.Runtime/Request.h index 7db808861b..4f8a4816ca 100644 --- a/CefSharp.Core/Request.h +++ b/CefSharp.Core.Runtime/Request.h @@ -13,10 +13,8 @@ using namespace System::Collections::Specialized; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class Request : public IRequest, public CefWrapper { @@ -82,7 +80,5 @@ namespace CefSharp virtual String^ GetHeaderByName(String^ name); virtual void SetHeaderByName(String^ name, String^ value, bool overwrite); }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/RequestContext.cpp b/CefSharp.Core.Runtime/RequestContext.cpp similarity index 99% rename from CefSharp.Core/RequestContext.cpp rename to CefSharp.Core.Runtime/RequestContext.cpp index ad4ff77907..4276736621 100644 --- a/CefSharp.Core/RequestContext.cpp +++ b/CefSharp.Core.Runtime/RequestContext.cpp @@ -31,10 +31,8 @@ using namespace System::Runtime::InteropServices; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif bool RequestContext::IsSame(IRequestContext^ context) { ThrowIfDisposed(); @@ -270,7 +268,5 @@ namespace CefSharp CefPostTask(TID_UI, base::Bind(&CefRequestContext::LoadExtension, _requestContext.get(), StringUtils::ToNative(rootDirectory), manifest, extensionHandler)); } } -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/RequestContext.h b/CefSharp.Core.Runtime/RequestContext.h similarity index 99% rename from CefSharp.Core/RequestContext.h rename to CefSharp.Core.Runtime/RequestContext.h index ed7a571a0e..00da7946f2 100644 --- a/CefSharp.Core/RequestContext.h +++ b/CefSharp.Core.Runtime/RequestContext.h @@ -20,10 +20,8 @@ using namespace System::Threading::Tasks; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// A request context provides request handling for a set of related browser objects. /// A request context is specified when creating a new browser object via the CefBrowserHost @@ -412,8 +410,6 @@ namespace CefSharp /// handle events related to browser extensions virtual void LoadExtension(String^ rootDirectory, String^ manifestJson, IExtensionHandler^ handler); }; -#ifdef NETCOREAPP } -#endif } #endif // CEFSHARP_CORE_REQUESTCONTEXT_H_ diff --git a/CefSharp.Core/RequestContextBuilder.cpp b/CefSharp.Core.Runtime/RequestContextBuilder.cpp similarity index 98% rename from CefSharp.Core/RequestContextBuilder.cpp rename to CefSharp.Core.Runtime/RequestContextBuilder.cpp index 4e1faae241..ead366dd22 100644 --- a/CefSharp.Core/RequestContextBuilder.cpp +++ b/CefSharp.Core.Runtime/RequestContextBuilder.cpp @@ -8,10 +8,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif IRequestContext^ RequestContextBuilder::Create() { if (_otherContext != nullptr) @@ -128,7 +126,5 @@ namespace CefSharp return this; } -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/RequestContextBuilder.h b/CefSharp.Core.Runtime/RequestContextBuilder.h similarity index 99% rename from CefSharp.Core/RequestContextBuilder.h rename to CefSharp.Core.Runtime/RequestContextBuilder.h index 6cdd99a136..182729fbf6 100644 --- a/CefSharp.Core/RequestContextBuilder.h +++ b/CefSharp.Core.Runtime/RequestContextBuilder.h @@ -10,10 +10,8 @@ using namespace CefSharp::Handler; namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// Fluent style builder for creating IRequestContext instances. /// @@ -134,8 +132,6 @@ namespace CefSharp /// Returns RequestContextBuilder instance RequestContextBuilder^ WithSharedSettings(IRequestContext^ other); }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/RequestContextSettings.h b/CefSharp.Core.Runtime/RequestContextSettings.h similarity index 99% rename from CefSharp.Core/RequestContextSettings.h rename to CefSharp.Core.Runtime/RequestContextSettings.h index ed0aebb4c2..a1ae9543db 100644 --- a/CefSharp.Core/RequestContextSettings.h +++ b/CefSharp.Core.Runtime/RequestContextSettings.h @@ -9,10 +9,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif /// /// RequestContextSettings /// @@ -116,7 +114,5 @@ namespace CefSharp void set(bool value) { _settings->ignore_certificate_errors = value; } } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/Resource.aps b/CefSharp.Core.Runtime/Resource.aps similarity index 100% rename from CefSharp.Core/Resource.aps rename to CefSharp.Core.Runtime/Resource.aps diff --git a/CefSharp.Core/Resource.rc b/CefSharp.Core.Runtime/Resource.rc similarity index 100% rename from CefSharp.Core/Resource.rc rename to CefSharp.Core.Runtime/Resource.rc diff --git a/CefSharp.Core/Stdafx.cpp b/CefSharp.Core.Runtime/Stdafx.cpp similarity index 100% rename from CefSharp.Core/Stdafx.cpp rename to CefSharp.Core.Runtime/Stdafx.cpp diff --git a/CefSharp.Core/Stdafx.h b/CefSharp.Core.Runtime/Stdafx.h similarity index 100% rename from CefSharp.Core/Stdafx.h rename to CefSharp.Core.Runtime/Stdafx.h diff --git a/CefSharp.Core/UrlRequest.cpp b/CefSharp.Core.Runtime/UrlRequest.cpp similarity index 100% rename from CefSharp.Core/UrlRequest.cpp rename to CefSharp.Core.Runtime/UrlRequest.cpp diff --git a/CefSharp.Core/UrlRequest.h b/CefSharp.Core.Runtime/UrlRequest.h similarity index 98% rename from CefSharp.Core/UrlRequest.h rename to CefSharp.Core.Runtime/UrlRequest.h index 7009866c0d..10b60119d2 100644 --- a/CefSharp.Core/UrlRequest.h +++ b/CefSharp.Core.Runtime/UrlRequest.h @@ -15,10 +15,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif // Class used to make a URL request. URL requests are not associated with // a browser instance so no CefClient callbacks will be executed. // URL requests can be created on any valid CEF thread in either the browser @@ -95,7 +93,5 @@ namespace CefSharp UrlRequestStatus get(); } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/WindowInfo.h b/CefSharp.Core.Runtime/WindowInfo.h similarity index 99% rename from CefSharp.Core/WindowInfo.h rename to CefSharp.Core.Runtime/WindowInfo.h index 97531028b7..eb4d88bda1 100644 --- a/CefSharp.Core/WindowInfo.h +++ b/CefSharp.Core.Runtime/WindowInfo.h @@ -10,10 +10,8 @@ namespace CefSharp { -#ifdef NETCOREAPP namespace Core { -#endif [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] public ref class WindowInfo : public IWindowInfo { @@ -214,7 +212,5 @@ namespace CefSharp _windowInfo->SetAsWindowless((HWND)parentHandle.ToPointer()); } }; -#ifdef NETCOREAPP } -#endif } diff --git a/CefSharp.Core/packages.CefSharp.Core.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config similarity index 100% rename from CefSharp.Core/packages.CefSharp.Core.config rename to CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.config diff --git a/CefSharp.Core/packages.CefSharp.Core.Runtime.netcore.config b/CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config similarity index 100% rename from CefSharp.Core/packages.CefSharp.Core.Runtime.netcore.config rename to CefSharp.Core.Runtime/packages.CefSharp.Core.Runtime.netcore.config diff --git a/CefSharp.Core/resource.h b/CefSharp.Core.Runtime/resource.h similarity index 100% rename from CefSharp.Core/resource.h rename to CefSharp.Core.Runtime/resource.h diff --git a/CefSharp.Core/vcclr_local.h b/CefSharp.Core.Runtime/vcclr_local.h similarity index 100% rename from CefSharp.Core/vcclr_local.h rename to CefSharp.Core.Runtime/vcclr_local.h diff --git a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj index d5d7f32aa2..3ab2ebdd3d 100644 --- a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj +++ b/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj @@ -33,7 +33,7 @@ false - + false diff --git a/CefSharp.Example/CefSharp.Example.csproj b/CefSharp.Example/CefSharp.Example.csproj index 467e11a2da..55fbc720c4 100644 --- a/CefSharp.Example/CefSharp.Example.csproj +++ b/CefSharp.Example/CefSharp.Example.csproj @@ -187,9 +187,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a55848cc-10e7-40cb-addb-04740b16dd43} diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 67b080f504..078d8caf8e 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -73,9 +73,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a4394e7b-1155-43a6-989e-8ab72dddc9e4} diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj index f3d15dbc9d..75543169e7 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj @@ -94,9 +94,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a55848cc-10e7-40cb-addb-04740b16dd43} diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj index c03cc0aed2..692afd1056 100644 --- a/CefSharp.Test/CefSharp.Test.csproj +++ b/CefSharp.Test/CefSharp.Test.csproj @@ -177,9 +177,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime True diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index c2235303ad..3983c0b52f 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -176,9 +176,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a4394e7b-1155-43a6-989e-8ab72dddc9e4} diff --git a/CefSharp.WinForms/CefSharp.WinForms.csproj b/CefSharp.WinForms/CefSharp.WinForms.csproj index ed2735e6ae..7b480f0505 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.csproj @@ -94,9 +94,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a55848cc-10e7-40cb-addb-04740b16dd43} diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 76d126f9bf..551f7928ee 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -176,9 +176,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a4394e7b-1155-43a6-989e-8ab72dddc9e4} diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj index d2ac4ccd12..bd3894e62b 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.csproj @@ -127,9 +127,9 @@ - + {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core + CefSharp.Core.Runtime {a55848cc-10e7-40cb-addb-04740b16dd43} diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln index 1e53abe0a4..32f3a18178 100644 --- a/CefSharp3.netcore.sln +++ b/CefSharp3.netcore.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.30223.230 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.netcore", "CefSharp\CefSharp.netcore.csproj", "{39E385AD-DC5C-451E-B061-09AF3EE038EB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core.Runtime.netcore", "CefSharp.Core\CefSharp.Core.Runtime.netcore.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core.Runtime.netcore", "CefSharp.Core.Runtime\CefSharp.Core.Runtime.netcore.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.BrowserSubprocess.Core.netcore", "CefSharp.BrowserSubprocess.Core\CefSharp.BrowserSubprocess.Core.netcore.vcxproj", "{6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}" EndProject diff --git a/CefSharp3.sln b/CefSharp3.sln index 3469e0ec43..19626203d3 100644 --- a/CefSharp3.sln +++ b/CefSharp3.sln @@ -54,7 +54,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{A23AA466 NuGet\Readme.txt = NuGet\Readme.txt EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core", "CefSharp.Core\CefSharp.Core.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CefSharp.Core.Runtime", "CefSharp.Core.Runtime\CefSharp.Core.Runtime.vcxproj", "{7B495581-2271-4F41-9476-ACB86E8C864F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp", "CefSharp\CefSharp.csproj", "{A55848CC-10E7-40CB-ADDB-04740B16DD43}" EndProject diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index df8826e48c..e6da2bc872 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -21,13 +21,13 @@ solve this using a .props file instead. --> - - - + + + - - - + + + From e51196879a560bf9bda3da26f5d746d9ad41d2da Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 18 Nov 2020 16:18:22 +1000 Subject: [PATCH 12/37] Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version --- CefSharp.Core/CefSharp.Core.csproj | 71 +++++++++++++++++++ CefSharp.Core/packages.config | 5 ++ CefSharp.Example/CefSharp.Example.csproj | 4 ++ .../CefSharp.OffScreen.Example.csproj | 4 ++ CefSharp.OffScreen/CefSharp.OffScreen.csproj | 4 ++ CefSharp.Test/CefSharp.Test.csproj | 5 +- .../CefSharp.WinForms.Example.csproj | 4 ++ CefSharp.WinForms/CefSharp.WinForms.csproj | 4 ++ .../CefSharp.Wpf.Example.csproj | 4 ++ CefSharp.Wpf/CefSharp.Wpf.csproj | 4 ++ CefSharp3.sln | 10 +++ NuGet/CefSharp.Common.nuspec | 24 +++---- NuGet/CefSharp.Common.props | 28 -------- NuGet/CefSharp.Common.targets | 10 +-- NuGet/CefSharp.OffScreen.nuspec | 13 +--- NuGet/CefSharp.OffScreen.props | 29 -------- NuGet/CefSharp.OffScreen.targets | 53 -------------- NuGet/CefSharp.WinForms.nuspec | 3 - NuGet/CefSharp.WinForms.props | 29 -------- NuGet/CefSharp.WinForms.targets | 53 -------------- NuGet/CefSharp.Wpf.nuspec | 3 - NuGet/CefSharp.Wpf.props | 29 -------- NuGet/CefSharp.Wpf.targets | 53 -------------- 23 files changed, 136 insertions(+), 310 deletions(-) create mode 100644 CefSharp.Core/CefSharp.Core.csproj create mode 100644 CefSharp.Core/packages.config delete mode 100644 NuGet/CefSharp.OffScreen.props delete mode 100644 NuGet/CefSharp.OffScreen.targets delete mode 100644 NuGet/CefSharp.WinForms.props delete mode 100644 NuGet/CefSharp.WinForms.targets delete mode 100644 NuGet/CefSharp.Wpf.props delete mode 100644 NuGet/CefSharp.Wpf.targets diff --git a/CefSharp.Core/CefSharp.Core.csproj b/CefSharp.Core/CefSharp.Core.csproj new file mode 100644 index 0000000000..93babc9072 --- /dev/null +++ b/CefSharp.Core/CefSharp.Core.csproj @@ -0,0 +1,71 @@ + + + + + + + Debug + AnyCPU + {B760B002-D277-4525-9F63-67ED2065034A} + Library + Properties + CefSharp + CefSharp.Core + v4.5.2 + 512 + + + + + 7.1 + true + + + true + + + ..\CefSharp.snk + + + true + bin\Debug\ + DEBUG;TRACE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\Release\ + TRACE + bin\Release\CefSharp.XML + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + + + + + + + + + + + + + {7b495581-2271-4f41-9476-acb86e8c864f} + CefSharp.Core.Runtime + + + {a55848cc-10e7-40cb-addb-04740b16dd43} + CefSharp + + + + + diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config new file mode 100644 index 0000000000..e2934c28ce --- /dev/null +++ b/CefSharp.Core/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/CefSharp.Example/CefSharp.Example.csproj b/CefSharp.Example/CefSharp.Example.csproj index 55fbc720c4..f917b62349 100644 --- a/CefSharp.Example/CefSharp.Example.csproj +++ b/CefSharp.Example/CefSharp.Example.csproj @@ -191,6 +191,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a55848cc-10e7-40cb-addb-04740b16dd43} CefSharp diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 078d8caf8e..b314b3ad49 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -77,6 +77,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a4394e7b-1155-43a6-989e-8ab72dddc9e4} CefSharp.Example diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj index 75543169e7..62f9484eed 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj @@ -98,6 +98,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a55848cc-10e7-40cb-addb-04740b16dd43} CefSharp diff --git a/CefSharp.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj index 692afd1056..62e10af23b 100644 --- a/CefSharp.Test/CefSharp.Test.csproj +++ b/CefSharp.Test/CefSharp.Test.csproj @@ -180,7 +180,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime - True + + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core {a4394e7b-1155-43a6-989e-8ab72dddc9e4} diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index 3983c0b52f..46e5894d2c 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -180,6 +180,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a4394e7b-1155-43a6-989e-8ab72dddc9e4} CefSharp.Example diff --git a/CefSharp.WinForms/CefSharp.WinForms.csproj b/CefSharp.WinForms/CefSharp.WinForms.csproj index 7b480f0505..1c6e7115ce 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.csproj @@ -98,6 +98,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a55848cc-10e7-40cb-addb-04740b16dd43} CefSharp diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 551f7928ee..fa74dcb031 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -180,6 +180,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a4394e7b-1155-43a6-989e-8ab72dddc9e4} CefSharp.Example diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj index bd3894e62b..b2aea7cc08 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.csproj @@ -131,6 +131,10 @@ {7b495581-2271-4f41-9476-acb86e8c864f} CefSharp.Core.Runtime + + {b760b002-d277-4525-9f63-67ed2065034a} + CefSharp.Core + {a55848cc-10e7-40cb-addb-04740b16dd43} CefSharp diff --git a/CefSharp3.sln b/CefSharp3.sln index 19626203d3..6eebfc7a05 100644 --- a/CefSharp3.sln +++ b/CefSharp3.sln @@ -80,6 +80,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.Test", "CefSharp.T {23EE5140-2C2C-4B53-A954-10B08DCA6BD6} = {23EE5140-2C2C-4B53-A954-10B08DCA6BD6} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.Core", "CefSharp.Core\CefSharp.Core.csproj", "{B760B002-D277-4525-9F63-67ED2065034A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -184,6 +186,14 @@ Global {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|Win32.Build.0 = Release|x86 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|x64.ActiveCfg = Release|x64 {7A4D5447-183B-4A11-8E63-9848991B46FF}.Release|x64.Build.0 = Release|x64 + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|Win32.ActiveCfg = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|Win32.Build.0 = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|x64.ActiveCfg = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Debug|x64.Build.0 = Debug|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|Win32.ActiveCfg = Release|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|Win32.Build.0 = Release|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|x64.ActiveCfg = Release|Any CPU + {B760B002-D277-4525-9F63-67ED2065034A}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index e6da2bc872..26c51a7099 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -17,7 +17,14 @@ - @@ -28,15 +35,7 @@ - - - - - - - - - + @@ -51,8 +50,9 @@ - - + + + diff --git a/NuGet/CefSharp.Common.props b/NuGet/CefSharp.Common.props index cfb962522c..31ea7950bc 100644 --- a/NuGet/CefSharp.Common.props +++ b/NuGet/CefSharp.Common.props @@ -8,32 +8,4 @@ - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.dll - False - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.dll - False - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll - False - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll - False - - - - diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index c15aa78fa4..8d37b239f4 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -1,9 +1,5 @@ - - - - @@ -18,7 +14,7 @@ exporting an ItemGroup --> - + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -33,7 +29,7 @@ - + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -48,7 +44,7 @@ - + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest diff --git a/NuGet/CefSharp.OffScreen.nuspec b/NuGet/CefSharp.OffScreen.nuspec index 5719d7f412..7f8065d0d2 100644 --- a/NuGet/CefSharp.OffScreen.nuspec +++ b/NuGet/CefSharp.OffScreen.nuspec @@ -29,16 +29,9 @@ - - - - - - - - - - + + + diff --git a/NuGet/CefSharp.OffScreen.props b/NuGet/CefSharp.OffScreen.props deleted file mode 100644 index c532925b66..0000000000 --- a/NuGet/CefSharp.OffScreen.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.OffScreen.dll - False - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll - False - - - - - diff --git a/NuGet/CefSharp.OffScreen.targets b/NuGet/CefSharp.OffScreen.targets deleted file mode 100644 index 714a13c96a..0000000000 --- a/NuGet/CefSharp.OffScreen.targets +++ /dev/null @@ -1,53 +0,0 @@ - - - - . - - - - - - - - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - diff --git a/NuGet/CefSharp.WinForms.nuspec b/NuGet/CefSharp.WinForms.nuspec index 454b4796c6..c85f12884f 100644 --- a/NuGet/CefSharp.WinForms.nuspec +++ b/NuGet/CefSharp.WinForms.nuspec @@ -37,9 +37,6 @@ - - - diff --git a/NuGet/CefSharp.WinForms.props b/NuGet/CefSharp.WinForms.props deleted file mode 100644 index 0451d0319f..0000000000 --- a/NuGet/CefSharp.WinForms.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.WinForms.dll - False - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll - False - - - - - diff --git a/NuGet/CefSharp.WinForms.targets b/NuGet/CefSharp.WinForms.targets deleted file mode 100644 index 9a10ec14b1..0000000000 --- a/NuGet/CefSharp.WinForms.targets +++ /dev/null @@ -1,53 +0,0 @@ - - - - . - - - - - - - - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - diff --git a/NuGet/CefSharp.Wpf.nuspec b/NuGet/CefSharp.Wpf.nuspec index 5f230b32ed..0230cd7cef 100644 --- a/NuGet/CefSharp.Wpf.nuspec +++ b/NuGet/CefSharp.Wpf.nuspec @@ -37,9 +37,6 @@ - - - diff --git a/NuGet/CefSharp.Wpf.props b/NuGet/CefSharp.Wpf.props deleted file mode 100644 index ea7c745140..0000000000 --- a/NuGet/CefSharp.Wpf.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Wpf.dll - False - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll - False - - - - - diff --git a/NuGet/CefSharp.Wpf.targets b/NuGet/CefSharp.Wpf.targets deleted file mode 100644 index 1e83a5650e..0000000000 --- a/NuGet/CefSharp.Wpf.targets +++ /dev/null @@ -1,53 +0,0 @@ - - - - . - - - - - - - - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - From c63ad47f12943fb851d07563c492c3388b5f275c Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 21:00:09 +1000 Subject: [PATCH 13/37] Rename CefSharp.Core.netcore to CefSharp.Core --- CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs | 2 +- CefSharp.Core.Runtime/AssemblyInfo.cpp | 2 +- .../CefSharp.Core.netcore.csproj | 0 .../Properties/AssemblyInfo.cs | 0 {CefSharp.Core.netcore => CefSharp.Core}/PublicApi.cs | 0 CefSharp.Example/CefSharp.Example.netcore.csproj | 2 +- .../CefSharp.OffScreen.Example.netcore.csproj | 2 +- CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj | 2 +- CefSharp.Test/CefSharp.Test.netcore.csproj | 2 +- .../CefSharp.WinForms.Example.netcore.csproj | 2 +- CefSharp.WinForms/CefSharp.WinForms.netcore.csproj | 2 +- CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj | 2 +- CefSharp.Wpf/CefSharp.Wpf.netcore.csproj | 2 +- CefSharp3.netcore.sln | 2 +- 14 files changed, 11 insertions(+), 11 deletions(-) rename {CefSharp.Core.netcore => CefSharp.Core}/CefSharp.Core.netcore.csproj (100%) rename {CefSharp.Core.netcore => CefSharp.Core}/Properties/AssemblyInfo.cs (100%) rename {CefSharp.Core.netcore => CefSharp.Core}/PublicApi.cs (100%) diff --git a/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs b/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs index 5c33df57cf..ae25cf9e04 100644 --- a/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs +++ b/CefSharp.Core.Runtime.RefAssembly/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using CefSharp; -[assembly:AssemblyTitle("CefSharp.Core")] +[assembly:AssemblyTitle("CefSharp.Core.Runtime")] [assembly:AssemblyDescription("CefSharp Core Library (VC++)")] [assembly:AssemblyCompany(AssemblyInfo.AssemblyCompany)] [assembly:AssemblyProduct(AssemblyInfo.AssemblyProduct)] diff --git a/CefSharp.Core.Runtime/AssemblyInfo.cpp b/CefSharp.Core.Runtime/AssemblyInfo.cpp index 23f2e8eeb3..df8a1249bc 100644 --- a/CefSharp.Core.Runtime/AssemblyInfo.cpp +++ b/CefSharp.Core.Runtime/AssemblyInfo.cpp @@ -11,7 +11,7 @@ using namespace System::Runtime::InteropServices; using namespace System::Security::Permissions; using namespace CefSharp; -[assembly:AssemblyTitle("CefSharp.Core")]; +[assembly:AssemblyTitle("CefSharp.Core.Runtime")]; [assembly:AssemblyDescription("CefSharp Core Library (VC++)")]; [assembly:AssemblyCompany(AssemblyInfo::AssemblyCompany)]; [assembly:AssemblyProduct(AssemblyInfo::AssemblyProduct)]; diff --git a/CefSharp.Core.netcore/CefSharp.Core.netcore.csproj b/CefSharp.Core/CefSharp.Core.netcore.csproj similarity index 100% rename from CefSharp.Core.netcore/CefSharp.Core.netcore.csproj rename to CefSharp.Core/CefSharp.Core.netcore.csproj diff --git a/CefSharp.Core.netcore/Properties/AssemblyInfo.cs b/CefSharp.Core/Properties/AssemblyInfo.cs similarity index 100% rename from CefSharp.Core.netcore/Properties/AssemblyInfo.cs rename to CefSharp.Core/Properties/AssemblyInfo.cs diff --git a/CefSharp.Core.netcore/PublicApi.cs b/CefSharp.Core/PublicApi.cs similarity index 100% rename from CefSharp.Core.netcore/PublicApi.cs rename to CefSharp.Core/PublicApi.cs diff --git a/CefSharp.Example/CefSharp.Example.netcore.csproj b/CefSharp.Example/CefSharp.Example.netcore.csproj index f6555a7781..1321863df6 100644 --- a/CefSharp.Example/CefSharp.Example.netcore.csproj +++ b/CefSharp.Example/CefSharp.Example.netcore.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj index 83a7fba1b0..2384450ffa 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.netcore.csproj @@ -22,7 +22,7 @@ - + diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj index 64d8a3e3e5..1fc8b5a96b 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp.Test/CefSharp.Test.netcore.csproj b/CefSharp.Test/CefSharp.Test.netcore.csproj index 4c77c9bebd..4e72d69baf 100644 --- a/CefSharp.Test/CefSharp.Test.netcore.csproj +++ b/CefSharp.Test/CefSharp.Test.netcore.csproj @@ -21,7 +21,7 @@ - + diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj index e0c716fadd..c75fa11d52 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.netcore.csproj @@ -22,7 +22,7 @@ - + diff --git a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj index 92e72f8039..eebc94a4b8 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj index 287621c30b..245dc6b3f7 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.netcore.csproj @@ -23,7 +23,7 @@ - + diff --git a/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj index ec13d4795b..c59e0aa130 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj @@ -29,7 +29,7 @@ - + diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln index 32f3a18178..c6e6315e0e 100644 --- a/CefSharp3.netcore.sln +++ b/CefSharp3.netcore.sln @@ -69,7 +69,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Test.netcore", "Ce {FBFBD752-467C-444F-93E4-80D6242E8513} = {FBFBD752-467C-444F-93E4-80D6242E8513} EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.netcore", "CefSharp.Core.netcore\CefSharp.Core.netcore.csproj", "{310E5602-C920-4A4C-B0B0-178155528149}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.netcore", "CefSharp.Core\CefSharp.Core.netcore.csproj", "{310E5602-C920-4A4C-B0B0-178155528149}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Core.Runtime.RefAssembly.netcore", "CefSharp.Core.Runtime.RefAssembly\CefSharp.Core.Runtime.RefAssembly.netcore.csproj", "{A4AFD158-0B6F-4579-AE79-EC386C8BEA58}" EndProject From 23d10fefb897d42fffaf9658a8f6a5bc2ee19f54 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 11 Nov 2020 19:10:22 +1000 Subject: [PATCH 14/37] WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU As they are all managed assemblies they can target AnyCPU. Includes CefSharp.dll --- CefSharp.OffScreen/CefSharp.OffScreen.csproj | 51 +++------------- CefSharp.WinForms/CefSharp.WinForms.csproj | 48 ++++----------- CefSharp.Wpf/CefSharp.Wpf.csproj | 43 +++---------- CefSharp/CefSharp.csproj | 38 +++--------- CefSharp3.sln | 64 ++++++++++---------- NuGet/CefSharp.OffScreen.nuspec | 2 - NuGet/CefSharp.WinForms.nuspec | 12 +--- NuGet/CefSharp.Wpf.nuspec | 12 +--- build.ps1 | 6 +- 9 files changed, 79 insertions(+), 197 deletions(-) diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj index 62f9484eed..7b9ef0896a 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj @@ -1,4 +1,4 @@ - + @@ -19,60 +19,27 @@ 7.1 true + true ..\CefSharp.snk - + true - bin\x64\Debug\ + bin\Debug\ DEBUG;TRACE;OFFSCREEN full - x64 + AnyCPU prompt MinimumRecommendedRules.ruleset - bin\x64\Debug\CefSharp.OffScreen.xml - false - - bin\x64\Release\ + + bin\Release\ TRACE;OFFSCREEN + bin\Release\CefSharp.OffScreen.xml true pdbonly - x64 + AnyCPU prompt MinimumRecommendedRules.ruleset - bin\x64\Release\CefSharp.OffScreen.xml - false - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;OFFSCREEN - full - x86 - prompt - MinimumRecommendedRules.ruleset - bin\x86\Debug\CefSharp.OffScreen.xml - 1591 - false - - - bin\x86\Release\ - TRACE;OFFSCREEN - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - bin\x86\Release\CefSharp.OffScreen.xml - false - true - - - true - - - ..\CefSharp.snk diff --git a/CefSharp.WinForms/CefSharp.WinForms.csproj b/CefSharp.WinForms/CefSharp.WinForms.csproj index 1c6e7115ce..1b8129dd31 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.csproj @@ -1,4 +1,4 @@ - + @@ -18,49 +18,25 @@ 7.1 - - - x64 - bin\x64\Debug\ - false - TRACE;DEBUG;WINFORMS - - - x64 - bin\x64\Release\ - bin\x64\Release\CefSharp.WinForms.XML - pdbonly - true - true - false - TRACE;WINFORMS - true - - true - - ..\CefSharp.snk - + true - bin\x86\Debug\ - x86 - MinimumRecommendedRules.ruleset - false + bin\Debug\ TRACE;DEBUG;WINFORMS - - - bin\x86\Release\ - x86 + AnyCPU MinimumRecommendedRules.ruleset - true - pdbonly + + true - bin\x86\Release\CefSharp.WinForms.XML - false + bin\Release\ TRACE;WINFORMS - true + bin\Release\CefSharp.WinForms.XML + true + pdbonly + AnyCPU + MinimumRecommendedRules.ruleset diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj index b2aea7cc08..4fa3ff3843 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.csproj @@ -1,4 +1,4 @@ - + @@ -20,7 +20,7 @@ 4 - 7.1 + 7.1 true @@ -28,49 +28,24 @@ ..\CefSharp.snk - + true - bin\x64\Debug\ + bin\Debug\ TRACE;DEBUG;WPF full - x64 + AnyCPU prompt MinimumRecommendedRules.ruleset - false - - bin\x64\Release\ + + bin\Release\ TRACE;WPF + bin\Release\CefSharp.Wpf.XML true pdbonly - x64 + AnyCPU prompt MinimumRecommendedRules.ruleset - bin\x64\Release\CefSharp.Wpf.XML - false - true - - - true - bin\x86\Debug\ - TRACE;DEBUG;WPF - full - x86 - prompt - MinimumRecommendedRules.ruleset - false - - - bin\x86\Release\ - TRACE;WPF - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - bin\x86\Release\CefSharp.Wpf.XML - false - true diff --git a/CefSharp/CefSharp.csproj b/CefSharp/CefSharp.csproj index 9703d700cd..746ec48db2 100644 --- a/CefSharp/CefSharp.csproj +++ b/CefSharp/CefSharp.csproj @@ -25,47 +25,25 @@ ..\CefSharp.snk - + true - bin\x86\Debug\ + bin\Debug\ DEBUG;TRACE full - x86 + AnyCPU prompt MinimumRecommendedRules.ruleset - false - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - MinimumRecommendedRules.ruleset - bin\x86\Release\CefSharp.XML - false - true - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - MinimumRecommendedRules.ruleset - false - - bin\x64\Release\ + + bin\Release\ TRACE + bin\Release\CefSharp.XML true pdbonly - x64 + AnyCPU prompt MinimumRecommendedRules.ruleset - bin\x64\Release\CefSharp.XML + bin\Release\CefSharp.XML false true diff --git a/CefSharp3.sln b/CefSharp3.sln index 6eebfc7a05..28cfa22875 100644 --- a/CefSharp3.sln +++ b/CefSharp3.sln @@ -106,14 +106,14 @@ Global {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Win32.Build.0 = Release|x86 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|x64.ActiveCfg = Release|x64 {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|x64.Build.0 = Release|x64 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.ActiveCfg = Debug|x86 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.Build.0 = Debug|x86 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.ActiveCfg = Debug|x64 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.Build.0 = Debug|x64 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.ActiveCfg = Release|x86 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.Build.0 = Release|x86 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.ActiveCfg = Release|x64 - {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.Build.0 = Release|x64 + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.ActiveCfg = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|Win32.Build.0 = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.ActiveCfg = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Debug|x64.Build.0 = Debug|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.ActiveCfg = Release|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|Win32.Build.0 = Release|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.ActiveCfg = Release|Any CPU + {E6CB3790-F267-4AC7-892C-2620737682CA}.Release|x64.Build.0 = Release|Any CPU {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|Win32.ActiveCfg = Debug|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|Win32.Build.0 = Debug|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Debug|x64.ActiveCfg = Debug|x64 @@ -122,14 +122,14 @@ Global {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|Win32.Build.0 = Release|x86 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|x64.ActiveCfg = Release|x64 {23EE5140-2C2C-4B53-A954-10B08DCA6BD6}.Release|x64.Build.0 = Release|x64 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.ActiveCfg = Debug|x86 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.Build.0 = Debug|x86 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.ActiveCfg = Debug|x64 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.Build.0 = Debug|x64 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.ActiveCfg = Release|x86 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.Build.0 = Release|x86 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.ActiveCfg = Release|x64 - {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.Build.0 = Release|x64 + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.ActiveCfg = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|Win32.Build.0 = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.ActiveCfg = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Debug|x64.Build.0 = Debug|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.ActiveCfg = Release|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|Win32.Build.0 = Release|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.ActiveCfg = Release|Any CPU + {882505AD-246D-402A-8414-347EFB8E2C8D}.Release|x64.Build.0 = Release|Any CPU {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|Win32.ActiveCfg = Debug|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|Win32.Build.0 = Debug|x86 {C043FFF7-5F71-4FFC-989A-E09E18548589}.Debug|x64.ActiveCfg = Debug|x64 @@ -146,14 +146,14 @@ Global {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|Win32.Build.0 = Release|Win32 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.ActiveCfg = Release|x64 {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.Build.0 = Release|x64 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.ActiveCfg = Debug|x86 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.Build.0 = Debug|x86 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.ActiveCfg = Debug|x64 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.Build.0 = Debug|x64 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.ActiveCfg = Release|x86 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.Build.0 = Release|x86 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.ActiveCfg = Release|x64 - {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.Build.0 = Release|x64 + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.ActiveCfg = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|Win32.Build.0 = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.ActiveCfg = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Debug|x64.Build.0 = Debug|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.ActiveCfg = Release|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|Win32.Build.0 = Release|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.ActiveCfg = Release|Any CPU + {A55848CC-10E7-40CB-ADDB-04740B16DD43}.Release|x64.Build.0 = Release|Any CPU {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|Win32.ActiveCfg = Debug|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|Win32.Build.0 = Debug|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x64.ActiveCfg = Debug|x64 @@ -162,14 +162,14 @@ Global {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|Win32.Build.0 = Release|Win32 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.ActiveCfg = Release|x64 {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.Build.0 = Release|x64 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.ActiveCfg = Debug|x86 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.Build.0 = Debug|x86 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.ActiveCfg = Debug|x64 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.Build.0 = Debug|x64 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.ActiveCfg = Release|x86 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.Build.0 = Release|x86 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.ActiveCfg = Release|x64 - {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.Build.0 = Release|x64 + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.ActiveCfg = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|Win32.Build.0 = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.ActiveCfg = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Debug|x64.Build.0 = Debug|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.ActiveCfg = Release|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|Win32.Build.0 = Release|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.ActiveCfg = Release|Any CPU + {483B158D-F57D-49D9-9046-31E6A73F8A53}.Release|x64.Build.0 = Release|Any CPU {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|Win32.ActiveCfg = Debug|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|Win32.Build.0 = Debug|x86 {A4DEB90C-A529-4A93-ACE3-226A39EFCB00}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/NuGet/CefSharp.OffScreen.nuspec b/NuGet/CefSharp.OffScreen.nuspec index 7f8065d0d2..b84d48664f 100644 --- a/NuGet/CefSharp.OffScreen.nuspec +++ b/NuGet/CefSharp.OffScreen.nuspec @@ -27,8 +27,6 @@ - diff --git a/NuGet/CefSharp.WinForms.nuspec b/NuGet/CefSharp.WinForms.nuspec index c85f12884f..2be89586dd 100644 --- a/NuGet/CefSharp.WinForms.nuspec +++ b/NuGet/CefSharp.WinForms.nuspec @@ -27,15 +27,9 @@ - - - - - - - - + + + diff --git a/NuGet/CefSharp.Wpf.nuspec b/NuGet/CefSharp.Wpf.nuspec index 0230cd7cef..b1fbce7f6d 100644 --- a/NuGet/CefSharp.Wpf.nuspec +++ b/NuGet/CefSharp.Wpf.nuspec @@ -27,15 +27,9 @@ - - - - - - - - + + + diff --git a/build.ps1 b/build.ps1 index eab38dea53..6759aa9488 100644 --- a/build.ps1 +++ b/build.ps1 @@ -11,9 +11,9 @@ $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition $CefSln = Join-Path $WorkingDir 'CefSharp3.sln' -# Extract the current CEF Redist version from the CefSharp.Core\packages.CefSharp.Core.config file +# Extract the current CEF Redist version from the CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.config file # Save having to update this file manually Example 3.2704.1418 -$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\packages.CefSharp.Core.config')) +$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.config')) $RedistVersion = $CefSharpCorePackagesXml.SelectSingleNode("//packages/package[@id='cef.sdk']/@version").value function Write-Diagnostic @@ -406,7 +406,7 @@ WriteVersionToManifest "CefSharp.WinForms.Example\app.manifest" WriteVersionToManifest "CefSharp.Wpf.Example\app.manifest" WriteVersionToResourceFile "CefSharp.BrowserSubprocess.Core\Resource.rc" -WriteVersionToResourceFile "CefSharp.Core\Resource.rc" +WriteVersionToResourceFile "CefSharp.Core.Runtime\Resource.rc" switch -Exact ($Target) { From e999963162070766a60a07489d1488a5a15a3ceb Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sun, 29 Nov 2020 20:04:36 +1000 Subject: [PATCH 15/37] Convert RequestContextBuilder from C++ to C# Now part of the CefSharp.Core PublicApi --- .../CefSharp.Core.Runtime.vcxproj | 2 - .../CefSharp.Core.Runtime.vcxproj.filters | 9 - CefSharp.Core.Runtime/RequestContext.h | 13 - .../RequestContextBuilder.cpp | 130 ---------- CefSharp.Core.Runtime/RequestContextBuilder.h | 137 ----------- CefSharp.Core/PublicApi.cs | 227 +++++++++++++++++- 6 files changed, 225 insertions(+), 293 deletions(-) delete mode 100644 CefSharp.Core.Runtime/RequestContextBuilder.cpp delete mode 100644 CefSharp.Core.Runtime/RequestContextBuilder.h diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj index 4156ab6bed..e6530d60a3 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj @@ -251,7 +251,6 @@ - Create Create @@ -309,7 +308,6 @@ - diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters index 2561611906..b22865ade1 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj.filters @@ -83,9 +83,6 @@ Source Files - - Source Files - @@ -121,9 +118,6 @@ Header Files - - Header Files - Header Files @@ -331,9 +325,6 @@ Header Files - - Header Files - Header Files diff --git a/CefSharp.Core.Runtime/RequestContext.h b/CefSharp.Core.Runtime/RequestContext.h index 00da7946f2..18a2ae0a12 100644 --- a/CefSharp.Core.Runtime/RequestContext.h +++ b/CefSharp.Core.Runtime/RequestContext.h @@ -11,7 +11,6 @@ #include "include\cef_request_context.h" #include "RequestContextSettings.h" -#include "RequestContextBuilder.h" #include "Internals\CefRequestContextHandlerAdapter.h" #include "Internals\CefWrapper.h" @@ -126,18 +125,6 @@ namespace CefSharp return gcnew RequestContext(newContext); } - /// - /// Creates a new RequestContextBuilder which can be used to fluently set - /// preferences - /// - /// Returns a new RequestContextBuilder - static RequestContextBuilder^ Configure() - { - auto builder = gcnew RequestContextBuilder(); - - return builder; - } - /// /// Returns true if this object is pointing to the same context object. /// diff --git a/CefSharp.Core.Runtime/RequestContextBuilder.cpp b/CefSharp.Core.Runtime/RequestContextBuilder.cpp deleted file mode 100644 index ead366dd22..0000000000 --- a/CefSharp.Core.Runtime/RequestContextBuilder.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright © 2020 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. - -#include "Stdafx.h" -#include "RequestContextBuilder.h" -#include "RequestContext.h" - -namespace CefSharp -{ - namespace Core - { - IRequestContext^ RequestContextBuilder::Create() - { - if (_otherContext != nullptr) - { - return gcnew RequestContext(_otherContext, _handler); - } - - if(_settings != nullptr) - { - return gcnew RequestContext(_settings, _handler); - } - - return gcnew RequestContext(_handler); - } - - RequestContextBuilder^ RequestContextBuilder::OnInitialize(Action^ action) - { - if (_handler == nullptr) - { - _handler = gcnew RequestContextHandler(); - } - - _handler->OnInitialize(action); - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithPreference(String^ name, Object^ value) - { - if (_handler == nullptr) - { - _handler = gcnew RequestContextHandler(); - } - - _handler->SetPreferenceOnContextInitialized(name, value); - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithProxyServer(String^ host) - { - if (_handler == nullptr) - { - _handler = gcnew RequestContextHandler(); - } - - _handler->SetProxyOnContextInitialized(host, Nullable()); - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithProxyServer(String^ host, Nullable port) - { - if (_handler == nullptr) - { - _handler = gcnew RequestContextHandler(); - } - - _handler->SetProxyOnContextInitialized(host, port); - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithProxyServer(String^ scheme, String^ host, Nullable port) - { - if (_handler == nullptr) - { - _handler = gcnew RequestContextHandler(); - } - - _handler->SetProxyOnContextInitialized(scheme, host, port); - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::PersistUserPreferences() - { - ThrowExceptionIfContextAlreadySet(); - - if (_settings == nullptr) - { - _settings = gcnew RequestContextSettings(); - } - - _settings->PersistUserPreferences = true; - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithCachePath(String^ cachePath) - { - ThrowExceptionIfContextAlreadySet(); - - if (_settings == nullptr) - { - _settings = gcnew RequestContextSettings(); - } - - _settings->CachePath = cachePath; - - return this; - } - - RequestContextBuilder^ RequestContextBuilder::WithSharedSettings(IRequestContext^ other) - { - if (other == nullptr) - { - throw gcnew ArgumentNullException("other"); - } - - ThrowExceptionIfCustomSettingSpecified(); - - _otherContext = other; - - return this; - } - } -} diff --git a/CefSharp.Core.Runtime/RequestContextBuilder.h b/CefSharp.Core.Runtime/RequestContextBuilder.h deleted file mode 100644 index 182729fbf6..0000000000 --- a/CefSharp.Core.Runtime/RequestContextBuilder.h +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright © 2020 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 "RequestContextSettings.h" - -using namespace CefSharp::Handler; - -namespace CefSharp -{ - namespace Core - { - /// - /// Fluent style builder for creating IRequestContext instances. - /// - [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] - public ref class RequestContextBuilder - { - private: - RequestContextSettings^ _settings; - IRequestContext^ _otherContext; - RequestContextHandler^ _handler; - - void ThrowExceptionIfContextAlreadySet() - { - if (_otherContext != nullptr) - { - throw gcnew Exception("A call to WithSharedSettings has already been made, it is no possible to provide custom settings."); - } - } - - void ThrowExceptionIfCustomSettingSpecified() - { - if (_settings != nullptr) - { - throw gcnew Exception("A call to WithCachePath/PersistUserPreferences has already been made, it's not possible to share settings with another RequestContext."); - } - } - - public: - /// - /// Create the actual RequestContext instance - /// - /// Returns a new RequestContext instance. - IRequestContext^ Create(); - - /// - /// Action is called in IRequestContextHandler.OnRequestContextInitialized - /// - /// called when the context has been initialized. - /// Returns RequestContextBuilder instance - RequestContextBuilder^ OnInitialize(Action^ action); - - /// - /// Sets the Cache Path - /// - /// - /// The location where cache data for this request context will be stored on - /// disk. If this value is non-empty then it must be an absolute path that is - /// either equal to or a child directory of CefSettings.RootCachePath. - /// If the 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.CachePath value. - /// - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithCachePath(String^ cachePath); - - /// - /// Invoke this method tp persist user preferences as a JSON file in the cache path directory. - /// Can be set globally using the CefSettings.PersistUserPreferences value. - /// This value will be ignored if CachePath is empty or if it matches the CefSettings.CachePath value. - /// - /// Returns RequestContextBuilder instance - RequestContextBuilder^ PersistUserPreferences(); - - /// - /// Set the value associated with preference name when the RequestContext - /// is initialzied. If value is null the preference will be restored to its - /// default value. If setting the preference fails no error is throw, you - /// must check the CEF Log file. - /// Preferences set via the command-line usually cannot be modified. - /// - /// preference key - /// preference value - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithPreference(String^ name, Object^ value); - - /// - /// Set the Proxy server when the RequestContext is initialzied. - /// If value is null the preference will be restored to its - /// default value. If setting the preference fails no error is throw, you - /// must check the CEF Log file. - /// Proxy set via the command-line cannot be modified. - /// - /// proxy host - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithProxyServer(String^ host); - - /// - /// Set the Proxy server when the RequestContext is initialzied. - /// If value is null the preference will be restored to its - /// default value. If setting the preference fails no error is throw, you - /// must check the CEF Log file. - /// Proxy set via the command-line cannot be modified. - /// - /// proxy host - /// proxy port (optional) - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithProxyServer(String^ host, Nullable port); - - /// - /// Set the Proxy server when the RequestContext is initialzied. - /// If value is null the preference will be restored to its - /// default value. If setting the preference fails no error is throw, you - /// must check the CEF Log file. - /// Proxy set via the command-line cannot be modified. - /// - /// proxy scheme - /// proxy host - /// proxy port (optional) - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithProxyServer(String^ scheme, String^ host, Nullable port); - - /// - /// Shares storage with other RequestContext - /// - /// shares storage with this RequestContext - /// Returns RequestContextBuilder instance - RequestContextBuilder^ WithSharedSettings(IRequestContext^ other); - }; - } -} - diff --git a/CefSharp.Core/PublicApi.cs b/CefSharp.Core/PublicApi.cs index e8b924b8ff..d34b041ac6 100644 --- a/CefSharp.Core/PublicApi.cs +++ b/CefSharp.Core/PublicApi.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using CefSharp.Handler; using CefSharp.Internals; namespace CefSharp.BrowserSubprocess @@ -765,12 +766,234 @@ public RequestContext(CefSharp.RequestContextSettings settings) : base(settings) public RequestContext(CefSharp.RequestContextSettings settings, CefSharp.IRequestContextHandler requestContextHandler) : base(settings, requestContextHandler) { } + + /// + /// Creates a new RequestContextBuilder which can be used to fluently set + /// preferences + /// + /// Returns a new RequestContextBuilder + public static RequestContextBuilder Configure() + { + var builder = new RequestContextBuilder(); + + return builder; + } } - /// - public class RequestContextBuilder : CefSharp.Core.RequestContextBuilder + /// + /// Fluent style builder for creating IRequestContext instances. + /// + public class RequestContextBuilder { + private RequestContextSettings _settings; + private IRequestContext _otherContext; + private RequestContextHandler _handler; + + void ThrowExceptionIfContextAlreadySet() + { + if (_otherContext != null) + { + throw new Exception("A call to WithSharedSettings has already been made, it is no possible to provide custom settings."); + } + } + + void ThrowExceptionIfCustomSettingSpecified() + { + if (_settings != null) + { + throw new Exception("A call to WithCachePath/PersistUserPreferences has already been made, it's not possible to share settings with another RequestContext."); + } + } + /// + /// Create the actual RequestContext instance + /// + /// Returns a new RequestContext instance. + public IRequestContext Create() + { + if (_otherContext != null) + { + return new CefSharp.Core.RequestContext(_otherContext, _handler); + } + + if (_settings != null) + { + return new CefSharp.Core.RequestContext(_settings, _handler); + } + + return new CefSharp.Core.RequestContext(_handler); + } + + /// + /// Action is called in IRequestContextHandler.OnRequestContextInitialized + /// + /// called when the context has been initialized. + /// Returns RequestContextBuilder instance + public RequestContextBuilder OnInitialize(Action action) + { + if (_handler == null) + { + _handler = new RequestContextHandler(); + } + + _handler.OnInitialize(action); + + return this; + } + + /// + /// Sets the Cache Path + /// + /// + /// The location where cache data for this request context will be stored on + /// disk. If this value is non-empty then it must be an absolute path that is + /// either equal to or a child directory of CefSettings.RootCachePath. + /// If the 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.CachePath value. + /// + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithCachePath(string cachePath) + { + ThrowExceptionIfContextAlreadySet(); + + if (_settings == null) + { + _settings = new RequestContextSettings(); + } + + _settings.CachePath = cachePath; + + return this; + } + + /// + /// Invoke this method tp persist user preferences as a JSON file in the cache path directory. + /// Can be set globally using the CefSettings.PersistUserPreferences value. + /// This value will be ignored if CachePath is empty or if it matches the CefSettings.CachePath value. + /// + /// Returns RequestContextBuilder instance + public RequestContextBuilder PersistUserPreferences() + { + ThrowExceptionIfContextAlreadySet(); + if (_settings == null) + { + _settings = new RequestContextSettings(); + } + + _settings.PersistUserPreferences = true; + + return this; + } + + /// + /// Set the value associated with preference name when the RequestContext + /// is initialzied. If value is null the preference will be restored to its + /// default value. If setting the preference fails no error is throw, you + /// must check the CEF Log file. + /// Preferences set via the command-line usually cannot be modified. + /// + /// preference key + /// preference value + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithPreference(string name, object value) + { + if (_handler == null) + { + _handler = new RequestContextHandler(); + } + + _handler.SetPreferenceOnContextInitialized(name, value); + + return this; + } + + /// + /// Set the Proxy server when the RequestContext is initialzied. + /// If value is null the preference will be restored to its + /// default value. If setting the preference fails no error is throw, you + /// must check the CEF Log file. + /// Proxy set via the command-line cannot be modified. + /// + /// proxy host + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithProxyServer(string host) + { + if (_handler == null) + { + _handler = new RequestContextHandler(); + } + + _handler.SetProxyOnContextInitialized(host, null); + + return this; + } + + /// + /// Set the Proxy server when the RequestContext is initialzied. + /// If value is null the preference will be restored to its + /// default value. If setting the preference fails no error is throw, you + /// must check the CEF Log file. + /// Proxy set via the command-line cannot be modified. + /// + /// proxy host + /// proxy port (optional) + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithProxyServer(string host, int? port) + { + if (_handler == null) + { + _handler = new RequestContextHandler(); + } + + _handler.SetProxyOnContextInitialized(host, port); + + return this; + } + + /// + /// Set the Proxy server when the RequestContext is initialzied. + /// If value is null the preference will be restored to its + /// default value. If setting the preference fails no error is throw, you + /// must check the CEF Log file. + /// Proxy set via the command-line cannot be modified. + /// + /// proxy scheme + /// proxy host + /// proxy port (optional) + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithProxyServer(string scheme, string host, int? port) + { + if (_handler == null) + { + _handler = new RequestContextHandler(); + } + + _handler.SetProxyOnContextInitialized(scheme, host, port); + + return this; + } + + /// + /// Shares storage with other RequestContext + /// + /// shares storage with this RequestContext + /// Returns RequestContextBuilder instance + public RequestContextBuilder WithSharedSettings(IRequestContext other) + { + if (other == null) + { + throw new ArgumentNullException("other"); + } + + ThrowExceptionIfCustomSettingSpecified(); + + _otherContext = other; + + return this; + } } /// From 371a1e71521d72101d04a49419f2f89070c3fc13 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sun, 29 Nov 2020 20:31:29 +1000 Subject: [PATCH 16/37] Update version number to 87.1.11 --- CefSharp.BrowserSubprocess.Core/Resource.rc | 8 ++++---- CefSharp.BrowserSubprocess/app.manifest | 2 +- CefSharp.Core.Runtime/Resource.rc | 8 ++++---- CefSharp.OffScreen.Example/app.manifest | 2 +- CefSharp.WinForms.Example/app.manifest | 2 +- CefSharp.Wpf.Example/app.manifest | 2 +- CefSharp.shfbproj | 4 ++-- CefSharp/Properties/AssemblyInfo.cs | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index a8f3e00993..9293f18921 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 87,1,6 - PRODUCTVERSION 87,1,6 + FILEVERSION 87,1,11 + PRODUCTVERSION 87,1,11 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "87.1.6" + VALUE "FileVersion", "87.1.11" VALUE "LegalCopyright", "Copyright © 2020 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "87.1.6" + VALUE "ProductVersion", "87.1.11" END END BLOCK "VarFileInfo" diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index 65c66abca9..851c929ff3 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core.Runtime/Resource.rc b/CefSharp.Core.Runtime/Resource.rc index 4715bee3a0..e7f4b6bd7a 100644 --- a/CefSharp.Core.Runtime/Resource.rc +++ b/CefSharp.Core.Runtime/Resource.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 87,1,6 - PRODUCTVERSION 87,1,6 + FILEVERSION 87,1,11 + PRODUCTVERSION 87,1,11 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -16,10 +16,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "87.1.6" + VALUE "FileVersion", "87.1.11" VALUE "LegalCopyright", "Copyright © 2020 The CefSharp Authors" VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "87.1.6" + VALUE "ProductVersion", "87.1.11" END END BLOCK "VarFileInfo" diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index b6be50d068..b49c064ba6 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index 6031115aaf..b366fcd6ad 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index d47a582262..d35f503bdb 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.shfbproj b/CefSharp.shfbproj index d942e3008a..77af5616c9 100644 --- a/CefSharp.shfbproj +++ b/CefSharp.shfbproj @@ -31,7 +31,7 @@ - 87.1.6 + 87.1.11 2 False C#, Managed C++ @@ -59,7 +59,7 @@ InheritedMembers, InheritedFrameworkMembers, Protected, ProtectedInternalAsProtected, EditorBrowsableNever, NonBrowsable - Version 87.1.6 + Version 87.1.11 https://raw.githubusercontent.com/cefsharp/CefSharp/master/LICENSE Interfaces, enums, structs and classes that make up the core API interface diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 552c1f0d12..0ede1e60f0 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ public static class AssemblyInfo public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "87.1.6"; - public const string AssemblyFileVersion = "87.1.6.0"; + public const string AssemblyVersion = "87.1.11"; + public const string AssemblyFileVersion = "87.1.11.0"; public const string AssemblyCopyright = "Copyright © 2020 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; From 3b0d2591d6a0b02bf449c0c6f8b8ad424332762b Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sun, 29 Nov 2020 20:32:14 +1000 Subject: [PATCH 17/37] Migrate more of the public Api to C# --- CefSharp.Core.Runtime/CefSettingsBase.h | 59 +-- .../ManagedCefBrowserAdapter.cpp | 7 +- .../ManagedCefBrowserAdapter.h | 2 +- CefSharp.Core/PublicApi.cs | 465 +++++++++++++++++- CefSharp.OffScreen/ChromiumWebBrowser.cs | 4 +- CefSharp.WinForms/ChromiumWebBrowser.cs | 4 +- CefSharp.Wpf/ChromiumWebBrowser.cs | 4 +- CefSharp/Internals/IBrowserAdapter.cs | 5 +- 8 files changed, 470 insertions(+), 80 deletions(-) diff --git a/CefSharp.Core.Runtime/CefSettingsBase.h b/CefSharp.Core.Runtime/CefSettingsBase.h index 9747323d50..5e677f363f 100644 --- a/CefSharp.Core.Runtime/CefSettingsBase.h +++ b/CefSharp.Core.Runtime/CefSettingsBase.h @@ -19,7 +19,7 @@ namespace CefSharp /// relevant settings e.g. OffScreen starts with audio muted. /// [System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)] - public ref class CefSettingsBase abstract + public ref class CefSettingsBase sealed { private: /// @@ -381,63 +381,6 @@ namespace CefSharp _cefCustomSchemes->Add(cefCustomScheme); } - - /// - /// Set command line argument to disable GPU Acceleration. WebGL will use - /// software rendering via Swiftshader (https://swiftshader.googlesource.com/SwiftShader#introduction) - /// - void DisableGpuAcceleration() - { - if (!_cefCommandLineArgs->ContainsKey("disable-gpu")) - { - _cefCommandLineArgs->Add("disable-gpu"); - } - } - - /// - /// Set command line argument to enable Print Preview See - /// https://bitbucket.org/chromiumembedded/cef/issues/123/add-support-for-print-preview for details. - /// - void EnablePrintPreview() - { - if (!_cefCommandLineArgs->ContainsKey("enable-print-preview")) - { - _cefCommandLineArgs->Add("enable-print-preview"); - } - } - - /// - /// Set command line arguments for best OSR (Offscreen and WPF) Rendering performance Swiftshader will be used for WebGL, look at the source - /// to determine which flags best suite your requirements. See https://swiftshader.googlesource.com/SwiftShader#introduction for - /// details on Swiftshader - /// - void SetOffScreenRenderingBestPerformanceArgs() - { - // Use software rendering and compositing (disable GPU) for increased FPS - // and decreased CPU usage. - // See https://bitbucket.org/chromiumembedded/cef/issues/1257 for details. - if (!_cefCommandLineArgs->ContainsKey("disable-gpu")) - { - _cefCommandLineArgs->Add("disable-gpu"); - } - - if (!_cefCommandLineArgs->ContainsKey("disable-gpu-compositing")) - { - _cefCommandLineArgs->Add("disable-gpu-compositing"); - } - - // Synchronize the frame rate between all processes. This results in - // decreased CPU usage by avoiding the generation of extra frames that - // would otherwise be discarded. The frame rate can be set at browser - // creation time via CefBrowserSettings.windowless_frame_rate or changed - // dynamically using CefBrowserHost::SetWindowlessFrameRate. In cefclient - // it can be set via the command-line using `--off-screen-frame-rate=XX`. - // See https://bitbucket.org/chromiumembedded/cef/issues/1368 for details. - if (!_cefCommandLineArgs->ContainsKey("enable-begin-frame-scheduling")) - { - _cefCommandLineArgs->Add("enable-begin-frame-scheduling"); - } - } }; } } diff --git a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp index 0f8d3f132a..474e8473aa 100644 --- a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.cpp @@ -25,7 +25,7 @@ namespace CefSharp return _isDisposed; } - void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, BrowserSettings^ browserSettings, RequestContext^ requestContext, String^ address) + void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, IBrowserSettings^ browserSettings, IRequestContext^ requestContext, String^ address) { auto cefWindowInfoWrapper = static_cast(windowInfo); @@ -83,8 +83,11 @@ namespace CefSharp } } + auto requestCtx = (RequestContext^)requestContext; + auto bSettings =(BrowserSettings^)browserSettings; + if (!CefBrowserHost::CreateBrowser(*cefWindowInfoWrapper->GetWindowInfo(), _clientAdapter.get(), addressNative, - *browserSettings->_browserSettings, extraInfo, static_cast>(requestContext))) + *bSettings->_browserSettings, extraInfo, static_cast>(requestCtx))) { throw gcnew InvalidOperationException("CefBrowserHost::CreateBrowser call failed, review the CEF log file for more details."); } diff --git a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h index e23b744349..dd44a019c5 100644 --- a/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h +++ b/CefSharp.Core.Runtime/ManagedCefBrowserAdapter.h @@ -130,7 +130,7 @@ namespace CefSharp } virtual void OnAfterBrowserCreated(IBrowser^ browser); - void CreateBrowser(IWindowInfo^ windowInfo, BrowserSettings^ browserSettings, RequestContext^ requestContext, String^ address); + virtual void CreateBrowser(IWindowInfo^ windowInfo, IBrowserSettings^ browserSettings, IRequestContext^ requestContext, String^ address); virtual void Resize(int width, int height); virtual IBrowser^ GetBrowser(int browserId); diff --git a/CefSharp.Core/PublicApi.cs b/CefSharp.Core/PublicApi.cs index d34b041ac6..0da7f6bff0 100644 --- a/CefSharp.Core/PublicApi.cs +++ b/CefSharp.Core/PublicApi.cs @@ -149,7 +149,7 @@ public static string CefCommitHash /// true if successful; otherwise, false. public static bool Initialize(CefSettingsBase cefSettings) { - return Core.Cef.Initialize(cefSettings); + return Core.Cef.Initialize((CefSharp.Core.CefSettingsBase)cefSettings); } /// @@ -163,7 +163,7 @@ public static bool Initialize(CefSettingsBase cefSettings) /// true if successful; otherwise, false. public static bool Initialize(CefSettingsBase cefSettings, bool performDependencyCheck) { - return Core.Cef.Initialize(cefSettings, performDependencyCheck); + return Core.Cef.Initialize((CefSharp.Core.CefSettingsBase)cefSettings, performDependencyCheck); } /// @@ -178,7 +178,7 @@ public static bool Initialize(CefSettingsBase cefSettings, bool performDependenc /// true if successful; otherwise, false. public static bool Initialize(CefSettingsBase cefSettings, bool performDependencyCheck, IBrowserProcessHandler browserProcessHandler) { - return Core.Cef.Initialize(cefSettings, performDependencyCheck, browserProcessHandler); + return Core.Cef.Initialize((CefSharp.Core.CefSettingsBase)cefSettings, performDependencyCheck, browserProcessHandler); } /// @@ -193,7 +193,7 @@ public static bool Initialize(CefSettingsBase cefSettings, bool performDependenc /// true if successful; otherwise, false. public static bool Initialize(CefSettingsBase cefSettings, bool performDependencyCheck, IApp cefApp) { - return Core.Cef.Initialize(cefSettings, performDependencyCheck, cefApp); + return Core.Cef.Initialize((CefSharp.Core.CefSettingsBase)cefSettings, performDependencyCheck, cefApp); } /// @@ -672,16 +672,387 @@ public static void WaitForBrowsersToClose() } /// - public abstract class CefSettingsBase : CefSharp.Core.CefSettingsBase + public abstract class CefSettingsBase { + internal Core.CefSettingsBase settings = new Core.CefSettingsBase(); + public static explicit operator CefSharp.Core.CefSettingsBase(CefSettingsBase s) + { + return s.settings; + } + + /// + /// Add Customs schemes to this collection. + /// + public IEnumerable CefCustomSchemes + { + get { return settings.CefCustomSchemes; } + } + + /// + /// Add custom command line argumens to this collection, they will be added in OnBeforeCommandLineProcessing. The + /// CefSettings.CommandLineArgsDisabled value can be used to start with an empty command-line object. Any values specified in + /// CefSettings that equate to command-line arguments will be set before this method is called. + /// + public CommandLineArgDictionary CefCommandLineArgs + { + get { return settings.CefCommandLineArgs; } + } + + /// + /// Set to true to disable configuration of browser process features using standard CEF and Chromium command-line arguments. + /// Configuration can still be specified using CEF data structures or by adding to CefCommandLineArgs. + /// + public bool CommandLineArgsDisabled + { + get { return settings.CommandLineArgsDisabled; } + set { settings.CommandLineArgsDisabled = value; } + } + + /// + /// Set to true to control browser process main (UI) thread message pump scheduling via the + /// IBrowserProcessHandler.OnScheduleMessagePumpWork callback. This option is recommended for use in combination with the + /// Cef.DoMessageLoopWork() function in cases where the CEF message loop must be integrated into an existing application message + /// loop (see additional comments and warnings on Cef.DoMessageLoopWork). Enabling this option is not recommended for most users; + /// leave this option disabled and use either MultiThreadedMessageLoop (the default) if possible. + /// + public bool ExternalMessagePump + { + get { return settings.ExternalMessagePump; } + set { settings.ExternalMessagePump = value; } + } + + /// + /// Set to true to have the browser process message loop run in a separate thread. If false than the CefDoMessageLoopWork() + /// function must be called from your application message loop. This option is only supported on Windows. The default value is + /// true. + /// + public bool MultiThreadedMessageLoop + { + get { return settings.MultiThreadedMessageLoop; } + set { settings.MultiThreadedMessageLoop = value; } + } + + /// + /// The path to a separate executable that will be launched for sub-processes. By default the browser process executable is used. + /// See the comments on Cef.ExecuteProcess() for details. If this value is non-empty then it must be an absolute path. + /// Also configurable using the "browser-subprocess-path" command-line switch. + /// Defaults to using the provided CefSharp.BrowserSubprocess.exe instance + /// + public string BrowserSubprocessPath + { + get { return settings.BrowserSubprocessPath; } + set { settings.BrowserSubprocessPath = value; } + } + + /// + /// The location where data for the global browser cache will be stored on disk. In this value is non-empty then it must be + /// an absolute path that is must be either equal to or a child directory of CefSettings.RootCachePath (if RootCachePath is + /// empty it will default to this value). If the 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 RequestContext instances via the + /// RequestContextSettings.CachePath value. + /// + public string CachePath + { + get { return settings.CachePath; } + set { settings.CachePath = value; } + } + + /// + /// The root directory that all CefSettings.CachePath and RequestContextSettings.CachePath values must have in common. If this + /// value is empty and CefSettings.CachePath is non-empty then it will default to the CefSettings.CachePath 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 CachePath directory. NOTE: CefSharp does not implement the CHROMIUM SANDBOX. A non-empty + /// RootCachePath can be used in conjuncation with an empty CefSettings.CachePath in instances where you would like browsers + /// attached to the Global RequestContext (the default) created in "incognito mode" and instances created with a custom + /// RequestContext using a disk based cache. + /// + public string RootCachePath + { + get { return settings.RootCachePath; } + set { settings.RootCachePath = value; } + } + + /// + /// The location where user data such as spell checking dictionary files will be stored on disk. If this value is empty then the + /// default user data directory will be used ("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 { return settings.UserDataPath; } + set { settings.UserDataPath = value; } + } + + /// + /// Set to true in order to completely ignore SSL certificate errors. This is NOT recommended. + /// + public bool IgnoreCertificateErrors + { + get { return settings.IgnoreCertificateErrors; } + set { settings.IgnoreCertificateErrors = value; } + } + + /// + /// The locale string that will be passed to WebKit. If empty the default locale of "en-US" will be used. Also configurable using + /// the "lang" command-line switch. + /// + public string Locale + { + get { return settings.Locale; } + set { settings.Locale = value; } + } + + /// + /// The fully qualified path for the locales directory. If this value is empty the locales directory must be located in the + /// module directory. If this value is non-empty then it must be an absolute path. Also configurable using the "locales-dir-path" + /// command-line switch. + /// + public string LocalesDirPath + { + get { return settings.LocalesDirPath; } + set { settings.LocalesDirPath = value; } + } + + /// + /// 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. Also configurable using the "resources-dir-path" command-line switch. + /// + public string ResourcesDirPath + { + get { return settings.ResourcesDirPath; } + set { settings.ResourcesDirPath = value; } + } + + /// + /// The directory and file name to use for the debug log. If empty a default log file name and location will be used. On Windows + /// a "debug.log" file will be written in the main executable directory. Also configurable using the"log-file" command- line + /// switch. + /// + public string LogFile + { + get { return settings.LogFile; } + set { settings.LogFile = value; } + } + + /// + /// The log severity. Only messages of this severity level or higher will be logged. When set to + /// no messages will be written to the log file, but Fatal messages will still be + /// output to stderr. Also configurable using the "log-severity" command-line switch with a value of "verbose", "info", "warning", + /// "error", "fatal", "error-report" or "disable". + /// + public CefSharp.LogSeverity LogSeverity + { + get { return settings.LogSeverity; } + set { settings.LogSeverity = value; } + } + + /// + /// Custom flags that will be used when initializing the V8 JavaScript engine. The consequences of using custom flags may not be + /// well tested. Also configurable using the "js-flags" command-line switch. + /// + public string JavascriptFlags + { + get { return settings.JavascriptFlags; } + set { settings.JavascriptFlags = value; } + } + + /// + /// Set to true to disable loading of pack files for resources and locales. A resource bundle handler must be provided for the + /// browser and render processes via CefApp.GetResourceBundleHandler() if loading of pack files is disabled. Also configurable + /// using the "disable-pack-loading" command- line switch. + /// + public bool PackLoadingDisabled + { + get { return settings.PackLoadingDisabled; } + set { settings.PackLoadingDisabled = value; } + } + + /// + /// Value that will be inserted as the product portion of the default User-Agent string. If empty the Chromium product version + /// will be used. If UserAgent is specified this value will be ignored. Also configurable using the "product-version" command- + /// line switch. + /// + public string ProductVersion + { + get { return settings.ProductVersion; } + set { settings.ProductVersion = value; } + } + + /// + /// Set to a value between 1024 and 65535 to enable remote debugging on the specified port. For example, if 8080 is specified the + /// remote debugging URL will be http://localhost:8080. CEF can be remotely debugged from any CEF or Chrome browser window. Also + /// configurable using the "remote-debugging-port" command-line switch. + /// + public int RemoteDebuggingPort + { + get { return settings.RemoteDebuggingPort; } + set { settings.RemoteDebuggingPort = value; } + } + + /// + /// The number of stack trace frames to capture for uncaught exceptions. Specify a positive value to enable the + /// CefRenderProcessHandler. OnUncaughtException() callback. Specify 0 (default value) and OnUncaughtException() will not be + /// called. Also configurable using the "uncaught-exception-stack-size" command-line switch. + /// + public int UncaughtExceptionStackSize + { + get { return settings.UncaughtExceptionStackSize; } + set { settings.UncaughtExceptionStackSize = value; } + } + + /// + /// Value that will be returned as the User-Agent HTTP header. If empty the default User-Agent string will be used. Also + /// configurable using the "user-agent" command-line switch. + /// + public string UserAgent + { + get { return settings.UserAgent; } + set { settings.UserAgent = value; } + } + + /// + /// Set to true (1) to enable windowless (off-screen) rendering support. Do not enable this value if the application does not use + /// windowless rendering as it may reduce rendering performance on some systems. + /// + public bool WindowlessRenderingEnabled + { + get { return settings.WindowlessRenderingEnabled; } + set { settings.WindowlessRenderingEnabled = value; } + } + + /// + /// To persist session cookies (cookies without an expiry date or validity interval) by default when using the global cookie + /// manager set this value to true. Session cookies are generally intended to be transient and most Web browsers do not persist + /// them. A CachePath value must also be specified to enable this feature. Also configurable using the "persist-session-cookies" + /// command-line switch. Can be overridden for individual RequestContext instances via the + /// RequestContextSettings.PersistSessionCookies value. + /// + public bool PersistSessionCookies + { + get { return settings.PersistSessionCookies; } + set { settings.PersistSessionCookies = value; } + } + + /// + /// To persist user preferences as a JSON file in the cache path directory set this value to true. A CachePath value must also be + /// specified to enable this feature. Also configurable using the "persist-user-preferences" command-line switch. Can be + /// overridden for individual RequestContext instances via the RequestContextSettings.PersistUserPreferences value. + /// + public bool PersistUserPreferences + { + get { return settings.PersistUserPreferences; } + set { settings.PersistUserPreferences = value; } + } + + /// + /// Comma delimited ordered list of language codes without any whitespace that will be used in the "Accept-Language" HTTP header. + /// May be set globally using the CefSettings.AcceptLanguageList value. If both values are empty then "en-US,en" will be used. + /// + /// + public string AcceptLanguageList + { + get { return settings.AcceptLanguageList; } + set { settings.AcceptLanguageList = value; } + } + + /// + /// Background color used for the browser before a document is loaded and when no document color is specified. The alpha + /// component must be either fully opaque (0xFF) or fully transparent (0x00). If the alpha component is fully opaque then the RGB + /// components will be used as the background color. If the alpha component is fully transparent for a WinForms browser then the + /// default value of opaque white be used. If the alpha component is fully transparent for a windowless (WPF/OffScreen) browser + /// then transparent painting will be enabled. + /// + public UInt32 BackgroundColor + { + get { return settings.BackgroundColor; } + set { settings.BackgroundColor = value; } + } + + /// + /// GUID string used for identifying the application. This is passed to the system AV function for scanning downloaded files. By + /// default, the GUID will be an empty string and the file will be treated as an untrusted file when the GUID is empty. + /// + public string ApplicationClientIdForFileScanning + { + get { return settings.ApplicationClientIdForFileScanning; } + set { settings.ApplicationClientIdForFileScanning = value; } + } + + /// + /// Registers a custom scheme using the provided settings. + /// + /// The CefCustomScheme which provides the details about the scheme. + public void RegisterScheme(CefCustomScheme scheme) + { + settings.RegisterScheme(scheme); + } + + /// + /// Set command line argument to disable GPU Acceleration. WebGL will use + /// software rendering via Swiftshader (https://swiftshader.googlesource.com/SwiftShader#introduction) + /// + public void DisableGpuAcceleration() + { + if (!settings.CefCommandLineArgs.ContainsKey("disable-gpu")) + { + settings.CefCommandLineArgs.Add("disable-gpu"); + } + } + + /// + /// Set command line argument to enable Print Preview See + /// https://bitbucket.org/chromiumembedded/cef/issues/123/add-support-for-print-preview for details. + /// + public void EnablePrintPreview() + { + if (!settings.CefCommandLineArgs.ContainsKey("enable-print-preview")) + { + settings.CefCommandLineArgs.Add("enable-print-preview"); + } + } + + /// + /// Set command line arguments for best OSR (Offscreen and WPF) Rendering performance Swiftshader will be used for WebGL, look at the source + /// to determine which flags best suite your requirements. See https://swiftshader.googlesource.com/SwiftShader#introduction for + /// details on Swiftshader + /// + public void SetOffScreenRenderingBestPerformanceArgs() + { + // Use software rendering and compositing (disable GPU) for increased FPS + // and decreased CPU usage. + // See https://bitbucket.org/chromiumembedded/cef/issues/1257 for details. + if (!settings.CefCommandLineArgs.ContainsKey("disable-gpu")) + { + settings.CefCommandLineArgs.Add("disable-gpu"); + } + + if (!settings.CefCommandLineArgs.ContainsKey("disable-gpu-compositing")) + { + settings.CefCommandLineArgs.Add("disable-gpu-compositing"); + } + + // Synchronize the frame rate between all processes. This results in + // decreased CPU usage by avoiding the generation of extra frames that + // would otherwise be discarded. The frame rate can be set at browser + // creation time via IBrowserSettings.WindowlessFrameRate or changed + // dynamically using IBrowserHost.SetWindowlessFrameRate. In cefclient + // it can be set via the command-line using `--off-screen-frame-rate=XX`. + // See https://bitbucket.org/chromiumembedded/cef/issues/1368 for details. + if (!settings.CefCommandLineArgs.ContainsKey("enable-begin-frame-scheduling")) + { + settings.CefCommandLineArgs.Add("enable-begin-frame-scheduling"); + } + } } /// - public partial class ManagedCefBrowserAdapter : CefSharp.Core.ManagedCefBrowserAdapter + public static class ManagedCefBrowserAdapter { - public ManagedCefBrowserAdapter(CefSharp.Internals.IWebBrowserInternal webBrowserInternal, bool offScreenRendering) : base(webBrowserInternal, offScreenRendering) + public static IBrowserAdapter Create(IWebBrowserInternal webBrowserInternal, bool offScreenRendering) { + return new CefSharp.Core.ManagedCefBrowserAdapter(webBrowserInternal, offScreenRendering); } } @@ -757,13 +1128,13 @@ public RequestContext(CefSharp.IRequestContextHandler requestContextHandler) : b } /// - public RequestContext(CefSharp.RequestContextSettings settings) : base(settings) + public RequestContext(CefSharp.RequestContextSettings settings) : base(settings.settings) { } /// - public RequestContext(CefSharp.RequestContextSettings settings, CefSharp.IRequestContextHandler requestContextHandler) : base(settings, requestContextHandler) + public RequestContext(CefSharp.RequestContextSettings settings, CefSharp.IRequestContextHandler requestContextHandler) : base(settings.settings, requestContextHandler) { } @@ -817,7 +1188,7 @@ public IRequestContext Create() if (_settings != null) { - return new CefSharp.Core.RequestContext(_settings, _handler); + return new CefSharp.Core.RequestContext(_settings.settings, _handler); } return new CefSharp.Core.RequestContext(_handler); @@ -997,9 +1368,79 @@ public RequestContextBuilder WithSharedSettings(IRequestContext other) } /// - public class RequestContextSettings : CefSharp.Core.RequestContextSettings + public class RequestContextSettings { + internal Core.RequestContextSettings settings = new Core.RequestContextSettings(); + + /// + /// To persist session cookies (cookies without an expiry date or validity + /// interval) by default when using the global cookie manager set this value to + /// true. Session cookies are generally intended to be transient and most + /// Web browsers do not persist them. Can be set globally using the + /// CefSettings.PersistSessionCookies value. This value will be ignored if + /// CachePath is empty or if it matches the CefSettings.CachePath value. + /// + public bool PersistSessionCookies + { + get { return settings.PersistSessionCookies; } + set { settings.PersistSessionCookies = value; } + } + + /// + /// To persist user preferences as a JSON file in the cache path directory set + /// this value to true. Can be set globally using the + /// CefSettings.PersistUserPreferences value. This value will be ignored if + /// CachePath is empty or if it matches the CefSettings.CachePath value. + /// + public bool PersistUserPreferences + { + get { return settings.PersistUserPreferences; } + set { settings.PersistUserPreferences = value; } + } + /// + /// The location where cache data for this request context will be stored on + /// disk. If this value is non-empty then it must be an absolute path that is + /// either equal to or a child directory of CefSettings.RootCachePath. + /// If the 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.CachePath value. + /// + public String CachePath + { + get { return settings.CachePath; } + set { settings.CachePath = value; } + } + + /// + /// Comma delimited ordered list of language codes without any whitespace that + /// will be used in the "Accept-Language" HTTP header. Can be set globally + /// using the CefSettings.accept_language_list value or overridden on a per- + /// browser basis using the BrowserSettings.AcceptLanguageList value. If + /// all values are empty then "en-US,en" will be used. This value will be + /// ignored if CachePath matches the CefSettings.CachePath value. + /// + public String AcceptLanguageList + { + get { return settings.AcceptLanguageList; } + set { settings.AcceptLanguageList = value; } + } + + /// + /// Set to true to ignore errors related to invalid SSL certificates. + /// Enabling this setting can lead to potential security vulnerabilities like + /// "man in the middle" attacks. Applications that load content from the + /// internet should not enable this setting. Can be set globally using the + /// CefSettings.IgnoreCertificateErrors value. This value will be ignored if + /// CachePath matches the CefSettings.cache_path value. + /// + public bool IgnoreCertificateErrors + { + get { return settings.IgnoreCertificateErrors; } + set { settings.IgnoreCertificateErrors = value; } + } } /// @@ -1024,7 +1465,7 @@ public static class DragData { public static IDragData Create() { - return CefSharp.DragData.Create(); + return Core.DragData.Create(); } } } diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 2bfb6c21ea..01ac95529b 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -26,7 +26,7 @@ public partial class ChromiumWebBrowser : IRenderWebBrowser /// /// The managed cef browser adapter /// - private ManagedCefBrowserAdapter managedCefBrowserAdapter; + private IBrowserAdapter managedCefBrowserAdapter; /// /// Size of the Chromium viewport. @@ -200,7 +200,7 @@ public ChromiumWebBrowser(string address = "", BrowserSettings browserSettings = Cef.AddDisposable(this); Address = address; - managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this, true); + managedCefBrowserAdapter = ManagedCefBrowserAdapter.Create(this, true); if (automaticallyCreateBrowser) { diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs index 0cf731de3a..dcac972e44 100644 --- a/CefSharp.WinForms/ChromiumWebBrowser.cs +++ b/CefSharp.WinForms/ChromiumWebBrowser.cs @@ -31,7 +31,7 @@ public partial class ChromiumWebBrowser : Control, IWebBrowserInternal, IWinForm /// /// The managed cef browser adapter /// - private ManagedCefBrowserAdapter managedCefBrowserAdapter; + private IBrowserAdapter managedCefBrowserAdapter; /// /// The parent form message interceptor /// @@ -363,7 +363,7 @@ private void InitializeFieldsAndCefIfRequired() browserSettings = new BrowserSettings(autoDispose: true); } - managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this, false); + managedCefBrowserAdapter = ManagedCefBrowserAdapter.Create(this, false); initialized = true; } diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 19ecefe941..f4b8c3efc5 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -81,7 +81,7 @@ public partial class ChromiumWebBrowser : Control, IRenderWebBrowser, IWpfWebBro /// /// The managed cef browser adapter /// - private ManagedCefBrowserAdapter managedCefBrowserAdapter; + private IBrowserAdapter managedCefBrowserAdapter; /// /// The ignore URI change /// @@ -550,7 +550,7 @@ private void NoInliningConstructor() UndoCommand = new DelegateCommand(this.Undo); RedoCommand = new DelegateCommand(this.Redo); - managedCefBrowserAdapter = new ManagedCefBrowserAdapter(this, true); + managedCefBrowserAdapter = ManagedCefBrowserAdapter.Create(this, true); browserSettings = new BrowserSettings(autoDispose: true); diff --git a/CefSharp/Internals/IBrowserAdapter.cs b/CefSharp/Internals/IBrowserAdapter.cs index d3cedcdbd4..b4070d654c 100644 --- a/CefSharp/Internals/IBrowserAdapter.cs +++ b/CefSharp/Internals/IBrowserAdapter.cs @@ -2,14 +2,17 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +using System; + namespace CefSharp.Internals { /// /// Interface used to break reference cycles in CefSharp.Core C++ code. /// This will ALWAYS be a ManagedCefBrowserAdapter instance. /// - public interface IBrowserAdapter + public interface IBrowserAdapter : IDisposable { + void CreateBrowser(IWindowInfo windowInfo, IBrowserSettings browserSettings, IRequestContext requestContext, string address); IMethodRunnerQueue MethodRunnerQueue { get; } IJavascriptObjectRepositoryInternal JavascriptObjectRepository { get; } IJavascriptCallbackFactory JavascriptCallbackFactory { get; } From 7b694e95269b6fac170930a0d7dd0e79488b8ac9 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sun, 29 Nov 2020 21:00:01 +1000 Subject: [PATCH 18/37] Net Core - Basic restructure complete --- ...rp.Core.Runtime.RefAssembly.netcore.csproj | 2 +- .../CefSharp.Core.Runtime.cs | 30 ++++--------------- CefSharp.Core.Runtime/CefSettingsBase.h | 4 +-- .../CefSharp.Core.Runtime.netcore.vcxproj | 2 -- ...Sharp.Core.Runtime.netcore.vcxproj.filters | 6 ---- CefSharp.Core/CefSharp.Core.csproj | 2 +- .../CefSharp.Common.NETCore.nuspec | 18 +++++------ .../CefSharp.Common.NETCore.targets | 4 +-- build.netcore.ps1 | 8 ++--- 9 files changed, 25 insertions(+), 51 deletions(-) diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj index 2d9d3ba4db..06abea9c93 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.RefAssembly.netcore.csproj @@ -41,7 +41,7 @@ Haven't found a nice way to determine the Platform (resolves as AnyCPU) --> - + $(SolutionDir)CefSharp.Core.Runtime\bin.netcore\x64\$(Configuration)\CefSharp.Core.Runtime.dll diff --git a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs index 2b82c3a0c7..6f9e6950a4 100644 --- a/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs +++ b/CefSharp.Core.Runtime.RefAssembly/CefSharp.Core.Runtime.cs @@ -99,15 +99,15 @@ public static void VisitWebPluginInfo(CefSharp.IWebPluginInfoVisitor visitor) { public static void WaitForBrowsersToClose() { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public abstract partial class CefSettingsBase : System.IDisposable + public sealed partial class CefSettingsBase : System.IDisposable { public CefSettingsBase() { } public string AcceptLanguageList { get { throw null; } set { } } public string ApplicationClientIdForFileScanning { get { throw null; } set { } } - public virtual uint BackgroundColor { get { throw null; } set { } } + public uint BackgroundColor { get { throw null; } set { } } public string BrowserSubprocessPath { get { throw null; } set { } } public string CachePath { get { throw null; } set { } } - public virtual CefSharp.Internals.CommandLineArgDictionary CefCommandLineArgs { get { throw null; } } + public CefSharp.Internals.CommandLineArgDictionary CefCommandLineArgs { get { throw null; } } public System.Collections.Generic.IEnumerable CefCustomSchemes { get { throw null; } } public bool CommandLineArgsDisabled { get { throw null; } set { } } public bool ExternalMessagePump { get { throw null; } set { } } @@ -129,13 +129,10 @@ public CefSettingsBase() { } public string UserAgent { get { throw null; } set { } } public string UserDataPath { get { throw null; } set { } } public bool WindowlessRenderingEnabled { get { throw null; } set { } } - public void DisableGpuAcceleration() { } public void Dispose() { } - protected virtual void Dispose(bool A_0) { } - public void EnablePrintPreview() { } + protected void Dispose(bool A_0) { } ~CefSettingsBase() { } public void RegisterScheme(CefSharp.CefCustomScheme cefCustomScheme) { } - public void SetOffScreenRenderingBestPerformanceArgs() { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class DragData : CefSharp.Internals.CefWrapper, CefSharp.IDragData @@ -166,14 +163,14 @@ protected virtual void Dispose(bool A_0) { } public virtual void ResetFileContents() { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public partial class ManagedCefBrowserAdapter : CefSharp.Internals.IBrowserAdapter, System.IDisposable + public partial class ManagedCefBrowserAdapter : CefSharp.Internals.IBrowserAdapter { public ManagedCefBrowserAdapter(CefSharp.Internals.IWebBrowserInternal webBrowserInternal, bool offScreenRendering) { } public virtual bool IsDisposed { get { throw null; } } public virtual CefSharp.Internals.IJavascriptCallbackFactory JavascriptCallbackFactory { get { throw null; } } public virtual CefSharp.Internals.IJavascriptObjectRepositoryInternal JavascriptObjectRepository { get { throw null; } } public virtual CefSharp.Internals.IMethodRunnerQueue MethodRunnerQueue { get { throw null; } } - public void CreateBrowser(CefSharp.IWindowInfo windowInfo, CefSharp.Core.BrowserSettings browserSettings, CefSharp.Core.RequestContext requestContext, string address) { } + public virtual void CreateBrowser(CefSharp.IWindowInfo windowInfo, CefSharp.IBrowserSettings browserSettings, CefSharp.IRequestContext requestContext, string address) { } public void Dispose() { } protected virtual void Dispose(bool A_0) { } ~ManagedCefBrowserAdapter() { } @@ -274,7 +271,6 @@ public virtual void ClearCertificateExceptions(CefSharp.ICompletionCallback call public virtual void ClearHttpAuthCredentials(CefSharp.ICompletionCallback callback) { } public virtual bool ClearSchemeHandlerFactories() { throw null; } public virtual void CloseAllConnections(CefSharp.ICompletionCallback callback) { } - public static CefSharp.Core.RequestContextBuilder Configure() { throw null; } public static CefSharp.IRequestContext CreateContext(CefSharp.IRequestContext other, CefSharp.IRequestContextHandler requestContextHandler) { throw null; } public virtual bool DidLoadExtension(string extensionId) { throw null; } public void Dispose() { } @@ -296,20 +292,6 @@ public virtual void PurgePluginListCache(bool reloadPages) { } public virtual bool SetPreference(string name, object value, out string error) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public partial class RequestContextBuilder - { - public RequestContextBuilder() { } - public CefSharp.IRequestContext Create() { throw null; } - public CefSharp.Core.RequestContextBuilder OnInitialize(System.Action action) { throw null; } - public CefSharp.Core.RequestContextBuilder PersistUserPreferences() { throw null; } - public CefSharp.Core.RequestContextBuilder WithCachePath(string cachePath) { throw null; } - public CefSharp.Core.RequestContextBuilder WithPreference(string name, object value) { throw null; } - public CefSharp.Core.RequestContextBuilder WithProxyServer(string host) { throw null; } - public CefSharp.Core.RequestContextBuilder WithProxyServer(string host, int? port) { throw null; } - public CefSharp.Core.RequestContextBuilder WithProxyServer(string scheme, string host, int? port) { throw null; } - public CefSharp.Core.RequestContextBuilder WithSharedSettings(CefSharp.IRequestContext other) { throw null; } - } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class RequestContextSettings : System.IDisposable { public RequestContextSettings() { } diff --git a/CefSharp.Core.Runtime/CefSettingsBase.h b/CefSharp.Core.Runtime/CefSettingsBase.h index 5e677f363f..c08e96351b 100644 --- a/CefSharp.Core.Runtime/CefSettingsBase.h +++ b/CefSharp.Core.Runtime/CefSettingsBase.h @@ -84,7 +84,7 @@ namespace CefSharp /// CefSettings.CommandLineArgsDisabled value can be used to start with an empty command-line object. Any values specified in /// CefSettings that equate to command-line arguments will be set before this method is called. /// - virtual property CommandLineArgDictionary^ CefCommandLineArgs + property CommandLineArgDictionary^ CefCommandLineArgs { CommandLineArgDictionary^ get() { return _cefCommandLineArgs; } } @@ -354,7 +354,7 @@ namespace CefSharp /// default value of opaque white be used. If the alpha component is fully transparent for a windowless (WPF/OffScreen) browser /// then transparent painting will be enabled. /// - virtual property uint32 BackgroundColor + property uint32 BackgroundColor { uint32 get() { return _cefSettings->background_color; } void set(uint32 value) { _cefSettings->background_color = value; } diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj index 8d4a5f6011..2b89f31d01 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj @@ -245,7 +245,6 @@ - Create Create @@ -303,7 +302,6 @@ - diff --git a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters index aeadb16348..24c50aac73 100644 --- a/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters +++ b/CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj.filters @@ -83,9 +83,6 @@ Source Files - - Source Files - @@ -328,9 +325,6 @@ Header Files - - Header Files - Header Files diff --git a/CefSharp.Core/CefSharp.Core.csproj b/CefSharp.Core/CefSharp.Core.csproj index 93babc9072..b745f15d72 100644 --- a/CefSharp.Core/CefSharp.Core.csproj +++ b/CefSharp.Core/CefSharp.Core.csproj @@ -38,7 +38,7 @@ bin\Release\ TRACE - bin\Release\CefSharp.XML + bin\Release\CefSharp.Core.XML true pdbonly AnyCPU diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec index cef98d3ebe..a135e7722c 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec @@ -21,7 +21,7 @@ - + - - + + - - - + + + - - - + + + diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.targets b/NuGet/PackageReference/CefSharp.Common.NETCore.targets index 768a670e10..175003b90e 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.targets +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.targets @@ -35,8 +35,8 @@ - - + + runtimes\win-x86\native\locales\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest diff --git a/build.netcore.ps1 b/build.netcore.ps1 index b74237b96b..9368764e33 100644 --- a/build.netcore.ps1 +++ b/build.netcore.ps1 @@ -12,9 +12,9 @@ $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition $CefSln = Join-Path $WorkingDir 'CefSharp3.netcore.sln' $nuget = Join-Path $WorkingDir .\nuget\NuGet.exe -# Extract the current CEF Redist version from the CefSharp.Core\packages.CefSharp.Core.config file +# Extract the current CEF Redist version from the CefSharp.Runtime.Core\packages.CefSharp.Core.config file # Save having to update this file manually Example 3.2704.1418 -$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\packages.CefSharp.Core.Runtime.netcore.config')) +$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.netcore.config')) $RedistVersion = $CefSharpCorePackagesXml.SelectSingleNode("//packages/package[@id='cef.sdk']/@version").value function Write-Diagnostic @@ -169,7 +169,7 @@ function Compile Write-Diagnostic "Restore Nuget Packages" # Restore packages - . $nuget restore CefSharp.Core\packages.CefSharp.Core.Runtime.netcore.config -PackagesDirectory packages + . $nuget restore CefSharp.Core.Runtime\packages.CefSharp.Core.Runtime.netcore.config -PackagesDirectory packages . $nuget restore CefSharp.BrowserSubprocess.Core\packages.CefSharp.BrowserSubprocess.Core.netcore.config -PackagesDirectory packages &msbuild /t:restore CefSharp3.netcore.sln @@ -320,7 +320,7 @@ WriteVersionToManifest "CefSharp.WinForms.Example\app.manifest" WriteVersionToManifest "CefSharp.Wpf.Example\app.manifest" WriteVersionToResourceFile "CefSharp.BrowserSubprocess.Core\Resource.rc" -WriteVersionToResourceFile "CefSharp.Core\Resource.rc" +WriteVersionToResourceFile "CefSharp.Core.Runtime\Resource.rc" switch -Exact ($Target) { From 1d49511c1d1531307c5d5cf8df307d4f04e42692 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 27 Nov 2020 20:25:27 +1000 Subject: [PATCH 19/37] Net Core - ModuleInitializer (Doesn't work yet) --- CefSharp.Core/CefSharp.Core.netcore.csproj | 8 +++++++ CefSharp.Core/Initializer.cs | 22 +++++++++++++++++++ CefSharp.Core/ModuleInitializerAttribute.cs | 7 ++++++ .../CefSharp.WinForms.netcore.csproj | 8 +++++++ CefSharp.WinForms/Initializer.cs | 22 +++++++++++++++++++ 5 files changed, 67 insertions(+) create mode 100644 CefSharp.Core/Initializer.cs create mode 100644 CefSharp.Core/ModuleInitializerAttribute.cs create mode 100644 CefSharp.WinForms/Initializer.cs diff --git a/CefSharp.Core/CefSharp.Core.netcore.csproj b/CefSharp.Core/CefSharp.Core.netcore.csproj index 3ab2ebdd3d..eac7203705 100644 --- a/CefSharp.Core/CefSharp.Core.netcore.csproj +++ b/CefSharp.Core/CefSharp.Core.netcore.csproj @@ -19,6 +19,7 @@ ..\CefSharp.snk MinimumRecommendedRules.ruleset CS1591,CS0436 + 9.0 @@ -28,6 +29,13 @@ TRACE;NETCOREAPP + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/CefSharp.Core/Initializer.cs b/CefSharp.Core/Initializer.cs new file mode 100644 index 0000000000..ae1fcedaed --- /dev/null +++ b/CefSharp.Core/Initializer.cs @@ -0,0 +1,22 @@ +// Copyright © 2020 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. + +using System.IO; +using System.Runtime.CompilerServices; + +namespace CefSharp +{ + public static class Initializer + { + public static string InitValue = ""; + + [ModuleInitializer] + internal static void ModuleInitializer() + { + InitValue = "CefSharp Loaded!!!"; + var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); + System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(browserSubprocessDllPath); + } + } +} diff --git a/CefSharp.Core/ModuleInitializerAttribute.cs b/CefSharp.Core/ModuleInitializerAttribute.cs new file mode 100644 index 0000000000..98f8bd4fca --- /dev/null +++ b/CefSharp.Core/ModuleInitializerAttribute.cs @@ -0,0 +1,7 @@ +namespace System.Runtime.CompilerServices +{ + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] + public sealed class ModuleInitializerAttribute : Attribute + { + } +} diff --git a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj index eebc94a4b8..9a3cd9bed6 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj @@ -20,6 +20,7 @@ ..\CefSharp.snk MinimumRecommendedRules.ruleset WINFORMS + 9.0 @@ -52,5 +53,12 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/CefSharp.WinForms/Initializer.cs b/CefSharp.WinForms/Initializer.cs new file mode 100644 index 0000000000..50d7598273 --- /dev/null +++ b/CefSharp.WinForms/Initializer.cs @@ -0,0 +1,22 @@ +// Copyright © 2020 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. + +using System.IO; +using System.Runtime.CompilerServices; + +namespace CefSharp.WinForms +{ + public static class Initializer + { + public static string InitValue = ""; + + [ModuleInitializer] + internal static void ModuleInitializer() + { + InitValue = "CefSharp WinForms Loaded!!!"; + var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); + System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(browserSubprocessDllPath); + } + } +} From 15c9dc1d77690ee942f1b2121d5722ab5a0e5277 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Tue, 1 Dec 2020 10:23:28 +1000 Subject: [PATCH 20/37] Remove direct references to BrowserSettings --- CefSharp.OffScreen/ChromiumWebBrowser.cs | 6 +++--- CefSharp.WinForms/ChromiumWebBrowser.cs | 2 +- CefSharp.Wpf/ChromiumWebBrowser.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 01ac95529b..1a3f0f249e 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -168,7 +168,7 @@ public bool IsBrowserInitialized /// See for more details. Defaults to null /// automatically create the underlying Browser /// Cef::Initialize() failed - public ChromiumWebBrowser(HtmlString html, BrowserSettings browserSettings = null, + public ChromiumWebBrowser(HtmlString html, IBrowserSettings browserSettings = null, IRequestContext requestContext = null, bool automaticallyCreateBrowser = true) : this(html.ToDataUriString(), browserSettings, requestContext, automaticallyCreateBrowser) { } @@ -182,7 +182,7 @@ public ChromiumWebBrowser(HtmlString html, BrowserSettings browserSettings = nul /// See for more details. Defaults to null /// automatically create the underlying Browser /// Cef::Initialize() failed - public ChromiumWebBrowser(string address = "", BrowserSettings browserSettings = null, + public ChromiumWebBrowser(string address = "", IBrowserSettings browserSettings = null, IRequestContext requestContext = null, bool automaticallyCreateBrowser = true) { if (!Cef.IsInitialized) @@ -285,7 +285,7 @@ protected virtual void Dispose(bool disposing) /// Window information used when creating the browser /// Browser initialization settings /// An instance of the underlying offscreen browser has already been created, this method can only be called once. - public void CreateBrowser(IWindowInfo windowInfo = null, BrowserSettings browserSettings = null) + public void CreateBrowser(IWindowInfo windowInfo = null, IBrowserSettings browserSettings = null) { if (browserCreated) { diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs index dcac972e44..ed1a53ce3d 100644 --- a/CefSharp.WinForms/ChromiumWebBrowser.cs +++ b/CefSharp.WinForms/ChromiumWebBrowser.cs @@ -596,7 +596,7 @@ private void CreateBrowser() initialAddressLoaded = !string.IsNullOrEmpty(Address); - managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings as BrowserSettings, requestContext as RequestContext, Address); + managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext as RequestContext, Address); } } } diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index f4b8c3efc5..beaaff3db7 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -1749,7 +1749,7 @@ protected virtual bool CreateOffscreenBrowser(Size size) var windowInfo = CreateOffscreenBrowserWindowInfo(source == null ? IntPtr.Zero : source.Handle); //Pass null in for Address and rely on Load being called in OnAfterBrowserCreated //Workaround for issue https://github.com/cefsharp/CefSharp/issues/2300 - managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings as BrowserSettings, requestContext as RequestContext, address: initialAddress); + managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext as RequestContext, address: initialAddress); //Dispose of BrowserSettings if we created it, if user created then they're responsible if (browserSettings.AutoDispose) From b3104223dd80eded863e142021cad0ae90126b0d Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Tue, 1 Dec 2020 10:23:58 +1000 Subject: [PATCH 21/37] Net Core - ModuleInitializer load CefShar.Core.Runtime.dl --- CefSharp.Core/Initializer.cs | 18 +++++++++++++++--- CefSharp.WinForms/Initializer.cs | 9 ++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CefSharp.Core/Initializer.cs b/CefSharp.Core/Initializer.cs index ae1fcedaed..64cd1a0aa7 100644 --- a/CefSharp.Core/Initializer.cs +++ b/CefSharp.Core/Initializer.cs @@ -3,20 +3,32 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System.IO; +using System.Reflection; using System.Runtime.CompilerServices; +using System.Runtime.Loader; namespace CefSharp { public static class Initializer { - public static string InitValue = ""; + public static string CefSharpCoreRuntimeLocation = ""; [ModuleInitializer] internal static void ModuleInitializer() { - InitValue = "CefSharp Loaded!!!"; + var assembly = LoadCefSharpCoreRuntime(); + + CefSharpCoreRuntimeLocation = assembly.Location; + } + + public static Assembly LoadCefSharpCoreRuntime() + { + //Load into the same context as CefSharp.Core, if user was to create their own context then + //this should keep thing together. + var currentCtx = AssemblyLoadContext.GetLoadContext(typeof(Initializer).Assembly); + var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); - System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(browserSubprocessDllPath); + return currentCtx.LoadFromAssemblyPath(browserSubprocessDllPath); } } } diff --git a/CefSharp.WinForms/Initializer.cs b/CefSharp.WinForms/Initializer.cs index 50d7598273..223ac29a51 100644 --- a/CefSharp.WinForms/Initializer.cs +++ b/CefSharp.WinForms/Initializer.cs @@ -2,21 +2,20 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -using System.IO; using System.Runtime.CompilerServices; namespace CefSharp.WinForms { public static class Initializer { - public static string InitValue = ""; + public static string CefSharpCoreRuntimeLocation = ""; [ModuleInitializer] internal static void ModuleInitializer() { - InitValue = "CefSharp WinForms Loaded!!!"; - var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); - System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(browserSubprocessDllPath); + var assembly = CefSharp.Initializer.LoadCefSharpCoreRuntime(); + + CefSharpCoreRuntimeLocation = assembly.Location; } } } From 9fb5cf31fb7e0247b99cd61dabac4c4add36ccf5 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 2 Dec 2020 11:24:02 +1000 Subject: [PATCH 22/37] Net Core - Load libcef.dll via CLR Module initializer If no RID is specified then we can load libcef.dll using the module initializer --- CefSharp.Core/Initializer.cs | 66 +++++++++++++++---- CefSharp.Core/PublicApi.cs | 14 ++++ CefSharp.WinForms/Initializer.cs | 21 ------ .../CefSharp.Common.NETCore.nuspec | 12 ++-- .../CefSharp.Common.NETCore.targets | 12 ---- 5 files changed, 74 insertions(+), 51 deletions(-) delete mode 100644 CefSharp.WinForms/Initializer.cs diff --git a/CefSharp.Core/Initializer.cs b/CefSharp.Core/Initializer.cs index 64cd1a0aa7..e8c02dda0f 100644 --- a/CefSharp.Core/Initializer.cs +++ b/CefSharp.Core/Initializer.cs @@ -2,33 +2,75 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +using System; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.Loader; +using System.Runtime.InteropServices; namespace CefSharp { + /// + /// CLR Module Initializer + /// Used to load libcef.dll if required + /// public static class Initializer { - public static string CefSharpCoreRuntimeLocation = ""; + //TODO: Internal debugging only for now, needs improving if users are going to + //get meaningful data from this. + public static (bool Loaded, string Path, string BrowserSubProcessPath, IntPtr LibraryHandle) LibCefLoadStatus; [ModuleInitializer] internal static void ModuleInitializer() { - var assembly = LoadCefSharpCoreRuntime(); + var currentFolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); + var libCefPath = Path.Combine(currentFolder, "libcef.dll"); - CefSharpCoreRuntimeLocation = assembly.Location; - } + if (File.Exists(libCefPath)) + { + //We didn't load CEF, it was already next to our calling assembly, the + //framework should load it correctly on it's own + LibCefLoadStatus = (false, libCefPath, null, IntPtr.Zero); + } + else + { + //TODO: This will need changing if we support ARM64 + var arch = Environment.Is64BitProcess ? "x64" : "x86"; + var archFolder = $"runtimes\\win-{arch}\\native"; + libCefPath = Path.Combine(currentFolder, archFolder, "libcef.dll"); + if (File.Exists(libCefPath)) + { + if (NativeLibrary.TryLoad(libCefPath, out IntPtr handle)) + { + var browserSubProcessPath = Path.Combine(currentFolder, archFolder, "CefSharp.BrowserSubprocess.exe"); + LibCefLoadStatus = (true, libCefPath, browserSubProcessPath, handle); + } + } + else + { + LibCefLoadStatus = (false, libCefPath, null, IntPtr.Zero); + } + } + //var assembly = LoadCefSharpCoreRuntime(); - public static Assembly LoadCefSharpCoreRuntime() - { - //Load into the same context as CefSharp.Core, if user was to create their own context then - //this should keep thing together. - var currentCtx = AssemblyLoadContext.GetLoadContext(typeof(Initializer).Assembly); + //NativeLibrary.SetDllImportResolver(typeof(CefSharp.Core.CefSettingsBase).Assembly, LibCefImportResolver); - var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); - return currentCtx.LoadFromAssemblyPath(browserSubprocessDllPath); + //CefSharpCoreRuntimeLocation = assembly.Location; } + + //private static IntPtr LibCefImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + //{ + // return IntPtr.Zero; + //} + + //public static Assembly LoadCefSharpCoreRuntime() + //{ + // //Load into the same context as CefSharp.Core, if user was to create their own context then + // //this should keep thing together. + // var currentCtx = AssemblyLoadContext.GetLoadContext(typeof(Initializer).Assembly); + + // var browserSubprocessDllPath = Path.Combine(Path.GetDirectoryName(typeof(Initializer).Assembly.Location), "CefSharp.Core.Runtime.dll"); + // return currentCtx.LoadFromAssemblyPath(browserSubprocessDllPath); + //} } } diff --git a/CefSharp.Core/PublicApi.cs b/CefSharp.Core/PublicApi.cs index 0da7f6bff0..938ccbd1f7 100644 --- a/CefSharp.Core/PublicApi.cs +++ b/CefSharp.Core/PublicApi.cs @@ -676,6 +676,20 @@ public abstract class CefSettingsBase { internal Core.CefSettingsBase settings = new Core.CefSettingsBase(); +#if NETCOREAPP + public CefSettingsBase() : base() + { + if(!File.Exists(BrowserSubprocessPath)) + { + var libCefLoadStatus = Initializer.LibCefLoadStatus; + if(libCefLoadStatus.Loaded) + { + BrowserSubprocessPath = libCefLoadStatus.BrowserSubProcessPath; + } + } + } +#endif + public static explicit operator CefSharp.Core.CefSettingsBase(CefSettingsBase s) { return s.settings; diff --git a/CefSharp.WinForms/Initializer.cs b/CefSharp.WinForms/Initializer.cs deleted file mode 100644 index 223ac29a51..0000000000 --- a/CefSharp.WinForms/Initializer.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright © 2020 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. - -using System.Runtime.CompilerServices; - -namespace CefSharp.WinForms -{ - public static class Initializer - { - public static string CefSharpCoreRuntimeLocation = ""; - - [ModuleInitializer] - internal static void ModuleInitializer() - { - var assembly = CefSharp.Initializer.LoadCefSharpCoreRuntime(); - - CefSharpCoreRuntimeLocation = assembly.Location; - } - } -} diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec index a135e7722c..f080228b32 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.nuspec @@ -34,13 +34,13 @@ - - - + + + - - - + + + diff --git a/NuGet/PackageReference/CefSharp.Common.NETCore.targets b/NuGet/PackageReference/CefSharp.Common.NETCore.targets index 175003b90e..ddac8ee636 100644 --- a/NuGet/PackageReference/CefSharp.Common.NETCore.targets +++ b/NuGet/PackageReference/CefSharp.Common.NETCore.targets @@ -49,12 +49,6 @@ Included false - - runtimes\win-x86\native\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - runtimes\win-x86\native\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -80,12 +74,6 @@ Included false - - runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest From 31fd319ad25bce4587c2ecf45b584e2e80c6cbd0 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sat, 5 Dec 2020 15:26:45 +1000 Subject: [PATCH 23/37] Add version to CefSharp.Core --- CefSharp.Core.Runtime/AssemblyInfo.cpp | 5 +---- CefSharp.Core/CefSharp.Core.csproj | 5 +++-- CefSharp.Core/Properties/AssemblyInfo.cs | 2 +- CefSharp.Wpf/Internals/WpfExtensions.cs | 2 -- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CefSharp.Core.Runtime/AssemblyInfo.cpp b/CefSharp.Core.Runtime/AssemblyInfo.cpp index df8a1249bc..faebb78466 100644 --- a/CefSharp.Core.Runtime/AssemblyInfo.cpp +++ b/CefSharp.Core.Runtime/AssemblyInfo.cpp @@ -12,7 +12,7 @@ using namespace System::Security::Permissions; using namespace CefSharp; [assembly:AssemblyTitle("CefSharp.Core.Runtime")]; -[assembly:AssemblyDescription("CefSharp Core Library (VC++)")]; +[assembly:AssemblyDescription("CefSharp Core Runtime Library (VC++)")]; [assembly:AssemblyCompany(AssemblyInfo::AssemblyCompany)]; [assembly:AssemblyProduct(AssemblyInfo::AssemblyProduct)]; [assembly:AssemblyCopyright(AssemblyInfo::AssemblyCopyright)]; @@ -27,7 +27,4 @@ using namespace CefSharp; [assembly:InternalsVisibleTo(AssemblyInfo::CefSharpBrowserSubprocessCoreProject)]; [assembly:InternalsVisibleTo(AssemblyInfo::CefSharpBrowserSubprocessProject)]; -[assembly:InternalsVisibleTo(AssemblyInfo::CefSharpWpfProject)]; -[assembly:InternalsVisibleTo(AssemblyInfo::CefSharpWinFormsProject)]; -[assembly:InternalsVisibleTo(AssemblyInfo::CefSharpOffScreenProject)]; [assembly:InternalsVisibleTo(AssemblyInfo::CefSharpTestProject)]; diff --git a/CefSharp.Core/CefSharp.Core.csproj b/CefSharp.Core/CefSharp.Core.csproj index b745f15d72..e47815c44b 100644 --- a/CefSharp.Core/CefSharp.Core.csproj +++ b/CefSharp.Core/CefSharp.Core.csproj @@ -1,4 +1,4 @@ - + @@ -51,6 +51,7 @@ + @@ -68,4 +69,4 @@ - + \ No newline at end of file diff --git a/CefSharp.Core/Properties/AssemblyInfo.cs b/CefSharp.Core/Properties/AssemblyInfo.cs index 5c33df57cf..004e672505 100644 --- a/CefSharp.Core/Properties/AssemblyInfo.cs +++ b/CefSharp.Core/Properties/AssemblyInfo.cs @@ -4,7 +4,7 @@ using CefSharp; [assembly:AssemblyTitle("CefSharp.Core")] -[assembly:AssemblyDescription("CefSharp Core Library (VC++)")] +[assembly:AssemblyDescription("CefSharp Core Library")] [assembly:AssemblyCompany(AssemblyInfo.AssemblyCompany)] [assembly:AssemblyProduct(AssemblyInfo.AssemblyProduct)] [assembly:AssemblyCopyright(AssemblyInfo.AssemblyCopyright)] diff --git a/CefSharp.Wpf/Internals/WpfExtensions.cs b/CefSharp.Wpf/Internals/WpfExtensions.cs index e3aea4a612..10749baa2f 100644 --- a/CefSharp.Wpf/Internals/WpfExtensions.cs +++ b/CefSharp.Wpf/Internals/WpfExtensions.cs @@ -7,8 +7,6 @@ using System.Text; using System.Windows; using System.Windows.Input; -using CefSharp.Core; -using CefSharp.Internals; namespace CefSharp.Wpf.Internals { From 8989f015f134cede98c6758808637dc00e80e4cc Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sun, 6 Dec 2020 14:08:37 +1000 Subject: [PATCH 24/37] Remove dependency on CefSharp.Core.Runtime Rewrite common targets --- CefSharp.Core/PublicApi.cs | 16 +++ CefSharp.OffScreen/CefSharp.OffScreen.csproj | 6 +- CefSharp.OffScreen/ChromiumWebBrowser.cs | 6 +- CefSharp.WinForms/CefSharp.WinForms.csproj | 4 - CefSharp.WinForms/ChromiumWebBrowser.cs | 6 +- CefSharp.Wpf/CefSharp.Wpf.csproj | 4 - CefSharp.Wpf/ChromiumWebBrowser.cs | 6 +- NuGet/CefSharp.Common.targets | 123 ++++++++++--------- 8 files changed, 91 insertions(+), 80 deletions(-) diff --git a/CefSharp.Core/PublicApi.cs b/CefSharp.Core/PublicApi.cs index 938ccbd1f7..c1644a5700 100644 --- a/CefSharp.Core/PublicApi.cs +++ b/CefSharp.Core/PublicApi.cs @@ -63,6 +63,22 @@ public static int Main(string[] args) } } +namespace CefSharp.Core +{ + public static class ObjectFactory + { + public static IBrowserSettings CreateBrowserSettings(bool autoDispose) + { + return new CefSharp.Core.BrowserSettings(autoDispose); + } + + public static IWindowInfo CreateWindowInfo() + { + return new CefSharp.Core.WindowInfo(); + } + } +} + //TODO: Split out into seperate classes namespace CefSharp { diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.csproj index 7b9ef0896a..32348bae50 100644 --- a/CefSharp.OffScreen/CefSharp.OffScreen.csproj +++ b/CefSharp.OffScreen/CefSharp.OffScreen.csproj @@ -19,7 +19,7 @@ 7.1 true - true + true ..\CefSharp.snk @@ -61,10 +61,6 @@ - - {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core.Runtime - {b760b002-d277-4525-9f63-67ed2065034a} CefSharp.Core diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 1a3f0f249e..ec31f095f9 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -296,16 +296,16 @@ public void CreateBrowser(IWindowInfo windowInfo = null, IBrowserSettings browse if (browserSettings == null) { - browserSettings = new BrowserSettings(autoDispose: true); + browserSettings = Core.ObjectFactory.CreateBrowserSettings(autoDispose: true); } if (windowInfo == null) { - windowInfo = new WindowInfo(); + windowInfo = Core.ObjectFactory.CreateWindowInfo(); windowInfo.SetAsWindowless(IntPtr.Zero); } - managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, (RequestContext)RequestContext, Address); + managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, RequestContext, Address); //Dispose of BrowserSettings if we created it, if user created then they're responsible if (browserSettings.AutoDispose) diff --git a/CefSharp.WinForms/CefSharp.WinForms.csproj b/CefSharp.WinForms/CefSharp.WinForms.csproj index 1b8129dd31..78ae967e88 100644 --- a/CefSharp.WinForms/CefSharp.WinForms.csproj +++ b/CefSharp.WinForms/CefSharp.WinForms.csproj @@ -70,10 +70,6 @@ - - {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core.Runtime - {b760b002-d277-4525-9f63-67ed2065034a} CefSharp.Core diff --git a/CefSharp.WinForms/ChromiumWebBrowser.cs b/CefSharp.WinForms/ChromiumWebBrowser.cs index ed1a53ce3d..66987ce9ac 100644 --- a/CefSharp.WinForms/ChromiumWebBrowser.cs +++ b/CefSharp.WinForms/ChromiumWebBrowser.cs @@ -360,7 +360,7 @@ private void InitializeFieldsAndCefIfRequired() if (browserSettings == null) { - browserSettings = new BrowserSettings(autoDispose: true); + browserSettings = Core.ObjectFactory.CreateBrowserSettings(autoDispose: true); } managedCefBrowserAdapter = ManagedCefBrowserAdapter.Create(this, false); @@ -553,7 +553,7 @@ private void OnHandleDestroyedInternal() /// protected virtual IWindowInfo CreateBrowserWindowInfo(IntPtr handle) { - var windowInfo = new WindowInfo(); + var windowInfo = Core.ObjectFactory.CreateWindowInfo(); windowInfo.SetAsChild(handle); if (!ActivateBrowserOnCreation) @@ -596,7 +596,7 @@ private void CreateBrowser() initialAddressLoaded = !string.IsNullOrEmpty(Address); - managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext as RequestContext, Address); + managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext, Address); } } } diff --git a/CefSharp.Wpf/CefSharp.Wpf.csproj b/CefSharp.Wpf/CefSharp.Wpf.csproj index 4fa3ff3843..073a6a2f02 100644 --- a/CefSharp.Wpf/CefSharp.Wpf.csproj +++ b/CefSharp.Wpf/CefSharp.Wpf.csproj @@ -102,10 +102,6 @@ - - {7b495581-2271-4f41-9476-acb86e8c864f} - CefSharp.Core.Runtime - {b760b002-d277-4525-9f63-67ed2065034a} CefSharp.Core diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index beaaff3db7..b148c79d44 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -552,7 +552,7 @@ private void NoInliningConstructor() managedCefBrowserAdapter = ManagedCefBrowserAdapter.Create(this, true); - browserSettings = new BrowserSettings(autoDispose: true); + browserSettings = Core.ObjectFactory.CreateBrowserSettings(autoDispose: true); WpfKeyboardHandler = new WpfKeyboardHandler(this); @@ -1749,7 +1749,7 @@ protected virtual bool CreateOffscreenBrowser(Size size) var windowInfo = CreateOffscreenBrowserWindowInfo(source == null ? IntPtr.Zero : source.Handle); //Pass null in for Address and rely on Load being called in OnAfterBrowserCreated //Workaround for issue https://github.com/cefsharp/CefSharp/issues/2300 - managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext as RequestContext, address: initialAddress); + managedCefBrowserAdapter.CreateBrowser(windowInfo, browserSettings, requestContext, address: initialAddress); //Dispose of BrowserSettings if we created it, if user created then they're responsible if (browserSettings.AutoDispose) @@ -1773,7 +1773,7 @@ protected virtual bool CreateOffscreenBrowser(Size size) /// Window Info protected virtual IWindowInfo CreateOffscreenBrowserWindowInfo(IntPtr handle) { - var windowInfo = new WindowInfo(); + var windowInfo = Core.ObjectFactory.CreateWindowInfo(); windowInfo.SetAsWindowless(handle); return windowInfo; } diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 8d37b239f4..da43215fc5 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -13,61 +13,68 @@ correct ordering .props imports, which we require as this depends on the cef.redist packages exporting an ItemGroup --> - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) - PreserveNewest - Included - false - - - + + + + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + + + + + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + + + + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + + + \ No newline at end of file From 2588c7403a6c1a14b1bf96f1455d3635afcddf0d Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Tue, 8 Dec 2020 15:54:57 +1000 Subject: [PATCH 25/37] AnyCPU app.config transform Improve AnyCPU support --- .../CefSharp.Common.app.config.x64.transform | 27 +++++++ .../CefSharp.Common.app.config.x86.transform | 27 +++++++ NuGet/CefSharp.Common.nuspec | 2 + NuGet/CefSharp.Common.props | 3 + NuGet/CefSharp.Common.targets | 75 +++++++++++++++---- build.ps1 | 16 ++++ 6 files changed, 135 insertions(+), 15 deletions(-) create mode 100644 NuGet/CefSharp.Common.app.config.x64.transform create mode 100644 NuGet/CefSharp.Common.app.config.x86.transform diff --git a/NuGet/CefSharp.Common.app.config.x64.transform b/NuGet/CefSharp.Common.app.config.x64.transform new file mode 100644 index 0000000000..da192f81a3 --- /dev/null +++ b/NuGet/CefSharp.Common.app.config.x64.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Common.app.config.x86.transform b/NuGet/CefSharp.Common.app.config.x86.transform new file mode 100644 index 0000000000..175b118681 --- /dev/null +++ b/NuGet/CefSharp.Common.app.config.x86.transform @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index 26c51a7099..8d030e839a 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -48,6 +48,8 @@ + + diff --git a/NuGet/CefSharp.Common.props b/NuGet/CefSharp.Common.props index 31ea7950bc..28b39a6852 100644 --- a/NuGet/CefSharp.Common.props +++ b/NuGet/CefSharp.Common.props @@ -4,6 +4,9 @@ + + + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index da43215fc5..4b56ee5175 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -1,22 +1,36 @@ - + - + + + + + + + - . + . + + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll + $(VSToolsPath)\Web\Microsoft.Web.Publishing.Tasks.dll - - + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -30,9 +44,9 @@ false - + - + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -57,11 +71,27 @@ Included false + + + $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + + + $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + Included + false + - - - - + + + + $(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest @@ -75,6 +105,21 @@ false - + + + + + + + + + + + + + \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 6759aa9488..24546f7f88 100644 --- a/build.ps1 +++ b/build.ps1 @@ -344,6 +344,19 @@ function WriteVersionToManifest($manifest) [System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding) } +function WriteVersionToTransform($transform) +{ + $Filename = Join-Path $WorkingDir $transform + $Regex = 'codeBase version="(.*?)"'; + + $TransformData = Get-Content -Encoding UTF8 $Filename + $NewString = $TransformData -replace $Regex, "codeBase version=""$AssemblyVersion.0""" + + $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False + [System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding) +} + + function WriteVersionToResourceFile($resourceFile) { $Filename = Join-Path $WorkingDir $resourceFile @@ -405,6 +418,9 @@ WriteVersionToManifest "CefSharp.OffScreen.Example\app.manifest" WriteVersionToManifest "CefSharp.WinForms.Example\app.manifest" WriteVersionToManifest "CefSharp.Wpf.Example\app.manifest" +WriteVersionToTransform "NuGet\CefSharp.Common.app.config.x64.transform" +WriteVersionToTransform "NuGet\CefSharp.Common.app.config.x86.transform" + WriteVersionToResourceFile "CefSharp.BrowserSubprocess.Core\Resource.rc" WriteVersionToResourceFile "CefSharp.Core.Runtime\Resource.rc" From ee05ef2e0127577ff15a8602dcda818b3918e381 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 9 Dec 2020 17:52:43 +1000 Subject: [PATCH 26/37] Improve Net Core 3 support Only delete CefSharp.Core.Runtime.dll when AnyCPU --- NuGet/CefSharp.Common.nuspec | 19 +++++++++++++------ NuGet/CefSharp.Common.targets | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec index 8d030e839a..d58d9b934c 100644 --- a/NuGet/CefSharp.Common.nuspec +++ b/NuGet/CefSharp.Common.nuspec @@ -20,12 +20,19 @@ - + - - + + + + + + + + + @@ -48,11 +55,11 @@ - + - + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 4b56ee5175..707f8dec92 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -4,7 +4,7 @@ - + @@ -86,7 +86,7 @@ PreserveNewest Included false - + From 5d4cd243c6d9687d63f1c6b0b6bc256561267d29 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Wed, 9 Dec 2020 20:09:32 +1000 Subject: [PATCH 27/37] Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore --- NuGet/CefSharp.Common.props | 6 +++--- NuGet/CefSharp.Common.targets | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/NuGet/CefSharp.Common.props b/NuGet/CefSharp.Common.props index 28b39a6852..eeb86e1c20 100644 --- a/NuGet/CefSharp.Common.props +++ b/NuGet/CefSharp.Common.props @@ -4,9 +4,9 @@ - - - + + + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 707f8dec92..9422b76372 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -108,6 +108,27 @@ + + + + + + $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.Runtime.dll + True + + + + + + + + $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.Runtime.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 9422b76372..c092b4648b 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -4,14 +4,13 @@ - + - + - . + + + + + runtimes\win-x64\lib\netcoreapp3.0 + + + + + runtimes\win-x86\lib\netcoreapp3.0 + + + + + runtimes\win-x86\lib\netcoreapp3.0 + runtimes\win-x64\lib\netcoreapp3.0 + + + + + + + + + - $(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension) + $(CefSharpTargetDirAnyCpu32)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Included false - $(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension) + $(CefSharpTargetDirAnyCpu64)\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest Included false @@ -108,27 +143,6 @@ - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.Runtime.dll - True - - - - - - - - $(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.Runtime.dll - True - - - - -