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
Previously on LoadUrl etc we didn't take focus, we now take focus on the initial Load so touch screens work
The behaviour when using ChromiumWebBrowser.ActivateBrowserOnCreation = true is still the same as versions prior to 73 (version 73 is the only different version)
Issue #2776
- JavascriptMessageReceived event added to ChromiumWebBrowser/IWebBrowser
- CefSharp.PostMessage and cefSharp.postMessage added to V8Context on creation for use in Javascript
- Add PostMessageTest.html
* Feature Request - Add IAudioHandler
- For performance reasons we return NULL if no audiohandler is assigned
- No example is provided currently
Initial implementation for #2714
For the print dialog we appear to be passed a CefRefPtr<CefBrowser> reference which doesn't appear to trigger an OnAfterCreated call
so we have no reference to it. Looking at the `CefBrowser`, there's no real data of value, empty url, no frame information (just an invalid frame id)
so for now we'll just ignore it in DefaultFocusHandler, we don't want to handle for popups anyway
Resolves#2725
* 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
- 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
WS_EX_NOACTIVATE added to WindowInfo.ExStyle
To re-enable Window activation when the browser is created inherit from ChromiumWebBrowser and override CreateBrowserWindowInfo
and remove WS_EX_NOACTIVATE from WindowInfo.ExStyle
Resolves#1811
- 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
BrowserSettings must be set before the call to CefBrowserHost::CreateBrowser for this reason we enforce these checks.
Throw exception if attempt to set BrowserSettings after browser has been created
Initially I was going to make BrowserSettings a private set, unfortunately that probably won't work if you are using the designer
as there would be no way to instantiate a new instance. It was possible to lazy initialize in the get method, that doesn't really provide
a descriptive error message, I could have updated the documentation to describe the behaviour, unfortunately people just don't really the docs.
* Add Chromium Extension Support
Add IRequestContext.LoadExtension
Add IExtensionHandler
Add IExtension
Add example (import from cefclient) - was added to CefSharp.WinForms.Example projct
Add RequestContextExtensions - to make loading an extension slightly easier
Exposes the CEF API for Shared D3D11 Texture support. This should be considered experimental as there are quite a few known bugs in the CEF implementation
(PDF Viewer not working correctly)
OffScreen.ChromiumWebBrowser.CreateBrowser API changed (breaking change) now pass in `WindowInfo` to customise settings
Refactor CreateBrowser to support windowed and OSR rendering (now accepts IWindowInfo)
Resolves#2527
Probably still needs some work, would be nice if the event was the same in all three instances, difficult with the WPF version being a DependencyPropertyChangedEventHandler
* Applied formatting
* Fixed file encoding + Updated copyright year
* Updated License
* Fixed more file encoding
* Copyright notice now shows the year the file was created
- This is a breaking change as there is no common `CefSharp.CefSettings`, there is no `CefSharp.Wpf.CefSettings`, `CefSharp.WinForms.CefSettings` and `CefSharp.OffScreen.CefSettings`
- Cef.Initialize has been removed, the `ChromiumWebBrowser` constructor will call the `Cef.Initialize` with the defaults for your flavour
- CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled
Resolves#2477
Add some custom designer attributes
Converted the logo.png to a 16x16 bmp as a short term placeholder (someone is welcome to contribute something better)
Hide all the handlers from the designer
* JSB Rewrite - Add CefSharp.RegisterBoundObject javascript method
To get around the problem of IPC timing, I've reversed the communication, now it's the render process requesting
the bound objects, the implementation is incomplete at this stage, more just a basic proof of concept
Rewrite BindingTest.html using QUnit
One of the tests doesn't map correctly as it requires def user interaction
TODO:
- Get objects by name
- Rename Messages.h values that relate to this change so they are more descriptive
- Better error handling
- Caching of objects within a render process
- Investigate global context options, don't think it's possible to call an async method directly in the global context
# Conflicts:
# CefSharp.Example/Resources/BindingTest.html
* JSB Improve Request/Response message names
* BindingTest.html - Output stress test results
* Remove JavascriptRootObject was leftover from time we used WCF to transmit objects
* JavascriptObjectRepository - Objects are now sent in the same list with an IsAsync flag
Separation when sending over IPC with two unique lists isn't necessary
* JavascriptObjectRepository - Return objects by name or return all by default
Untabify CefAppUnmanagedWrapper.cpp
Add minor comment to CefBrowserWrapper for a reminder that we use Frame Identifier as dictionary key
* Add //TODO: JSB comments for work that's left to be done
Ideally within a render process we cache bound objects once they've been communicated,
It would also be nice to make multiple binding requests so objects can later be added dynamically
* JSB Allow multiple calls to CefSharp.RegisterBoundObject
Update BindingTest.html to name two distinct calls to different bound objects
* JSB - Add some notes about caching, no working implementation yet
* JSB - Dynamically Register object on Request
* JSB Add ability to unbind an object and rename RegisterBoundObject to BindObjectAsync
# Conflicts:
# CefSharp.Example/Resources/BindingTest.html
* JSB BindObjectAsync - if objects already bound then return false
* JSB - Ignore Indexer properties
Were previously throwing an exception
* JSB - Add LegacyJavascriptBindingEnabled option so preserve existing behaviour
This is only useful for SPA application and those that only navigate to pages
hosting within a single domain. Any sort of cross-site navigation and a new
render process will be spawned and objects won't be bound automatically
(You can use the new methods to request they're bound yourself, at least in theory,
more testing required on this)
* Add LegacyBindingTest.html
Current disabled by default. To enable uncomment CefSharpSettings.LegacyJavascriptBindingEnabled = true;
in CefExample.cs
* RegisterJsObject and RegisterAsyncJsObject can now only be used when CefSharpSettings.LegacyJavascriptBindingEnabled = true
See https://github.com/cefsharp/CefSharp/issues/2246 for details
WPF - Add checks so if RequestContext is set after browser created an exception is thrown
WinForms - Add checks so if RequestContext is set after browser created an exception is thrown