diff --git a/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h b/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h index 33b226b74f..b0041e5376 100644 --- a/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h @@ -62,8 +62,10 @@ namespace CefSharp property int BrowserId; property bool IsPopup; +#ifndef NETCOREAPP // This allows us to create the WCF proxies back to our parent process. property ChannelFactory^ ChannelFactory; +#endif // The WCF proxy to the parent process. property IBrowserProcess^ BrowserProcess; diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters new file mode 100644 index 0000000000..d8aee10e1e --- /dev/null +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.filters @@ -0,0 +1,197 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Header Files + + + Header Files + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj new file mode 100644 index 0000000000..b0d4154c08 --- /dev/null +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.netcore.vcxproj @@ -0,0 +1,245 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 16.0 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C} + CefSharp.BrowserSubprocess.Core + CefSharpBrowserSubprocessCore + NetCoreCProj + 10.0 + netcoreapp3.1 + + + + + DynamicLibrary + true + NetCore + Unicode + + + DynamicLibrary + true + NetCore + Unicode + + + DynamicLibrary + false + NetCore + Unicode + + + DynamicLibrary + false + NetCore + Unicode + + + + + + + + + + + + + + + + + + + true + ..\CefSharp.snk + true + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + true + ..\CefSharp.snk + true + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + false + ..\CefSharp.snk + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + false + ..\CefSharp.snk + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + Disabled + WIN32;_DEBUG;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + Use + true + true + + + true + libcef.lib;libcef_dll_wrapper.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion); + /ignore:4099 %(AdditionalOptions) + + + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + Disabled + WIN32;_DEBUG;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + Use + true + + + true + libcef.lib;libcef_dll_wrapper.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion); + /ignore:4099 %(AdditionalOptions) + + + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + WIN32;NDEBUG;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + Use + true + true + + + true + libcef.lib;libcef_dll_wrapper.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + + + + + Level3 + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + WIN32;NDEBUG;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + Use + true + + + true + libcef.lib;libcef_dll_wrapper.lib + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + {39E385AD-DC5C-451E-B061-09AF3EE038EB} + + + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/WcfBrowserSubprocessExecutable.h b/CefSharp.BrowserSubprocess.Core/WcfBrowserSubprocessExecutable.h index 611064842f..515995b714 100644 --- a/CefSharp.BrowserSubprocess.Core/WcfBrowserSubprocessExecutable.h +++ b/CefSharp.BrowserSubprocess.Core/WcfBrowserSubprocessExecutable.h @@ -10,6 +10,7 @@ #include "WcfEnabledSubProcess.h" #include "BrowserSubprocessExecutable.h" +#ifndef NETCOREAPP using namespace System; using namespace CefSharp::Internals; @@ -44,3 +45,4 @@ namespace CefSharp }; } } +#endif diff --git a/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.cpp b/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.cpp index ced1f83c3b..aef716ac90 100644 --- a/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.cpp +++ b/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.cpp @@ -7,6 +7,7 @@ #include "Stdafx.h" #include "WcfEnabledSubProcess.h" +#ifndef NETCOREAPP using namespace System::ServiceModel; namespace CefSharp @@ -101,3 +102,4 @@ namespace CefSharp } } } +#endif diff --git a/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.h b/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.h index ffd3ea46f7..7d58937d0a 100644 --- a/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.h +++ b/CefSharp.BrowserSubprocess.Core/WcfEnabledSubProcess.h @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#ifndef NETCOREAPP #pragma once #include "Stdafx.h" @@ -36,3 +37,4 @@ namespace CefSharp }; } } +#endif diff --git a/CefSharp.Core/CefSharp.Core.netcore.vcxproj b/CefSharp.Core/CefSharp.Core.netcore.vcxproj new file mode 100644 index 0000000000..33442873ec --- /dev/null +++ b/CefSharp.Core/CefSharp.Core.netcore.vcxproj @@ -0,0 +1,348 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + 16.0 + {7B495581-2271-4F41-9476-ACB86E8C864F} + CefSharp.Core + CefSharp + NetCoreCProj + 10.0 + netcoreapp3.1 + + + + + DynamicLibrary + Unicode + NetCore + true + + + DynamicLibrary + Unicode + NetCore + true + + + DynamicLibrary + Unicode + NetCore + + + DynamicLibrary + Unicode + NetCore + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>11.0.51106.1 + + + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + false + false + ..\CefSharp.snk + AllRules.ruleset + + + CefSharp.Core + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + false + false + ..\CefSharp.snk + AllRules.ruleset + + + CefSharp.Core + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + bin\$(Platform)\$(Configuration)\ + false + AllRules.ruleset + + + CefSharp.Core + ..\CefSharp.snk + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + false + AllRules.ruleset + + + CefSharp.Core + ..\CefSharp.snk + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + $(SolutionDir)packages\$(CefSdkVer)\CEF;$(SourcePath) + + + + Disabled + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _DEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;OS_WIN;NETCOREAPP;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Use + true + Level3 + ProgramDatabase + Stdafx.h + true + true + + + false + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + false + true + true + MachineX86 + false + false + $(LinkKeyFile) + /ignore:4099 %(AdditionalOptions) + libcef.dll;%(DelayLoadDLLs) + + + + + Disabled + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _DEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Use + true + Level3 + ProgramDatabase + Stdafx.h + true + + + false + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + false + true + true + false + false + $(LinkKeyFile) + + + + + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _NDEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;OS_WIN;NETCOREAPP;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + true + true + true + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + LinkVerbose + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + true + MachineX86 + $(LinkKeyFile) + + + + + $(SolutionDir)packages\$(CefSdkVer)\CEF;%(AdditionalIncludeDirectories);$(ProjectDir) + _NDEBUG;_WIN32_WINNT=0x0600;WINVER=0x0600;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;USING_CEF_SHARED;_CRT_SECURE_NO_WARNINGS;EXPORT;NETCOREAPP;%(PreprocessorDefinitions) + MultiThreadedDLL + Use + Level3 + ProgramDatabase + true + true + + + opengl32.lib;glu32.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration);$(SolutionDir)packages\$(CefSdkVer)\CEF\$(Platform)\$(Configuration)\VS$(VisualStudioProductVersion) + true + $(LinkKeyFile) + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {39E385AD-DC5C-451E-B061-09AF3EE038EB} + false + true + true + false + false + + + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.Core/CefSharp.Core.netcore.vcxproj.filters b/CefSharp.Core/CefSharp.Core.netcore.vcxproj.filters new file mode 100644 index 0000000000..3f7faa36af --- /dev/null +++ b/CefSharp.Core/CefSharp.Core.netcore.vcxproj.filters @@ -0,0 +1,343 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Header Files + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp index 966c878b97..a635bec366 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp @@ -482,7 +482,7 @@ bool CefBrowserHostWrapper::IsBackgroundHost::get() return _browserHost->IsBackgroundHost(); } -void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::array^ underlines, Nullable replacementRange, Nullable selectionRange) +void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::array^ underlines, Nullable replacementRange, Nullable selectionRange) { ThrowIfDisposed(); @@ -516,7 +516,7 @@ void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::arrayImeSetComposition(StringUtils::ToNative(text), underlinesVector, repRange, selRange); } -void CefBrowserHostWrapper::ImeCommitText(String^ text, Nullable replacementRange, int relativeCursorPos) +void CefBrowserHostWrapper::ImeCommitText(String^ text, Nullable replacementRange, int relativeCursorPos) { ThrowIfDisposed(); diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.h b/CefSharp.Core/Internals/CefBrowserHostWrapper.h index 54219e9e78..aa7ac8f44a 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.h +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.h @@ -105,8 +105,8 @@ namespace CefSharp bool get(); } - virtual void ImeSetComposition(String^ text, cli::array^ underlines, Nullable replacementRange, Nullable selectionRange); - virtual void ImeCommitText(String^ text, Nullable replacementRange, int relativeCursorPos); + virtual void ImeSetComposition(String^ text, cli::array^ underlines, Nullable replacementRange, Nullable selectionRange); + virtual void ImeCommitText(String^ text, Nullable replacementRange, int relativeCursorPos); virtual void ImeFinishComposingText(bool keepSelection); virtual void ImeCancelComposition(); diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core/Internals/CefSharpApp.h index 4b0d00c3ca..dd8ee99390 100644 --- a/CefSharp.Core/Internals/CefSharpApp.h +++ b/CefSharp.Core/Internals/CefSharpApp.h @@ -75,10 +75,12 @@ namespace CefSharp virtual void OnBeforeChildProcessLaunch(CefRefPtr commandLine) OVERRIDE { +#ifndef NETCOREAPP if (CefSharpSettings::WcfEnabled) { commandLine->AppendArgument(StringUtils::ToNative(CefSharpArguments::WcfEnabledArgument)); } +#endif if (CefSharpSettings::SubprocessExitIfParentProcessClosed) { diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h index 6563a589ab..47d8d268e6 100644 --- a/CefSharp.Core/Internals/RenderClientAdapter.h +++ b/CefSharp.Core/Internals/RenderClientAdapter.h @@ -211,7 +211,7 @@ namespace CefSharp charBounds[index] = Rect((*it).x, (*it).y, (*it).width, (*it).height); } - _renderWebBrowser->OnImeCompositionRangeChanged(Range(selectedRange.from, selectedRange.to), charBounds); + _renderWebBrowser->OnImeCompositionRangeChanged(CefSharp::Structs::Range(selectedRange.from, selectedRange.to), charBounds); } //CefAccessibilityHandler diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core/ManagedCefBrowserAdapter.cpp index 9f2de5a0a4..033c0ce4a9 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core/ManagedCefBrowserAdapter.cpp @@ -89,6 +89,7 @@ void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, BrowserSet delete windowInfo; } +#ifndef NETCOREAPP // NOTE: This was moved out of OnAfterBrowserCreated to prevent the System.ServiceModel assembly from being loaded when WCF is not enabled. __declspec(noinline) void ManagedCefBrowserAdapter::InitializeBrowserProcessServiceHost(IBrowser^ browser) { @@ -124,6 +125,7 @@ __declspec(noinline) void ManagedCefBrowserAdapter::DisposeBrowserProcessService _browserProcessServiceHost = nullptr; } } +#endif void ManagedCefBrowserAdapter::OnAfterBrowserCreated(IBrowser^ browser) { @@ -135,10 +137,12 @@ void ManagedCefBrowserAdapter::OnAfterBrowserCreated(IBrowser^ browser) //Browser has been initialized, it's now too late to register a sync JSB object if Wcf wasn't enabled _javaScriptObjectRepository->IsBrowserInitialized = true; +#ifndef NETCOREAPP if (CefSharpSettings::WcfEnabled) { InitializeBrowserProcessServiceHost(browser); } +#endif if (_webBrowserInternal != nullptr) { diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h index ad618d4873..c75d94698d 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.h +++ b/CefSharp.Core/ManagedCefBrowserAdapter.h @@ -19,7 +19,9 @@ #include "Internals/JavascriptCallbackFactory.h" using namespace System::Diagnostics; +#ifndef NETCOREAPP using namespace System::ServiceModel; +#endif using namespace System::Threading; using namespace System::Threading::Tasks; using namespace CefSharp::ModelBinding; @@ -30,7 +32,9 @@ namespace CefSharp public ref class ManagedCefBrowserAdapter : public IBrowserAdapter { MCefRefPtr _clientAdapter; +#ifndef NETCOREAPP BrowserProcessServiceHost^ _browserProcessServiceHost; +#endif IWebBrowserInternal^ _webBrowserInternal; JavascriptObjectRepository^ _javaScriptObjectRepository; JavascriptCallbackFactory^ _javascriptCallbackFactory; @@ -40,8 +44,10 @@ namespace CefSharp private: void MethodInvocationComplete(Object^ sender, MethodInvocationCompleteArgs^ e); +#ifndef NETCOREAPP void InitializeBrowserProcessServiceHost(IBrowser^ browser); void DisposeBrowserProcessServiceHost(); +#endif internal: MCefRefPtr GetClientAdapter(); @@ -104,10 +110,12 @@ namespace CefSharp _browserWrapper = nullptr; } +#ifndef NETCOREAPP if (CefSharpSettings::WcfEnabled) { DisposeBrowserProcessServiceHost(); } +#endif _webBrowserInternal = nullptr; delete _javaScriptObjectRepository; diff --git a/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj new file mode 100644 index 0000000000..4f716e7eef --- /dev/null +++ b/CefSharp.OffScreen/CefSharp.OffScreen.netcore.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.1 + CefSharp.OffScreen + CefSharp.OffScreen + true + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + x86;x64 + + + + + + + \ No newline at end of file diff --git a/CefSharp.OffScreen/ChromiumWebBrowser.cs b/CefSharp.OffScreen/ChromiumWebBrowser.cs index 9c04b4de43..e42c8fee31 100644 --- a/CefSharp.OffScreen/ChromiumWebBrowser.cs +++ b/CefSharp.OffScreen/ChromiumWebBrowser.cs @@ -12,6 +12,7 @@ using CefSharp.Structs; using CefSharp.Web; using Point = System.Drawing.Point; +using Range = CefSharp.Structs.Range; using Size = System.Drawing.Size; namespace CefSharp.OffScreen diff --git a/CefSharp.OffScreen/DefaultRenderHandler.cs b/CefSharp.OffScreen/DefaultRenderHandler.cs index da27887f9c..e595904c69 100644 --- a/CefSharp.OffScreen/DefaultRenderHandler.cs +++ b/CefSharp.OffScreen/DefaultRenderHandler.cs @@ -6,6 +6,7 @@ using CefSharp.Enums; using CefSharp.Structs; using Point = System.Drawing.Point; +using Range = CefSharp.Structs.Range; using Size = System.Drawing.Size; namespace CefSharp.OffScreen diff --git a/CefSharp.OffScreen/IRenderHandler.cs b/CefSharp.OffScreen/IRenderHandler.cs index da1dfad982..a0fb327559 100644 --- a/CefSharp.OffScreen/IRenderHandler.cs +++ b/CefSharp.OffScreen/IRenderHandler.cs @@ -5,6 +5,7 @@ using System; using CefSharp.Enums; using CefSharp.Structs; +using Range = CefSharp.Structs.Range; namespace CefSharp.OffScreen { diff --git a/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj new file mode 100644 index 0000000000..f0bc9f1487 --- /dev/null +++ b/CefSharp.WinForms/CefSharp.WinForms.netcore.csproj @@ -0,0 +1,27 @@ + + + + netcoreapp3.1 + CefSharp.WinForms + CefSharp.WinForms + true + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + x86;x64 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj new file mode 100644 index 0000000000..738e6b81da --- /dev/null +++ b/CefSharp.Wpf/CefSharp.Wpf.netcore.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.1 + CefSharp.Wpf + CefSharp.Wpf + true + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + x86;x64 + + + + + + + \ No newline at end of file diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index 3d3ce28f80..da98206780 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -21,6 +21,7 @@ using Microsoft.Win32.SafeHandles; using CursorType = CefSharp.Enums.CursorType; using Point = System.Windows.Point; +using Range = CefSharp.Structs.Range; using Rect = CefSharp.Structs.Rect; using Size = System.Windows.Size; diff --git a/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs b/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs index eb4fa1e5a0..7aea55bfed 100644 --- a/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs +++ b/CefSharp.Wpf/Experimental/WpfIMEKeyboardHandler.cs @@ -11,6 +11,7 @@ using CefSharp.Structs; using CefSharp.Wpf.Internals; using Point = System.Windows.Point; +using Range = CefSharp.Structs.Range; using Rect = CefSharp.Structs.Rect; namespace CefSharp.Wpf.Experimental diff --git a/CefSharp.Wpf/Internals/IMEHandler.cs b/CefSharp.Wpf/Internals/IMEHandler.cs index d84cabbeb2..6005d9c072 100644 --- a/CefSharp.Wpf/Internals/IMEHandler.cs +++ b/CefSharp.Wpf/Internals/IMEHandler.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Text; using CefSharp.Structs; +using Range = CefSharp.Structs.Range; namespace CefSharp.Wpf.Internals { diff --git a/CefSharp/CefSharp.netcore.csproj b/CefSharp/CefSharp.netcore.csproj new file mode 100644 index 0000000000..48fb1e1593 --- /dev/null +++ b/CefSharp/CefSharp.netcore.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp3.1 + CefSharp + CefSharp + false + true + ..\CefSharp.snk + MinimumRecommendedRules.ruleset + x86;x64 + + diff --git a/CefSharp/CefSharpSettings.cs b/CefSharp/CefSharpSettings.cs index 4d4eda2922..33a2d0b7ce 100644 --- a/CefSharp/CefSharpSettings.cs +++ b/CefSharp/CefSharpSettings.cs @@ -18,7 +18,9 @@ static CefSharpSettings() { ShutdownOnExit = true; LegacyJavascriptBindingEnabled = false; +#if !NETCOREAPP WcfTimeout = TimeSpan.FromSeconds(2); +#endif SubprocessExitIfParentProcessClosed = true; } @@ -31,6 +33,7 @@ static CefSharpSettings() /// public static bool LegacyJavascriptBindingEnabled { get; set; } +#if !NETCOREAPP /// /// WCF is used by RegisterJsObject feature for Javascript Binding /// It's reccomended that anyone developing a new application use @@ -45,6 +48,7 @@ static CefSharpSettings() /// will result on Abort() being called on the WCF Channel Host /// public static TimeSpan WcfTimeout { get; set; } +#endif /// /// For the WinForms and WPF instances of ChromiumWebBrowser the relevant Application Exit event diff --git a/CefSharp/IBrowserHost.cs b/CefSharp/IBrowserHost.cs index fc0064445a..5df5dc21b9 100644 --- a/CefSharp/IBrowserHost.cs +++ b/CefSharp/IBrowserHost.cs @@ -8,6 +8,7 @@ using CefSharp.Callback; using CefSharp.Enums; using CefSharp.Structs; +using Range = CefSharp.Structs.Range; using Size = CefSharp.Structs.Size; namespace CefSharp diff --git a/CefSharp/Internals/BrowserProcessService.cs b/CefSharp/Internals/BrowserProcessService.cs index 16557c9b50..6b342949c0 100644 --- a/CefSharp/Internals/BrowserProcessService.cs +++ b/CefSharp/Internals/BrowserProcessService.cs @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#if !NETCOREAPP using System.ServiceModel; namespace CefSharp.Internals @@ -48,3 +49,4 @@ public BrowserProcessResponse SetProperty(long objectId, string name, object val } } } +#endif diff --git a/CefSharp/Internals/BrowserProcessServiceHost.cs b/CefSharp/Internals/BrowserProcessServiceHost.cs index 051f675440..38b7e35c5a 100644 --- a/CefSharp/Internals/BrowserProcessServiceHost.cs +++ b/CefSharp/Internals/BrowserProcessServiceHost.cs @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#if !NETCOREAPP using System; using System.Net.Security; using System.ServiceModel; @@ -66,4 +67,5 @@ public static CustomBinding CreateBinding() return customBinding; } } -} \ No newline at end of file +} +#endif diff --git a/CefSharp/Internals/IBrowserProcess.cs b/CefSharp/Internals/IBrowserProcess.cs index 9f7c318cb1..fed3a30bc8 100644 --- a/CefSharp/Internals/IBrowserProcess.cs +++ b/CefSharp/Internals/IBrowserProcess.cs @@ -3,10 +3,13 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System.Collections.Generic; +#if !NETCOREAPP using System.ServiceModel; +#endif namespace CefSharp.Internals { +#if !NETCOREAPP [ServiceContract(SessionMode = SessionMode.Required)] [ServiceKnownType(typeof(object[]))] [ServiceKnownType(typeof(Dictionary))] @@ -14,15 +17,22 @@ namespace CefSharp.Internals [ServiceKnownType(typeof(JavascriptMethod))] [ServiceKnownType(typeof(JavascriptProperty))] [ServiceKnownType(typeof(JavascriptCallback))] +#endif public interface IBrowserProcess { +#if !NETCOREAPP [OperationContract] +#endif BrowserProcessResponse CallMethod(long objectId, string name, object[] parameters); +#if !NETCOREAPP [OperationContract] +#endif BrowserProcessResponse GetProperty(long objectId, string name); +#if !NETCOREAPP [OperationContract] +#endif BrowserProcessResponse SetProperty(long objectId, string name, object value); } -} \ No newline at end of file +} diff --git a/CefSharp/Internals/IRenderWebBrowser.cs b/CefSharp/Internals/IRenderWebBrowser.cs index d604ebe1fa..93e0309224 100644 --- a/CefSharp/Internals/IRenderWebBrowser.cs +++ b/CefSharp/Internals/IRenderWebBrowser.cs @@ -5,6 +5,7 @@ using System; using CefSharp.Enums; using CefSharp.Structs; +using Range = CefSharp.Structs.Range; namespace CefSharp.Internals { diff --git a/CefSharp/Internals/JavascriptCallbackEndpointBehavior.cs b/CefSharp/Internals/JavascriptCallbackEndpointBehavior.cs index 80dec1bc45..1c50a56efe 100644 --- a/CefSharp/Internals/JavascriptCallbackEndpointBehavior.cs +++ b/CefSharp/Internals/JavascriptCallbackEndpointBehavior.cs @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#if !NETCOREAPP using System.Collections.Generic; using System.Linq; using System.ServiceModel.Channels; @@ -46,3 +47,4 @@ public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRu } } } +#endif diff --git a/CefSharp/Internals/JavascriptCallbackSurrogate.cs b/CefSharp/Internals/JavascriptCallbackSurrogate.cs index 84ed3f15dc..7a7c8a6432 100644 --- a/CefSharp/Internals/JavascriptCallbackSurrogate.cs +++ b/CefSharp/Internals/JavascriptCallbackSurrogate.cs @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#if !NETCOREAPP using System; using System.CodeDom; using System.Collections.ObjectModel; @@ -70,3 +71,4 @@ public CodeTypeDeclaration ProcessImportedType(CodeTypeDeclaration typeDeclarati } } } +#endif diff --git a/CefSharp/Internals/JavascriptObjectRepository.cs b/CefSharp/Internals/JavascriptObjectRepository.cs index 4c3f8d75f0..b38fc115f9 100644 --- a/CefSharp/Internals/JavascriptObjectRepository.cs +++ b/CefSharp/Internals/JavascriptObjectRepository.cs @@ -165,6 +165,7 @@ public void Register(string name, object value, bool isAsync, BindingOptions opt throw new ArgumentNullException("value"); } +#if !NETCOREAPP //Enable WCF if not already enabled - can only be done before the browser has been initliazed //if done after the subprocess won't be WCF enabled it we'll have to throw an exception if (!IsBrowserInitialized && !isAsync) @@ -177,6 +178,13 @@ public void Register(string name, object value, bool isAsync, BindingOptions opt throw new InvalidOperationException(@"To enable synchronous JS bindings set WcfEnabled true in CefSharpSettings before you create your ChromiumWebBrowser instances."); } +#else + // WCF is not available on .NET Core. + if (!isAsync) + { + throw new NotSupportedException("Synchronous JS bindings are not supported."); + } +#endif //Validation name is unique if (objects.Values.Count(x => string.Equals(x.Name, name, StringComparison.OrdinalIgnoreCase)) > 0) diff --git a/CefSharp/Internals/WCFExtensions.cs b/CefSharp/Internals/WCFExtensions.cs index 3281aaed98..addeccc330 100644 --- a/CefSharp/Internals/WCFExtensions.cs +++ b/CefSharp/Internals/WCFExtensions.cs @@ -2,6 +2,7 @@ // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. +#if !NETCOREAPP using System; using System.ServiceModel.Description; @@ -52,3 +53,4 @@ public static void ApplyServiceBehavior(this ServiceDescription description, } } } +#endif diff --git a/CefSharp3.netcore.sln b/CefSharp3.netcore.sln new file mode 100644 index 0000000000..9b09e491d2 --- /dev/null +++ b/CefSharp3.netcore.sln @@ -0,0 +1,107 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +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}" +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 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.WinForms.netcore", "CefSharp.WinForms\CefSharp.WinForms.netcore.csproj", "{B91EB129-F892-402C-AF08-F3E1D5B80B09}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.Wpf.netcore", "CefSharp.Wpf\CefSharp.Wpf.netcore.csproj", "{99A1985B-2C79-4DE5-A0AD-0513647B9737}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.OffScreen.netcore", "CefSharp.OffScreen\CefSharp.OffScreen.netcore.csproj", "{6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{47D0DC8C-D707-4D8A-A578-7737AA9CE79B}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + appveyor.yml = appveyor.yml + CefSharp.Native.props = CefSharp.Native.props + CefSharp.props = CefSharp.props + CONTRIBUTING.md = CONTRIBUTING.md + ISSUE_TEMPLATE.md = ISSUE_TEMPLATE.md + LICENSE = LICENSE + README.md = README.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{A23AA466-1903-44F2-946D-25AD0500D56B}" + ProjectSection(SolutionItems) = preProject + NuGet\CefSharp.Common.nuspec = NuGet\CefSharp.Common.nuspec + NuGet\CefSharp.Common.props = NuGet\CefSharp.Common.props + NuGet\CefSharp.Common.targets = NuGet\CefSharp.Common.targets + NuGet\CefSharp.OffScreen.nuspec = NuGet\CefSharp.OffScreen.nuspec + NuGet\CefSharp.OffScreen.props = NuGet\CefSharp.OffScreen.props + NuGet\CefSharp.WinForms.nuspec = NuGet\CefSharp.WinForms.nuspec + NuGet\CefSharp.WinForms.props = NuGet\CefSharp.WinForms.props + NuGet\CefSharp.Wpf.nuspec = NuGet\CefSharp.Wpf.nuspec + NuGet\CefSharp.Wpf.props = NuGet\CefSharp.Wpf.props + NuGet\Readme.txt = NuGet\Readme.txt + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Debug|x64.ActiveCfg = Debug|x64 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Debug|x64.Build.0 = Debug|x64 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Debug|x86.ActiveCfg = Debug|x86 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Debug|x86.Build.0 = Debug|x86 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Release|x64.ActiveCfg = Release|x64 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Release|x64.Build.0 = Release|x64 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Release|x86.ActiveCfg = Release|x86 + {39E385AD-DC5C-451E-B061-09AF3EE038EB}.Release|x86.Build.0 = Release|x86 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x64.ActiveCfg = Debug|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x64.Build.0 = Debug|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x86.ActiveCfg = Debug|Win32 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Debug|x86.Build.0 = Debug|Win32 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.ActiveCfg = Release|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x64.Build.0 = Release|x64 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x86.ActiveCfg = Release|Win32 + {7B495581-2271-4F41-9476-ACB86E8C864F}.Release|x86.Build.0 = Release|Win32 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x64.ActiveCfg = Debug|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x64.Build.0 = Debug|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x86.ActiveCfg = Debug|Win32 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Debug|x86.Build.0 = Debug|Win32 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.ActiveCfg = Release|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x64.Build.0 = Release|x64 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x86.ActiveCfg = Release|Win32 + {6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}.Release|x86.Build.0 = Release|Win32 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Debug|x64.ActiveCfg = Debug|x64 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Debug|x64.Build.0 = Debug|x64 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Debug|x86.ActiveCfg = Debug|x86 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Debug|x86.Build.0 = Debug|x86 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Release|x64.ActiveCfg = Release|x64 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Release|x64.Build.0 = Release|x64 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Release|x86.ActiveCfg = Release|x86 + {B91EB129-F892-402C-AF08-F3E1D5B80B09}.Release|x86.Build.0 = Release|x86 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Debug|x64.ActiveCfg = Debug|x64 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Debug|x64.Build.0 = Debug|x64 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Debug|x86.ActiveCfg = Debug|x86 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Debug|x86.Build.0 = Debug|x86 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Release|x64.ActiveCfg = Release|x64 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Release|x64.Build.0 = Release|x64 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Release|x86.ActiveCfg = Release|x86 + {99A1985B-2C79-4DE5-A0AD-0513647B9737}.Release|x86.Build.0 = Release|x86 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Debug|x64.ActiveCfg = Debug|x64 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Debug|x64.Build.0 = Debug|x64 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Debug|x86.ActiveCfg = Debug|x86 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Debug|x86.Build.0 = Debug|x86 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Release|x64.ActiveCfg = Release|x64 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Release|x64.Build.0 = Release|x64 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Release|x86.ActiveCfg = Release|x86 + {6680485E-7A5A-4661-86EB-F7B7B6AE4ADE}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {97E41A52-091D-4375-A0F7-696C2F3F3684} + EndGlobalSection +EndGlobal