2036 Commits

Author SHA1 Message Date
Alex Maitland f81f2e1119 Core - Add Default Handler implementations
Inherit and override only the required methods rather than implement the whole interface
2021-05-11 20:25:21 +10:00
Alex Maitland 77c112a4ad DevTools Client - Upgrade to 90.6.5+g7a604aa+chromium-90.0.4430.93 / Chromium 90.0.4430.93 2021-05-11 11:57:35 +10:00
Alex Maitland 6efde818f6 Core - WebBrowserExtensions.LoadUrlWithPostData remove Obsolete attribute
No further reports of issues

#2705
2021-05-01 16:59:42 +10:00
Alex Maitland 691b099432 Core - ResourceHandler.GetMimeType remove Obsolete
There are cases where it's preferable to use the CefSharp specific version as
the Chromium implementation queries the registry. There are cases where
the CefSharp implementation differs from the Chromium implementation.

Remove Obsolete attribute, no current plans to remove the method.
2021-05-01 16:59:41 +10:00
Alex Maitland 58369fad33 Core - Remove IContextMenuParams.IsPepperMenu
This is a breaking change

Resolves #3460
2021-04-23 17:14:53 +10:00
Alex Maitland 249c75a575 Core - Remove IBrowserSettings.WebSecurity
Web Security can be disabled via the "disable-web-security" command-line switch.

This is a breaking change.

Resolves #3312
2021-04-23 17:08:35 +10:00
Alex Maitland 38215a3230 Core - Remove ICookieManager.SetSupportedSchemes
- The method was removed upstream.
- New properties have been added to CefSettings and RequestContextSettings

**Breaking Change**

Resolves https://github.com/cefsharp/CefSharp/issues/3497
2021-04-23 17:00:21 +10:00
Alex Maitland bd6351fa1c Core - Update DependencyChecker as CEF has changed pak files
cef.pak,
cef_100_percent.pak,
cef_200_percent.pak,
cef_extensions.pak,
devtools_resources.pak have been replaced by

chrome_100_percent.pak,
chrome_200_percent.pak,
resources.pak

https://github.com/cefsharp/CefSharp/issues/3509#issuecomment-821756091
2021-04-23 16:36:10 +10:00
Alex Maitland 22ef1bdc39 Core - Add IRequestContext.SetProxyAsync
Can be called on any Thread to change the proxy at runtime
2021-04-23 16:36:10 +10:00
campersau fb54f103c4 DevTools Client - Serialize lists of DevToolsDomainEntityBase (#3487) 2021-04-23 16:35:55 +10:00
Dominik Palo 4ebe691bb8 Update the CefSharpSettings.WcfEnabled summary (#3483) 2021-04-23 16:35:54 +10:00
Alex Maitland b75cec752c Core - Add IRequestContext.IsDisposed 2021-04-06 16:39:53 +10:00
Alex Maitland 5bf6107963 Core - Add RequestContextExtensions.RegisterOwinSchemeHandlerFactory 2021-04-05 14:37:39 +10:00
Alex Maitland a257cd5828 Core - Add OwinResourceHandler and OwinSchemeHandlerFactory
Very basic implementation ported from https://github.com/amaitland/CefSharp.Owin

- Currently no multi part post support
- No support for cancellation token
2021-04-05 14:31:35 +10:00
Alex Maitland 047bf9198b DevTools Client - Update to CHROMIUM 89.0.4389.114 2021-04-05 10:55:04 +10:00
pedoc 1ff25441ea Javascript Binding - Allow binding to classes in the global namespace (#3467)
* fix IsComplexType NullReferenceException

Sometimes, the registered Javascript object does not have a namespace, at this time this function will throw a ```NullReferenceException```.

* add unit test for IsComplexType

* Simplify and remove useless code

* Update CefSharp/Internals/JavascriptObjectRepository.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>

Co-authored-by: Alex Maitland <amaitland@users.noreply.github.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
2021-04-05 10:31:15 +10:00
Alex Maitland 18790d1ca9 Update build version numbers to 89.0.170 2021-04-05 10:30:48 +10:00
Alex Maitland 1692c1b9d1 Net Core - DependencyChecker fix AnyCPU validation for CefSharp.Core.Runtime.dll
Resolves #3388
2021-03-27 15:17:01 +10:00
Alex Maitland fb5a6a00d8 Core - DependencyChecker now supports AnyCPU
- Remove the .Net Core specific implementation, was easier to unify them than first though
- Split checking for dlls into different folders to support AnyCPU
2021-03-23 15:14:46 +10:00
Alex Maitland 1011f727ee Net Core - Add DependencyChecker.netcore
Specific .Net core DependencyChecker that takes care of the specifics of running under .Net Core/.Net 5.0
Later on the DependencyChecker can be unified.

Issue #3388
2021-03-23 10:37:01 +10:00
Alex Maitland 2a697ee694 Core - Fix xml doc 2021-03-16 15:29:21 +10:00
Alex Maitland 3df8a59ac4 DevTools Client - Upgrade to 89.0.4389.72 2021-03-16 15:29:20 +10:00
Alex Maitland bb56e899e4 Xml Doc - Fix cref 2021-03-16 15:28:32 +10:00
Alex Maitland 099abefbea Net Source - Add SourceLink support
- The Debug PDBs will now use SourceLink
- The C++/CLI projects will use SourceLink
- CefSharp.Core.dll now generates/uses a ref assembly
- The managed (c#) projects still embed sources/symbols for Release builds

At some point we should investigate generating a snupkg to reduce the dll size
2021-03-16 15:28:31 +10:00
Alex Maitland 1f72e1820a Javascript Binding - ClientAdapter.MethodInvocationComplete NRE
Resolves #3443
2021-03-12 11:59:51 +10:00
Alex Maitland f554571dd1 Core - Remove RefAssembly Generation from Net452 packages
- They're not generated under VS2015 (AppVeyor) so didn't end up using them
2021-03-11 15:23:00 +10:00
Alex Maitland c98568d7e3 Upgrade build version to 88.2.90 2021-03-05 09:30:20 +10:00
Alex Maitland 14291d105c DevTools Client - Upgrade to 88.0.4324.182
Only a version number bump, no changes
2021-02-26 13:51:46 +10:00
Alex Maitland 7b76d6ebdf DevTools Client - Add custom mapping for DisabledImageType[]
Newly added type to the protocol
2021-02-26 13:51:04 +10:00
Alex Maitland cd0a1a30d8 DevTools Client - Update generated code to Chromium 88.0.4324.146 2021-02-26 13:51:03 +10:00
Alex Maitland 2fa16ff29a WinForms/WPF/OffScreen - Improve Cef.Initialize failed error message.
Direct user to check log file as the underlying CefInitialize call doesn't return an error message.
Errors are only available through the logs.
2021-02-26 12:15:41 +10:00
Alex Maitland 4af75b87ac Core - Fix xml doc 2021-02-25 20:36:28 +10:00
Alex Maitland 1ea6c46163 Javascript Callback - Add very basic support for executing a Promise
It's a manual process at this stage and requires the end user to deal to:
- Return "CefSharpDefEvalScriptRes" immediately after the promise function has been created
- Call cefSharp.sendEvalScriptResponse when the async/await (promise) processing has completed
2021-02-25 20:36:24 +10:00
Alex Maitland 47cf10ada8 Core - DependencyChecker add CefSharp.Core.Runtime to list of required files
- Should have been added as part of #3319
- Remove CefSharp.Core.dll from BrowserSubprocessDependencies as it's not required for the BrowserSubprocess
2021-02-05 15:00:16 +10:00
Alex Maitland 1661b2f955 Upgrade to CEF 88.2.1+g0b18d0b+chromium-88.0.4324.146 / Chromium 88.0.4324.146 2021-02-05 15:00:16 +10:00
Alex Maitland 35c997f268 Core - Make LegacyJavascriptBindingEnabled obsolete
Will likely be removed in the future as it's been replaced.
Setting after creating your ChromiumWebBrowser instance also doesn't work

Issue https://github.com/cefsharp/CefSharp/issues/2977
2021-02-03 10:04:38 +10:00
Alex Maitland 995512d9f0 Upgrade build version to 87.1.132 2021-01-27 20:14:43 +10:00
Alex Maitland a55858cef4 DevTools Client - Fix multiline xml doc params 2021-01-13 19:32:43 +10:00
Alex Maitland 2b4a8cb18e Core - PublicApi remove references to CefSharp.Core.Runtime
- Add an UnWrap method to the interfaces (should be hidden from IntelliSense)
- For .Net 4.5.2 projects they're  not a decorator class which an inner instance of the CefSharp.Core.Runtime Type
- For Net Core we have a ref assembly which allows us to reference the CefSharp.Core.Runtime without issues
  We can potentially remove the ref assembly now and forgo any direct reference.
2021-01-13 16:51:30 +10:00
Alex Maitland 3a29c70d81 Upgrade build version to 87.1.13 2021-01-09 14:20:11 +10:00
Alex Maitland 151f806534 Core - Javascript Binding Cleanup
- Move TryCallMethodResult to Internals namespace
- Fix BindingTestsAsyncTask.html (mistake in javascript)
2021-01-09 13:29:32 +10:00
Alex Maitland ab8223d4b9 Core - Add IAsyncMethodInterceptor (#3296)
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>
2021-01-09 13:17:50 +10:00
Alex Maitland 848413bb2c DevTools Client - Make Message Id globally unique
When attempting to use two DevTools Client instances the message Id
fails validation as it's not incrementing per CefBrowser instance.

This should be made unique per CefBrowser

Issue #3341 has been created to document improving this.
2021-01-08 17:03:24 +10:00
Alex Maitland dcf5b43dc4 Core - Add Net Core DevTools
- Add specific Net Core DevTools generated code
- Improve xml doc generation for both Net 4.x and Net Core/Net 5
2021-01-08 14:26:21 +10:00
Alex Maitland 6e881eeafc Xml Doc - Fix some mistakes 2021-01-08 14:26:21 +10:00
GitHubPang 8afe0dfca6 Fix typos (#3329) 2020-12-31 14:47:11 +10:00
Alex Maitland a4e42843f8 Update version numbers to 87.1.12 2020-12-16 16:09:08 +10:00
Alex Maitland 1299f56c3f Core - Trigger JavascriptMessageReceived event on ThreadPool
Instead of calling on the CEF Thread we are current on in OnProcessMessageReceived
use Task.Run to execute the event on the ThreadPool.
Instances of users calling MessageBox.Show and also problems with with uncaught exceptions
on the CEF thread.
2020-12-16 15:37:17 +10:00
Alex Maitland 8a367fbdc4 Refactor CefSharp.Core into CefSharp.Core.Runtime (#3311)
* 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.
2020-12-16 10:47:34 +10:00
pgodwin b8a36411ce Add async to EvaluateScriptAsPromiseAsync and tests (#3314)
Co-authored-by: Peter Godwin <peter.godwin@health.qld.gov.au>
2020-12-11 13:01:27 +10:00