* Serialize Dictionary type to V8 object
Handle Dictionary type, otherwise it will be treated as class/structs and cause exception.
* Make the testcase covert IDictionary interface & ensure consistent bracket style.
Bound object meta data is cached within a render process
CefSharp.IsObjectCached - JS method to test if object cached
CefSharp.RemoveObjectFromCache - JS method to remove object from cache
If a request is made for multiple objects with not all of them being cached then a IPC message is sent.
When all objects already bound return response object for consistency
FindBrowserWrapper signature change - it's really not safe to throw a managed exception in the middle of unmanaged code, changed to logging and null checking
JavascriptObjectRepository - Add All Constant - Used when All objects are requested for binding (objects can also be requested by name)
TODO: Add a JS library to improve user experience when dealing with cached objects
* 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
Structs and classes can now be returned from an async method
Properties and fields are supported now. The returned class/struct is readonly effectively, no updates will be sent to the bound object.
Just to clarify this is only for objects bound using RegisterAsyncJsObject
Rewrite the tests using the QUnit framework, makes for much nicer presentation and should be easier to maintain them, also verifies tests completed successfully.
Tests are wrapped in an anon closure, will be used later for some JSB changes.
As ExpandoObject implements IDictionary we can use it interchangeable with only minor breaking changes.
Those expecting Dictionary<string, object> should change to IDictionary<string, object> or ExpandoObject for their param types
This will also impact anyone who has implemented their own custom IBinder
I'd suggest changing the type checking from explicitly checking Dictionary<string, object> to use Type.IsAssignableFrom or another method of comparison
DefaultBinder binder has been updated to accommodate ExpandoObject (now being returned by ObjectsSerialization.cpp)
Add new async binding for testing new assignment method
Rewrite some of the async bound object tests to use await and let - modernize them
Add license disclaimer
Move example MethodInterceptorLogger into CefSharp.Example project
Reword the IMethodInterceptor xml doc a little bit, probably still needs some work
Add new ByteArrayResourceHandler - uses CefStreamReader::CreateForData to load the byte array, for use with CefStreamResourceHandler
Add ResourceHandler.FromByteArray method for ease of use
Change ResourceHandler.FromString to use the new ByteArrayResourceHandler class
* Fixed problem when calling CefV8Value::CreateArray. Needs prior call to V8 context enter
* Call callback dispose in case of failure
* Support serialization of struct arrays to JS side
* Fixed formatting
Upgrade to cef.redist.x86.3.2987.1591
CefSchemeRegistrar::AddCustomScheme has new params - IsSecure and IsCorsEnabled
Also new CefRawPtr type is used for Scheme registra
* Added Cef.RegisterWidevineCdm for CEF Widevine CDM registration #1934
* Added test page for WidevineCdm registration and example registration #1934
* Noted additional steps for Widevine and proprietary codecs to CdmSupportTest.html
* Link for more information changed to issue #1934 in CefExample.cs
* replaced Cef.RegisterCdmCallback's async result with IRegisterCdmCallback parameter
* RegisterCdmCallback now uses taskCompletionSource
* wip create hooks for onSelectClientCertificate
* create interface and wrapper for callback
* get certificate from CefCertificateList, convert to X509Certificate2, add them to X509CertificateCollection and return this to ClientAdapter
* code review changes. Certificate selection in wrapper requires recreation of certificate in iteration
* added certificate dialog selection to WinFormsRequestHandler. Used VS untabify to remove all the tabs and replaced it with spaces
* missed updating a summary on ISelectClientCertificateCallback
* code review changes
* Added "OriginalUrl" property to DownloadItem which wraps "GetOriginalUrl" in CEF.
Added a sidebar to the example app which shows the DownloadItems as received by CefSharp.Core/Internals/TypeConversion.h
Added a View menu for hiding/showing the regular sidebar and the new download info sidebar.
* Pull request feedback