Commit Graph

1815 Commits

Author SHA1 Message Date
amaitland 5ec1dbfe78 ResourceHandler - Rename CharSet to CharSet 2019-06-25 19:24:57 +10:00
amaitland 74d6ae1c0e Update version number to 75.0.110 2019-06-25 19:24:57 +10:00
amaitland 7eff7d17c0 ResourceHandler - Add new methods and callbacks
Now uses IResourceHandler.Open to call IResourceHandler.ProcessRequestAsync
IResourceHandler.ProcessRequestAsync now returns CefReturnValue instead of bool as there are three states
2019-06-25 19:24:57 +10:00
amaitland 4bf29cf358 IJavascriptCallback - Add ExecuteWithTimeoutAsync 2019-06-25 19:24:57 +10:00
amaitland e2c7a3781c CefCookieAccessFilterAdapter - Add adapter and wire up CefResourceRequestHandlerAdapter
Cookie access can now be controlled using ICookieAccessFilter.CanSendCookie and ICookieAccessFilter.CanSaveCookie
- Remove ResourceHandlerWrapper::GetCookie as it's not used anymore
2019-06-25 19:24:57 +10:00
amaitland da98060300 IResponse - Add Charset property
Maps to CefResponse::GetCharset and CefResponse::SetCharset
2019-06-25 19:24:57 +10:00
amaitland 3f820e4513 IRequest - Add GetHeaderByName and SetHeaderByName 2019-06-25 19:24:57 +10:00
amaitland 1c73a64099 JavascriptObjectRepository - Only return Root objects (toplevel/parent objects)
GetObjects was returning all objects, even those that are sub objects
2019-06-25 19:24:57 +10:00
amaitland 3f53f55243 DefaultApp - Make OnRegisterCustomSchemes virtual
Can be overridden
2019-06-25 19:24:57 +10:00
amaitland 88b1d8678d CefCustomScheme - Update xml doc 2019-06-25 19:24:57 +10:00
amaitland c8a85d3fb5 Update version number to 75.0.30 2019-06-25 19:24:57 +10:00
amaitland 62ee664c81 SslVersion - Add TLS 1.3 2019-06-25 19:24:57 +10:00
amaitland 73a156fdc5 Initial version 75 upgrade and NetworkService changes
Compiles, that's about it at this point, there are major CEF breaking changes, and lots to be addressed.

Browser Process (main process)
- Removed IResourceHandlerFactory as it no longer fits with the structure that CEF provides
- New IResourceRequestHandler interface added, not plumbed in yet
- CefSettings - Add RootCachePath and ApplicationClientIdForFileScanning

BrowserSubprocess (render process)
- SendProcessMessage was moved from CefBrowser to CefFrame
- OnBrowserCreated added extraInfo param

The BrowserSubprocess changes for this upgrade should be complete
2019-06-25 19:24:57 +10:00
Alex Maitland fe98124c9b Async JavascriptBinding - Add support for returning Task (#2771)
* Async JavascriptBinding - Add support for returning Task

Remove Parallel Task execution code from MethodRunnerQueue
Add ParallelMethodRunnerQueue
  - For the new code path the Func is executed, if the Result is a generic Task we wait for it's completion
  - If the task is not generic then we return immediately

This is only enabled when CefSharpSettings.ConcurrentTaskExecution = true;
* MethodRunnerQueue - Display error message when method returns Task
* ParallelMethodRunnerQueue - Rename to ConcurrentMethodRunnerQueue
* MethodRunnerQueue - Improve formatting of error message when method returns Task
* Async JavascriptBinding Return Task - Add Basic xUnit Test

Very quick test, needs to be refined a little. The basics are working as expected.

* Add Binding Test Async Task Example to the WPF Example menu

* Async JSB Task - Add additional tests and improve error messaging
2019-06-08 17:21:49 +10:00
Alex Maitland 1a2c8ffcb6 Add CefSharp.PostMessage (#2799)
- JavascriptMessageReceived event added to ChromiumWebBrowser/IWebBrowser
- CefSharp.PostMessage and cefSharp.postMessage added to V8Context on creation for use in Javascript
- Add PostMessageTest.html
2019-06-03 21:08:03 +10:00
amaitland 049f576de3 UrlRequestFlags.AllowCachedCredentials rename to AllowStoredCredentials
Resolves #2755

This is a breaking change
2019-05-04 06:43:56 +10:00
amaitland e19357c386 UrlRequestFlags - Update with new values
https://bitbucket.org/chromiumembedded/cef/commits/cd5995a440302e0ef5a97a000faa922149ffb177?at=3683#Linclude/internal/cef_types.hT1281
2019-05-03 21:34:51 +10:00
Alex Maitland 76e5a8d5c0 Add IAudioHandler (#2727)
* Feature Request - Add IAudioHandler

- For performance reasons we return NULL if no audiohandler is assigned
- No example is provided currently

Initial implementation for #2714
2019-05-03 12:54:40 +10:00
Gilberto Stankiewicz db3839a285 Fix typos (#2750) 2019-04-26 12:19:34 +10:00
amaitland 95ad9cdd06 Remove IRequestContext.ResolveHostCached
Was removed from Chromium

Resolves #2747
2019-04-26 07:31:03 +10:00
amaitland 5b191c0fdf Upgrade version numbers to 74.1.130 2019-04-26 07:19:41 +10:00
amaitland ad7cbccbf8 WebBrowserExtensions.LoadUrlWithPostData - Set UrlRequestFlags.AllowCachedCredentials
Possible workaround for sending cookies

Issue #2705
2019-04-11 08:03:11 +10:00
Chris e22d1c2fd2 Removed IsBrowserInitializedChangedEventArgs (#2710) 2019-04-10 19:51:34 +10:00
amaitland b97f85cb2a Revert "Upgrade version numbers to 73.1.12.0"
This reverts commit bb9873d410.
2019-04-10 19:02:17 +10:00
amaitland 8ced344ccd IBrowserHost - Add SendTouchEvent
- Includes Pen support

https://bitbucket.org/chromiumembedded/cef/commits/52d535a6dc4b8ec55c3aa7d6b6820e24f12516e8
https://bitbucket.org/chromiumembedded/cef/commits/7b5d30e9a92bacdcb81c60de19f1712aaf53ff74

Resolves #2663
2019-04-05 11:52:41 +10:00
amaitland 4c069dc566 KeyType - Update xml doc
Ref https://magpcss.org/ceforum/apidocs3/projects/(default)/cef_key_event_type_t.html
2019-04-04 12:28:32 +10:00
Alex Maitland 7b29027eea CefSharpSettings - Change SubprocessExitIfParentProcessClosed xml doc to reflect enabled by default 2019-03-29 09:23:47 +11:00
amaitland a0d74dd63e IDisplayHandler - Add OnLoadingProgressChange
Resolves #2686
2019-03-27 22:05:17 +10:00
amaitland 45a79dc520 WPF/OffScreen - Add OnVirtualKeyboardRequested method
- Added to IRenderHandler in OffScreen
- Added to ChromiumWebBrowser in WPF (protected virtual, so inherit and override to implement)

Resolves #2689
2019-03-27 20:29:27 +10:00
amaitland bb9873d410 Upgrade version numbers to 73.1.12.0
Issue #2706
2019-03-27 15:23:24 +10:00
Alex Maitland c3bbd37cce Reorder dispose pattern in ChromiumWebBrowser (#2701)
* WinForms/Wpf/OffScreen - Reorder Dispose methods

- Set browser initialized to false
- Release event handlers
- Dispose managedCefBrowserAdapter
- Set handlers to null

* WinForms/WPF/OffScreen - Set Handlers to null immediately after event handlers cleared

The one exception is LifeSpanHandler which is released after managedCefBrowserAdapter.Dispose
2019-03-26 20:14:13 +10:00
amaitland ba008eed35 WebBrowserExtensions.LoadUrlWithPostData - Mark as Obsolete
Issue #2705
2019-03-26 18:18:40 +10:00
Chris 987f988dac Refactoring - Moved RegisterJsObject and RegisterAsyncJsObject to WebBrowserExtensions (#2703) 2019-03-23 13:31:09 +10:00
Alex Maitland 1a2d4a82f1 TypeConversion - Add null check to NavigationEntry^ FromNative
Also added extra comment to SslStatus
2019-03-23 13:13:34 +10:00
Chris 1097b7c7c7 Fixed spelling error in IJavascriptObjectRepository (#2702) 2019-03-22 20:12:24 +01:00
Chris 86b2d8cecd Improved dispose pattern in ChromiumWebBrowser (#2651)
* Code Cleanup - Improved ChromiumWebBrowser Dispose/Finalise

* Added thread safe dispose pattern
* Added IsDisposed

* Wpf - Cleanup and improvements to the dispose pattern

* WinForms - Cleanup and improvements to the dispose pattern

* OffScreen - Cleanup and improvements to the dispose pattern

* Added IsDisposed to IWebBrowser

* Fixed comments

* WinForms - Removed Finalizer and Dispose()

* WPF - ChromiumWebBrowser.Dispose add comment for Interlocked.CompareExchange

* WinForms - ChromiumWebBrowser.Dispose add comment for Interlocked.CompareExchange
2019-03-22 21:49:02 +10:00
amaitland 988c8ca263 IBrowserHost - Add SetAudioMuted and IsAudioMuted
Resolves #2665
2019-03-21 21:26:17 +10:00
amaitland 3423670740 WinForms/WPF/OffScreen - Dispose of BrowserSettings only if created by CefSharp framework
- Add OffScreen project to internals visible to list for CefSharp.Core
- Add BrowserSettings.FrameworkCreated property which can only be set through an internal constructor
- Dispose of BrowserSettings immediately after call to CreateBrowser if created by CefSharp framework
- managedCefBrowserAdapter::CreateBrowser  throw exception if browserSettings already disposed

Resolves #2643
2019-03-21 20:13:02 +10:00
amaitland fbe9c556e2 Core - Add LogSeverity.Fatal
Resolves #2639
2019-03-21 13:33:50 +10:00
Alex Maitland 70de3a6d9c Add Initial IRenderProcessHandler.OnContextCreated/Released implementation (#2697)
* WinForms/WPF - Dispose of IFrame after calling LoadUrl

* BrowserProcess - Add initial implementation of IRenderProcessHandler.OnContextCreated/OnContextReleased

- IV8Context.Execute is the only method to be implemented so far (execute script without returning a result)
- Wrappers for CefFrame and CefBrowser have yet to be imported yet, still need to determine if they should be included individually or reference to CefSharp.Core added

* BrowserProcess - Add wrappers for Browser and Frame

Ultimately we should probably remove the CefSharp.BrowserSubprocess.Core project and move all the code into a folder/namespace within CefSharp.Core
This would allow us to share the a lot of existing code, major refactor required

* CefSharp.Common.props - Add CefSharpBrowserProcessCore32/64 properties

Make creating your own custom browser process easier

* BrowserProcess - Remove example and add comments about creating your own custom version
2019-03-20 20:33:10 +10:00
amaitland 8ffd29fc56 Upgrade version numbers to 73.0.0 2019-03-15 22:13:07 +10:00
amaitland 679250ee58 Upgrade version number to 72.0.0 2019-02-25 21:54:25 +10:00
Chris a9b3c36f77 Build.ps1 - Automated more tasks relating to updating CefSharp version and copyright year (#2640)
* build.ps1 - Write version to CefSharp.shfbproj

* build.ps1 - Specify UTF-8 as encoding when reading

* build.ps1 - Save files as UTF-8 without BOM

* build.ps1 - Update copyright year on compiled files

* build.ps1 - Update version in appveyor.yml

* Removed copyright year from the nuspec files

* Updated editorconfig for ps1 files

* Apply changes from build.ps1

* LICENSE - Removed year
2019-02-15 21:40:25 +01:00
amaitland 6f6ca94ea9 WPF Example - Change to using DataUri (LoadHtml extension method) for showing errors instead of LoadString
- Add new IFrame.LoadHtml extension method.

Related `upstream` issue is https://bitbucket.org/chromiumembedded/cef/issues/2586/loadstring-results-in-terminating-renderer
2019-02-08 10:42:15 +10:00
amaitland 2c9155f1cb WinForms/WPF - Change browserSettings to use the private field to avoid throw exception in dispose
- Changed to expose only the public interface (this is better for scenarios where the designer attempts to query the property and subsequently attempts to load libcef and fails).
- Make IBrowserSettings implement IDisposable
- ManagedCefBrowserAdapter::CreateBrowser now throws exception if browserSettings param is null

The WPF version won't actually throw an exception, just standardised it's code so they're both the same.

Issue #2638
2019-02-08 10:14:32 +10:00
amaitland da06d3786e Add LegacyResourceHandlerFactory - for backwards compatibility with old behaviour. 2019-01-22 15:25:19 +10:00
amaitland 73d6a06284 RequestContext - Fix some xml doc mistakes 2019-01-17 05:36:35 +10:00
amaitland 2706f13b1a DependencyChecker - Switch to using Uri.TryCreate as is more fault tolerant 2019-01-15 12:14:29 +10:00
campersau b31069633e add spaces in exception messages (#2620) 2019-01-11 08:57:28 +10:00
amaitland 05b640532f Xml doc improvements/fixes 2019-01-09 20:27:06 +10:00