Commit Graph

490 Commits

Author SHA1 Message Date
amaitland 7a0b06ad0b JSB Add support for dynamic keyword (using ExpandoObject)
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
2017-12-21 13:00:36 +10:00
amaitland 464dd14b6f Update Example RequestHandler to inherit from DefaultRequestHandler
A new default implementation was added in #2157
BrowserTabView - cleanup usings and remove unused code
2017-12-20 10:01:34 +10:00
amaitland 3a60e69928 Update RequestHandler Example
Instead of throwing exception cancel the request - calls are made by unmanaged code, we shouldn't be throwing a managed exception
2017-12-19 14:48:24 +10:00
Per Lundberg 8dd46377be Fixed typos + whitespace cleanups. 2017-11-28 00:07:47 +02:00
jankurianski 65808ae8a4 Fix formatting in BindingTest.html 2017-10-24 09:52:43 +11:00
ieremyashev f029a22f45 Fix return value serialization for async JS bindings (#2167) 2017-10-24 09:48:58 +11:00
amaitland 4f311e766d Untabify MethodInterceptorLogger 2017-06-01 11:35:12 +10:00
amaitland f5e2a938ec Follow up to #2015
Add license disclaimer
Move example MethodInterceptorLogger into CefSharp.Example project
Reword the IMethodInterceptor xml doc a little bit, probably still needs some work
2017-06-01 11:32:06 +10:00
Chris 7ba2de4392 Example - RequestHandler: Throw exception on invalid URI (#2047) 2017-05-15 17:28:01 +02:00
amaitland 504d04dc43 Include FindReplaceMultiResponseFilter in example project, update it's copyright year and tweak it's formatting 2017-05-08 16:02:46 +10:00
amaitland 2cb7753b0b Add MemoryStreamResponseFilter example - data is copied into a memoryStream which can be read in IRequestHandler.OnResourceLoadComplete 2017-05-08 15:57:51 +10:00
amaitland 0067d02360 Add UnicodeExamples one equal to 32kb (the default buffer size) and one slightly greater.
Change CefSharpSchemeHandlerFactory to always include a BOM (premable) to the front of the response data
2017-05-05 13:06:26 +10:00
amaitland 6691d0080a Refactor ResourceHandler, split FileResourceHandler out into it's own class, rather than relaying on ResourceHandlerType - this allows us to add more underlying CEF type wrappers without a huge amount of effort now.
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
2017-05-05 12:55:44 +10:00
amaitland 767b478dc6 Add Experimental option where bound async methods are queued on TaskScheduler.Default.
Set `CefSharpSettings.ConcurrentTaskExecution = true;` to enable this feature, should be set before the first ChromiumWebBrowser instance is created.
2017-05-04 12:53:48 +10:00
amaitland 6ded700373 Add Recaptcha test - https://cefsharp.com/Recaptcha.html 2017-03-30 07:55:47 +10:00
João Neves bc83d6c247 Allow calling managed methods from objects bound with RegisterAsyncJsObject that return arrays of structs (#1981)
* 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
2017-03-13 21:37:55 +10:00
amaitland e5ecfde20f Upgrade version number to 57.0.0
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
2017-03-13 10:58:03 +10:00
amaitland 5d459a5d32 Add IRenderProcessMessageHandler.OnContextReleased - native IPC message sent from render process 2017-03-07 09:23:10 +10:00
amaitland 04ff93817e Add https://pixabay.com/en/beach-pacific-coastline-ocean-coast-2089936/ to CefSharp.Example as embedded resource - test loading of image using browser.RegisterResourceHandler 2017-03-06 08:57:11 +10:00
amaitland 760d81dc23 Change PostDataAjaxTest.html to use https scheme and add CrossOriginWhilstList entry (AJAX post data for custom schemes stopped working ages ago, this just works around the problem). 2017-03-06 08:55:08 +10:00
amaitland d3e5249b9f Move most of the logic from CefSharpSchemeHandler into CefSharpSchemeHandlerFactory and use the ResourceHandler.FromStream/FromString methods instead
People keep implement IResourceHandler directly, so update the examples in hopes they use the build in methods
2017-03-06 08:55:08 +10:00
amaitland eee0a9e9d1 Add example of new CookieManager code 2017-03-06 08:55:07 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland 55f5ce44b5 Remove unused using statement from CookieManager
Update  cookieManager.SetSupportedSchemes usage as no longer accepts param array
2017-02-14 11:53:41 +10:00
amaitland ee5fd34ee6 Comment out Cef example - none of the CefSharp examples have the relevant directory present.
Update xml comments on Cef.RegisterWidevineCdm
Add braces to if check - even single line if statements have braces for consistency
2017-02-13 15:55:44 +10:00
Justin Stenning 2298ea0a93 Implementation of Cef.RegisterWidevineCdm (#1935)
* 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
2017-02-13 15:37:55 +10:00
amaitland 64b63b3dce RequestEventHandler - Change to explicit interface implementation and remove code duplication 2017-02-10 09:41:22 +10:00
Florian Obermayer ee563827ac Request event handler (#1918)
* Create RequestEventArgs.cs

* Create RequestEventHandler

* Update RequestEventArgs.cs

corrected namespace

* removed regions, splitted up classes per file

* reformatted code

* removed wrong class doc

* deleted empty line

* removed TODOs (moved them in pr comments)

* adapted @amaitland 's pr notes

* made code backwards compatible to c# < 6

* made code backwards compatible to c# < 6 ++ (moved default values for event args to ctor)

* made code backwards compatible to c# < 6 ++ (added private setters to properties)
2017-02-10 09:24:27 +10:00
amaitland 2b4840fc90 Add CssAnimation example for testing purposes 2017-02-01 09:37:08 +10:00
amaitland 1228f992d0 FindReplaceResponseFilter - Remove debugging code that was outputting the count as part of the response
AppendResponseFilter - Improve comment
2017-01-30 09:38:36 +10:00
Smaran Harihar fa41529853 Add IRequestHandler.OnSelectClientCertificate (#1878)
* 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
2016-12-13 09:48:15 +10:00
Philip Beber b47731de5e Added DownloadItem .OriginalUrl (#1877)
* 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
2016-12-04 22:26:49 +10:00
amaitland cecc8b14f7 Update RequestHandler.OnResourceRedirect example - redirect google to github 2016-12-01 22:22:04 +10:00
amaitland cce8cd825d Upgrade to 3.2840.1493 (Chromium 54.0.2840.59)
Add IResponse to IRequestHandler::OnResourceRedirect
2016-10-19 08:17:50 +10:00
amaitland 895932d05e Remove EnableInternalPdfViewerOffScreen() as disable-surfaces has been removed from Chromium.
This leaves the original https://bitbucket.org/chromiumembedded/cef/issues/1689 issue as being a problem, for now just disable GPU acceleration

Conversation about disable surfaces is http://magpcss.org/ceforum/viewtopic.php?f=6&t=14520&p=32346#p32345
2016-09-23 09:16:05 +10:00
amaitland 9fbde82ef0 Experimental implementation of IBrowserProcessHandler.OnScheduleMessagePumpWork
NOT READY FOR PRODUCTION USE
2016-09-01 16:51:20 +10:00
amaitland a8ef40fe8a Add command line option to test #1634 2016-08-20 08:24:12 +10:00
Alex Maitland d4feffb554 Feature - Add IBinder (#1749)
* Add basic ModelBinding which was imported from NancyFx framework - more can be stripped out that's unused

* Add IBinder as a param when registering an object for binding
Binding is disabled by default

* Add license and remove unused using statements

* Make bind method virtual to allow for overriding
Make methods protected

* Add very basic collection support - only primitive types supported for now.
Remove unused exceptions

* Support binding a list of sub objects

* Add null check for null params

* Add BindingOptions class - remove binder and CamelCaseJavascriptNames properties - allow for additional options in the future
Breaking change.

* Add support for List<object> binding type
2016-07-20 13:38:24 +10:00
amaitland 63ef6beb5f Refactor OnContextInitialized out as part of IBrowserProcessHandler interface
Add OnScheduleMessagePumpWork for use with integrating into existing message loop - probably better for WinForms integration, will look at providing an example later
2016-07-20 13:08:47 +10:00
amaitland c8f6017fa5 Change TestCallbackFromObject to use new DynamicDictionary helper class 2016-07-06 11:06:00 +10:00
tuxan 6a2ee2cd5b Overload of ConvertFromCef method removed and do some formatting corrections. 2016-07-01 11:00:57 -04:00
tuxan 2f89c530ba Added support to use object parameters with anonymous function callback inside as parameter of bound functions. 2016-06-30 18:17:39 -04:00
hathor 995776d232 This lets you do multiple search-and-replaces (#1725)
Add FindReplaceMultiResponseFilter Example
2016-06-30 08:07:34 +10:00
amaitland 6f6ecd3090 Add TooltipTestUrl to WPF Example menu 2016-06-29 12:05:19 +10:00
amaitland ca2085ef05 Add FolderSchemeHandlerFactory - maps request urls to files on disk within a specified folder.
Resolve #1717
2016-06-22 12:23:50 +10:00
amaitland 04d2a8ede8 Add ResourceHandler.FromFilePath method that takes in a MimeType
Make ResourceHandler.FromFileName obsolete
2016-06-16 15:16:30 +10:00
amaitland ec0a10095c Disable GPU for windows 7 as it appears to still be a problem with #1634 2016-06-16 08:05:21 +10:00
amaitland 0a5bb1f837 Re-enable GPU in OffScreen and WPF examples 2016-05-30 08:09:18 +10:00
amaitland 62292e4211 NPAPI Plugin methods removed from API
cef_runnable.h has been removed
Update IJsDialogHandler.OnJSDialog - acceptLang removed from API
2016-05-30 07:57:48 +10:00
amaitland 3061becb3f IResourceHandler now implements IDisposable - you can cleanup and resources when the handler is disposed 2016-05-26 07:28:19 +10:00