* Upgrade minimum .Net version to 4.6.2
#4433
* Use TaskCreationOptions.RunContinuationsAsynchronously
- Now that min version is .Net 4.6.2 we can use RunContinuationsAsynchronously
- Remove some unused code
- Moves the Dependency of System.Text.Json from CefSharp.dll
BrowserSubProcess as a result no longer has a reference
where wasn't required for it's operation.
Resolves#4428#4427
- New event that is raised when an exception occurs during converting a response to JSON
- Test cleanup
- New unit test to validate IEventProxy has been removed from ConcurrentDictionary
Resolves#3787
* DevTools Client - Simplify Strongly Typed Event handling
Now it's only possible to register one System.Type per event.
- Remove RegisterEventHandler
- Add AddEventHandler and RemoveEventHandler
- Change constraint from DevToolsDomainEventArgsBase to EventArgs
https://github.com/cefsharp/CefSharp/issues/3666
* Changes were based on https://github.com/CefNet/CefNet.DevTools.Protocol
Add links to original source files
* Reset stream position
* AddEventHandler - Use GetOrAdd for Thread safety
* AddEventHandler - Fix double event handler registration for first call
* RemoveEventHandler - Remove IEventProxy when handler null
This was added as a workaround for Issue #3715 which is specific to WinForms
and will hopefully be fixed upstream.
I've added the logic to all three implementations as I think the behaviour should be
consistent across all implementations.
* Make ExecuteDevToolsMethodAsync generic
* Make RegisterEventHandler generic
* PR feedback and added test for registering multiple event handlers
* Updated generated code to latest version
* Fix possible NRE when removing event listener before adding one
Includes various other DevTools fixes:
- JavaScript "number"s are represented as doubles instead of longs
- Headers are now correctly serialized / deserialized
- DevToolsDomainErrorResponse is now correctly deserialized
Simplify using CefSharp when targeting AnyCPU, it's now possible to include this as library code
now that CefSharp.dll targets AnyCPU.
There is no .Net Core/.Net 5.0 implementation of this class as the CefSharp.Core.Runtime.dll
is already loaded dynamically based on architecture.
- Call CefRuntime.LoadCefSharpCoreRuntimeAnyCpu to immediately load the CefSharp.Core.Runtime.dll
and all dependant resources will be loaded based on this instance
- Call LoadCefSharpCoreRuntimeAnyCpu.SubscribeAnyCpuAssemblyResolver to use load assembly
when required.
Core - Add LoadUrlAsync
- Add IWebBrowser.LoadUrlAsync
- Add LoadUrlAsyncResponse
- Update unit tests to use new method
- Add static method to allow for CefSharp.Wpf.HwndHost to share the same code.
Core - Add IAsyncMethodInterceptor
- Add IAsyncMethodInterceptor
Extension of IMethodInterceptor to allow for easier evaluation of async taskScheduler
- Add Additional unit tests
- Add JavascriptBindingSettings.AlwaysInterceptAsynchronously for cases where you'd like all method calls to use
IAsyncMethodInterceptor.InterceptAsync
Follow up to PR #3291
Co-authored-by: Andrew Sampson <andrew@rainway.com>
Co-authored-by: Emily Hudson <emily33901@gmail.com>
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll
Partial rename, only Net Core, folder not renamed
* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore
Remove GenApi
* Core - Rename CefDragDataWrapper to DragData
Move into CefSharp.Core namespace
* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package
* Net Core - Refactor to have CefSharp.Core.dll contain only public Api
* Net Core - Remove CefSharp.Core.RefAssembly
* Net Core - Change CefSharp.Core.netcore output folder
* Net Core - Restructure nuget packages
* Net Core - Add Cefsharp.Core.Runtime.RefAssembly
* Net Core - Hide CLI/C++ classes from intellisense
Make sure users don't attempt to load them directly
* Rename CefSharp.Core to CefSharp.Core.Runtime
* 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
* Rename CefSharp.Core.netcore to CefSharp.Core
* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU
As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll
* Convert RequestContextBuilder from C++ to C#
Now part of the CefSharp.Core PublicApi
* Update version number to 87.1.11
* Migrate more of the public Api to C#
* Net Core - Basic restructure complete
* Net Core - ModuleInitializer (Doesn't work yet)
* Remove direct references to BrowserSettings
* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl
* Net Core - Load libcef.dll via CLR Module initializer
If no RID is specified then we can load libcef.dll using the module initializer
* Add version to CefSharp.Core
* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets
* AnyCPU app.config transform
Improve AnyCPU support
* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU
* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore
* Fix Typos
Based on #3306
* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file
* Net Full - Generate CefSharp.Core.Runtime Ref Assembly
For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project
* Net Core - Old packages copy files to required folders
* Test - Install newer .Net Compiler and set Lang Version to 7.3
* Net Core - Exclude Net 452 Runtime generated reference source
* Core - Add Refactoring TODO
* Ref Assembly - Generate source as part of build
- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build
Runs locally, see if Appveyor has a problem with the powershell script execution
* Core - Add more factory methods to create instances of managed wrappers
* Net Core - Make Initialzier properties internal
Not quite sure what the public API should look like as yet, so making internal for now.
- Switch to a single generated file, this reduces file size a little which is important for embedding the source in the dll file (Issue #3197)
- Rename domain generated classes to prefix with Client as there was a naming conflict with the latest update.
- Prefix enum property with this qualifier
When building CefSharp3.sln under VS2019 the Microsoft.Net.Compilers (version 2.4) is passed version 7.3 for c# version
Version 2.4 supports a maximum of version 7.1, the issue doesn't happen on VS2015 or VS2017
Hard code LangVersion in csproj files
CS1617 Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default, Latest or a valid version in range 1 to 7.1.
https://stackoverflow.com/questions/46419760/using-c-sharp-7-1-with-msbuild
Only for Release builds.
This appears to work as expected under VS2017, not sure about VS2015
Roslny .Net compiler upgraded to 2.4 allows for Ref Assembly generation
Core - Simplify Setting of Proxy for new RequestContext
- Throw exception if requestContext.CanSetPreference returns false.
Proxy likely set via command line args.
- Add IRequestContext.SetPreferenceAsync
- Test - Add SelfHosted Proxy
Use Titanium.Web.Proxy to self host a proxy for testing proxy settings
Only run Proxy Tests when run locally
- Add RequestContext Builder Fluent API
* Core - Add DevToolsClient
Issue #3165
* DevTools Client - Add Network domain class
- Add hand written class to get a better sense of how the code should be structured.
- Improve exception handling
* Devtools - First draft of devtools protocol methods (generated)
Not complete yet
* Devtools - Simple method execution working
* DevTools - Add .Net Style cased property names to response objects
- Use internal field and datacontract attributes
* DevTools - Improve mapping
* DevTools - Strongly typed enums
* DevTools Client - Generated from active browser instance (M84)
* Devtools Client - Extract IDevToolsClient interface for testability
Improve xml doc comments
* DevTools Client - Improve error handling
* DevTools Client - Improve enum conversion
* Revert to older c# syntax
* DevTools Client - Fix failing tests
* Devtools Client - Add SetCookie Tests
* DevTools Client - Add Capture SyncContext by default
- Add option to capture the SyncContext
- Add option to provide custom SyncContext (can just pass in UI SyncContext and all continuations will happen there).
- Fix bug in ExecuteDevToolsMethodAsync sending the command twice when exeucted on the CEF UI thread
* Devtools Client - Add missing file reference
The problem with developing with the .Net Core project where files are automatically included is you
forget to include them in the regular csproj file.
* Devtools Client - Add CanCanEmulate Test case
* DevTools Client - Add AddScriptToEvaluateOnNewDocumentAsync test
* DevTools Client - OnDevToolsEvent only parse data if event handler != null
* DevTools Client - GetDevToolsClient remove ThrowExceptionIfDisposed/ThrowExceptionIfBrowserNotInitialized calls
Those methods were removed as the GetBrowser call handles the checks for us.
* DevTools Client - Improve error handling
* DevTools Client - Update xml doc comments
* DevTools Client - Add validation method (partial)
Add ability to manually add validation logic
* DevTools Client - Comment out failing test
Was working when targeting M84, now with M85 it fails.
The mapping appears to be correct, will need to investigate further
* OffScreen Example - Remove test code
- Add ChromiumWebBrowser.Partial.cs and include in all three projects
- Remove InternalsVisibleTo from Cefsharp.dll start moving code into the partial class
(We don't want to publish our internals as part of our Ref Assembly so this goings together)
#3082#3197
In preparation for generating Ref assemblies which will expose some of our internal classes at least initially.
Move into our own namespace to avoid any conflict
* Core - Move NameConverter to IJavascriptObjectRepository
- Move NameConverter property from BindingOptions to IJavascriptObjectRepository
- Remove BindingOptions.CamelCaseJavascriptNames
**Breaking Change**
Follow up to https://github.com/cefsharp/CefSharp/commit/898ca38e7a7261b3a42c33b2abf5eac6c022ddde
* Core - Javascript Binding Pluggable Naming Improvements
- Added some basic unit tests (more required)
- DefaultBinder now accepts a IJavascriptNameConverter passed into the constructor
to allow for conversion of names
* Core - Replace WeakReference with WeakReference<T>
- Make Wpf/WinForms/OffScreen projects target AnyCPU
Only the VC++ projects are platform specific now.
- Remove BrowserSubProcess project reference
Not needed as we now have a standalone exe
- Add OffScreen example
- Add WPF Example project
- Fix some compile errors for main solution
- Add BrowserSubProcess executable
- JavascriptObjectRepository remove isAsync param
Rather than throw exception remove the option
- BrowserSubprocess Exclude the WCF specific code from the netCore project
- Add some ifdef/ifndef to exclude the WCF specific implementation
- Move WCF implementation into separate namespace
- Allows for the user to provide their own IJavascriptNameConverter implementation
- Defaults to using the CamelCaseJavascriptNameConverter (which is exactly the same very basic
naming conversion used by default currently).
- If CamelCaseJavascriptNames is false then no conversion is used
Naming is now separate from the JavascriptObjectRepository and can be tested in isolation.
Previously it was global set using CefSharpSettings.LegacyJavascriptBindingEnabled
Now it's configured through IJavascriptObjectRepository.Settings.LegacyBindingEnabled
which defaults to CefSharpSettings.LegacyJavascriptBindingEnabled (until it's removed).
IJavascriptObjectRepository.ResolveObject is raised with LegacyObjects as the name
to allow for easier binding of objects.
Issue #2977
- return application/octet-stream when no mapping found
- Add custom dictionary with some additional mimeTypes, users can add their own to this dictionary
- Add xunit test
Resolves#3041
- Add Cef.PreShutdown
- For WPF hook the DispatcherShutdownStarted and DispatcherShutdownFinished events then call Cef.PreShutdown
- Add NoOpBrowserRefCounter and set as default, needs a little more testing before it's enabled by default.
Can be enabled by calling Cef.EnableWaitForBrowsersToClose before calling Cef.Initialize
Issue #3047
- Add BrowserRefCounter to increment/decrement CefBrowser instance creation
- Add Cef.WaitForBrowsersToClose to dispose of all browser instances and call WaitForBrowsersToClose
Before calling CefShutdown it's important that CEF has finished closing/disposing of all the CefBrowser instances.
If you call CefShutdown before this has finished then you can get the error
"Check failed: !IsCefShutdown(). Object reference incorrectly held at CefShutdown".
This is more a problem when using MultiThreadedMessageLoop where CEF close/dispose happens on a different thread.
Calling ChromiumWebBrowser.Dispose will start to free the resources, CEF internally executes code on it's own thread.
#3047