Commit Graph

2231 Commits

Author SHA1 Message Date
amaitland a02d510abc InternalWebBrowserExtensions.SetHandlersToNullExceptLifeSpan - Add missing handlers 2019-07-17 22:01:35 +10:00
amaitland 6c002f8cfe HtmlString - Add FromFile static helper method 2019-07-17 15:46:26 +10:00
amaitland f8972c6c45 WinForms - Add new constructor overload (HtmlString html, RequestContext context = null)
- New HtmlString class can be used to create a DataUri encoded string for use with the WinForms
ChromiumWebBrowser constructor
- Remove duplication in WebBrowserExtensions extensions, use new HtmlString class

Related issue is #2668
2019-07-11 12:44:57 +10:00
amaitland c50b495458 IResourceHandler - Update Obsolete attribute as methods will be removed next version 2019-07-09 07:33:50 +10:00
amaitland ec21d01182 WebBrowserExtensions - Reenable CanExecuteJavascriptInMainFrame checks 2019-07-08 20:14:51 +10:00
Matthew Thomas e6f854f8ca PdfPrintSettings - Update xml doc as margins are measured in points, not mm (#2822) 2019-07-08 08:51:39 +10:00
amaitland cabf363061 CefSharpSettings.LegacyJavascriptBindingEnabled - Change xml doc
Also change comment in CefExample
2019-07-03 20:31:21 +10:00
amaitland 088c3d02f4 ISchemeRegistrar - Change AddCustomScheme to use SchemeOptions enum
- Add new SchemeOptions enum
- Change AddCustomScheme to use new enum (replaces all the bool params)
- Simplify command line arg processing, now sends scheme name and int (options)
- Add CefCustomScheme.IsFetchEnabled

Resolves #2690

Breaking Change
2019-07-02 20:50:09 +10:00
amaitland f77c6d2cb4 IRequest - Add code example to Headers property
Also updated the xml doc, there's new GetHeaderByName and SetHeaderByName methods that should be used where possible.

Resolves #2671
2019-06-26 16:30:02 +10:00
amaitland e64b3afa5d DefaultRequestHandler - Revert changes and just mark Obsolete 2019-06-25 19:24:57 +10:00
amaitland b68d8d7a8f RequestHandler - Change interface implementation to be explicit
- Make members protected virtual (BREAKING CHANGE)
- Remove Default from name of DefaultResourceRequestHandlerFactory/DefaultResourceRequestHandlerFactoryItem
2019-06-25 19:24:57 +10:00
amaitland 8942b68336 ResourceRequestHandler - Move commented out methods in ExampleResourceRequestHandler 2019-06-25 19:24:57 +10:00
amaitland 68326c938f Add DefaultRequestHandler (marked as Obsolete) for backwards compatibility
Ditching Default from naming convention.
2019-06-25 19:24:57 +10:00
amaitland 7e731b0fa9 Code Cleanup - Rename DefaultRequestHandler to RequestHandler
Also renamed CefSharp.Example.Handlers.RequestHandler to CefSharp.Example.Handlers.ExampleRequestHandler

Will Add in Obsolete DefaultRequestHandler
2019-06-25 19:24:57 +10:00
amaitland 7e31a9523e DefaultResourceRequestHandler - Add default implementation for users to override only the methods they require 2019-06-25 19:24:57 +10:00
amaitland 07d8862c96 IResourceHandler - Improve xml doc 2019-06-25 19:24:57 +10:00
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