Commit Graph

2231 Commits

Author SHA1 Message Date
Alex Maitland 25e8d9fb21 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:22:32 +10:00
Alex Maitland f91001135a Core - Add IRequestContext.SetProxyAsync
Can be called on any Thread to change the proxy at runtime
2021-04-17 12:13:07 +10:00
Alex Maitland 6ea5ac49c8 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-13 15:10:38 +10:00
campersau 7888b147ea DevTools Client - Serialize lists of DevToolsDomainEntityBase (#3487) 2021-04-09 05:38:15 +10:00
Dominik Palo c6fc04246d Update the CefSharpSettings.WcfEnabled summary (#3483) 2021-04-09 05:23:47 +10:00
Alex Maitland fdea682b3f Core - Add IRequestContext.IsDisposed 2021-04-06 16:39:09 +10:00
Alex Maitland b994264160 Core - JavascriptObjectRepository improve xml doc 2021-04-06 13:13:03 +10:00
Alex Maitland e9a367febf Core - Add RequestContextExtensions.RegisterOwinSchemeHandlerFactory 2021-04-05 14:38:09 +10:00
pedoc 893d03221f 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:29:42 +10:00
Alex Maitland 047f8b838c WPF/WinForms/OffScreen - Reduce code duplication
Issue #3082
2021-04-01 16:28:20 +10:00
Alex Maitland bbb5afaeb3 Net Core - DependencyChecker fix AnyCPU validation for CefSharp.Core.Runtime.dll
Resolves #3388
2021-03-27 15:16:13 +10:00
Alex Maitland 223af40803 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-03-27 13:05:06 +10:00
Alex Maitland 52374b74a7 Core - Remove IContextMenuParams.IsPepperMenu
This is a breaking change

Resolves #3460
2021-03-27 11:17:23 +10:00
Alex Maitland a543442a26 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-03-26 15:56:35 +10:00
Alex Maitland 36092b548c 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:13:38 +10:00
Alex Maitland 24056cd94d 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:49:15 +10:00
Alex Maitland 83dde5ec77 Core - Fix xml doc 2021-03-14 19:31:51 +10:00
Alex Maitland 5905802fbb DevTools Client - Upgrade to 89.0.4389.72 2021-03-12 13:58:37 +10:00
Alex Maitland 38dc00d712 Xml Doc - Fix cref 2021-03-12 13:28:16 +10:00
Alex Maitland 73e2192c95 Upgrade version numbers to 89.0.60 2021-03-12 13:20:12 +10:00
Alex Maitland 5780aefda3 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-12 13:15:31 +10:00
Alex Maitland 6601a66b75 Javascript Binding - ClientAdapter.MethodInvocationComplete NRE
Resolves #3443
2021-03-12 11:59:04 +10:00
Alex Maitland c8968d46b7 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:22:25 +10:00
Alex Maitland 30860d66d6 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:16:49 +10:00
Alex Maitland a5d5afef84 Core - Fix xml doc 2021-02-25 20:24:26 +10:00
Alex Maitland 6d9f214196 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-15 13:43:51 +10:00
Alex Maitland 102dfc5d6b DevTools Client - Add custom mapping for DisabledImageType[]
Newly added type to the protocol
2021-02-08 10:00:22 +10:00
Alex Maitland d0988ce126 DevTools Client - Update generated code to Chromium 88.0.4324.146 2021-02-05 18:09:07 +10:00
Alex Maitland 9f73a68457 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 14:08:08 +10:00
Alex Maitland 1397398770 Upgrade to CEF 88.2.1+g0b18d0b+chromium-88.0.4324.146 / Chromium 88.0.4324.146 2021-02-05 13:39:50 +10:00
Alex Maitland 3dd4d17dc0 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:03 +10:00
Alex Maitland 5d50ec8843 DevTools Client - Fix multiline xml doc params 2021-01-13 19:34:33 +10:00
Alex Maitland 12e583d2ef 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:56:57 +10:00
Alex Maitland 580042e58d Update version number to 88.1.0 2021-01-11 10:58:53 +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
GitHubPang 728420ca7f Fix typos (#3305) 2020-12-06 11:24:14 +10:00
Alex Maitland f1daac7131 Core - Add IResponse.SetHeaderByName/GetHeaderByName 2020-11-26 16:43:16 +10:00
amaitland 55af252d91 Core - Refactor JavascriptObjectRepository to IJavascriptObjectRepositoryInternal
Basic refactoring in preparation for allowing users(advanced) to provide their own custom JavascriptObjectRepository implementation
2020-11-25 15:23:29 +10:00
Alex Maitland 83ae9399dd Core - MethodRunnerQueue use TaskCreationOptions.HideScheduler to
To prevent subtasks from attempting to use our LimitedConcurrencyLevelTaskScheduler we need to
specify TaskCreationOptions.HideScheduler when creating the Task

Resolves #3293
2020-11-25 15:16:57 +10:00
Alex Maitland 24f3ee310d DevTools Client - Upgrade to M87 2020-11-17 19:09:35 +10:00