Commit Graph

654 Commits

Author SHA1 Message Date
amaitland 105cf8f3af CefExample - Register https://cefsharp.example scheme handler factory for testing 2019-06-25 19:24:57 +10:00
amaitland 0542c5138b SendProcessMessage - Remove frame/browserid from messages
Not complete or tested yet
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 302f5b2c83 WinForms Example - Improve Cef.DoMessageLoopWork examples
Change WinFormsBrowserProcessHandler to use a WinForms timer so it's Diposed when the Form is
switch it to using 60fps
2019-06-02 20:35:31 +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
amaitland 335c884b08 Javascript Callback - Add additional tests
Add Basic tests, still need some more work.
Test changes added in #2748
2019-04-26 14:17:58 +10:00
amaitland c27524f456 IJavascriptCallback.CanExecute - Add checking for valid frame
Now checks if the frame associated with the callback still exists and if it's valid
Updated some of the QUnit tests to call CanExecute
2019-04-26 08:31:33 +10:00
amaitland ea843f31c1 Formatting fixes
Follow up to #2691
2019-04-05 12:02:02 +10:00
João Neves 6692749728 WPF - Implement UpdateDragCursor (#2691)
* Close cefsharp subprocess if main process dies

* Implemented UpdateDragCursor

* Fixed braces position

* Added license header

* Fixed cursor flickering

* Added test

* Fixed build

* Fixed move cursor

* Fixed braces

* Simplified solution

* Fixed dropping Link effect

* Fixed encoding + Removed leftovers
2019-04-05 11:58:27 +10:00
amaitland db306a64c9 CefExample - Add autoplay-policy example 2019-03-20 21:51:18 +10:00
kurtzky aaa5054d6c Added QUnit tests for DateTime serialization (#2695)
* Added QUnit tests for DateTime serialization

Related to Issue #2662
2019-03-20 21:15:50 +10:00
amaitland 72ee102bcf V8Serialization - ConvertDateTimeToCefTime convert to UTC time
BindingTest.html - Add QUnit test

Resolves #2662
2019-02-28 20:27:06 +10:00
Alex Maitland 9d2c66f584 Cefexample Add link to cef specific command line args 2019-02-19 10:07:11 +10:00
amaitland 34f29f0323 TypeConversion - Improve ToNative type checking when converting from Object to CefValue
Previously you had to used a fixed type, now the type checking is more flexible.

Move the Dictionary check to before the collection check as a dictionary is technically a collection

Resolves #2625
2019-01-18 12:34:25 +10:00
campersau b31069633e add spaces in exception messages (#2620) 2019-01-11 08:57:28 +10:00
Alex Maitland 02e3084af3 Add Chromium Extension Support (#2613)
* 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
2018-12-31 13:12:10 +10:00
amaitland 2612c68002 Add IBrowserHost.RunFileDialog
Demo added to WinForms project

Resolves #2594
2018-12-28 13:39:33 +10:00
amaitland 11a8371e19 Rename CefExtension to V8Extension
Resolves #2612
2018-12-27 15:47:29 +10:00
amaitland 6a4fab2c87 PassThruResponseFilter/MemoryStreamResponseFilter - Rewrite to deal with DataIn being greater than DataOut
In some cases DataIn is greater than data out, the previous implementations simply copied all data, which doesn't work
in some specific instances (the files appear to have compression enabled).

Should resolve #2433
2018-12-11 13:29:22 +10:00
amaitland 4f71295941 CefSharp.Example - Move example classes into handlers/javascriptbinding folders/namespaces
Basic code cleanup
2018-10-29 16:21:42 +10:00
Alex Sukhovy 304a300b0c Call OnContextCreated and OnContextReleased for each frame (#2373)
* ContextEvents for each frame

* set CanExecuteJavascriptOnMainFrame

* example and comments

* whitespace fix

* comments

* whitespace

* update comments
2018-10-28 16:48:50 +10:00
amaitland 8e016789c9 Example - Update Home.html
Fix some mistakes
2018-10-23 12:58:36 +10:00
Atvaark 572a05bbbf Fix IDE1006 in FindReplaceResponseFilter.cs (#2545) 2018-10-22 09:46:28 +10:00
amaitland dcff3d0094 IJsDialogHandler - Rename OnJSBeforeUnload to OnBeforeUnloadDialog
Also fix xml doc

Resolves #2523
2018-09-25 20:56:31 +10:00
amaitland 62d2bb3071 CefSharp.Example/Resources/Home.html - Remove unused js file reference 2018-09-25 14:12:22 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland 54c625c57b WPF - Tooltip Wrap
Wrap the tooltip content in a text block, so that it gets wrapped (was previously going off screen)

Related to #2488
2018-09-04 19:41:37 +10:00
Igor 0ede12e7ba Add OSR AccessiblityHandler. (#2480)
* Add AccessibilityHander.

Implement CefAccessibilityHandler. Add IAccessibilityHandler interface. Add AccessibilityHandler field to IWebBrowser.

* Pull request fixes.

Replaces tabs with spaces; move CefAccessibilityHandler implementation to RenderClientAdapter; add missing comments.

* Add CefValueWrapper.

Add ICefValue interface; pass ICefValue to IAccessibilityHandler.

* Pull request fixes.

Rename CefValue to Value and CefValueType to ValueType; add CefValueWrapper::GetObject() method; remove stub code in AccessibilityHandler; fix comment on IAccessibilityHandler.

* Pull request fixes.

Fix comments for IValue; remove redundant global namespace reference for CefValueType.
2018-08-16 19:33:02 +10:00
amaitland f6088f33d2 DefaultResourceHandlerFactory - Rewrite so it stores byte[] instead of storing IResourceHandler
It's not actually a factory and will handle multiple requests to the same url

Only API change is for DefaultResourceHandlerFactory directly, the LoadHtml and RegisterResourceHandler extension methods
stay unchanged
2018-08-13 12:39:04 +10:00
amaitland d14c26a892 IResponse.ResponseHeaders - Make obsolete
Use IResponse.Headers instead
2018-08-07 19:33:51 +10:00
amaitland d87e795000 WinForms/Wpf/OffScreen - Create specific CefSettings class for each version
- 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
2018-08-02 10:47:12 +10:00
amaitland 9d4504db99 IDownloadHandler - Add IWebBrowser param to methods
Resolves #2470
2018-07-24 12:38:45 +10:00
amaitland 8301090afe Merge branch 'split_ceffiledialogmode_enum' of https://github.com/fuzzykiller/CefSharp 2018-07-02 18:24:44 +10:00
amaitland 10a891548b WPF/OffScreen Example - Disable SurfaceSynchronization
https://bitbucket.org/chromiumembedded/cef/src/514ced40ceffa16966d9dee23a253014faf74d72/libcef/browser/osr/render_widget_host_view_osr.cc?at=3396&fileviewer=file-view-default#render_widget_host_view_osr.cc-243 (Apparently only relevant for 3396 branch)

See https://github.com/cefsharp/CefSharp/issues/2431
2018-06-27 20:42:53 +10:00
amaitland 61f95f6893 BindingTest.html - Fix formatting
Braces on new lines
Remove blank line
2018-06-25 21:31:17 +10:00
Mark Vulfson d1b78bcbd7 Serialize any Enumerable (List<T>) type to V8 object properly (#2393)
* Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392)
Handle any enumarable, not just arrays when serializing (e.g. when calling
`IJavascriptCallback.ExecuteAsync`).
Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization

* fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization

* fixup! fixup! Serialize any Enumerable (List<T>) type to V8 object properly (Issue #2392) Handle any enumarable, not just arrays when serializing (e.g. when calling `IJavascriptCallback.ExecuteAsync`). Otherwise, `System.Reflection.TargetParameterCountException` is thrown during serialization
2018-06-25 11:20:42 +10:00
amaitland 3b6ff2fdbd WPF - Mouse Scroll becomes unresponsive
Add Hack to CefSharpApp to allow for setting of disable-features command line arg
Add the example command line args
https://github.com/cefsharp/CefSharp/issues/2408
2018-06-14 22:33:47 +10:00
amaitland e4535ab9df CefSharpSettings.SubprocessExitIfParentProcessClosed - only spawn task to monitor parent if command line arg present
Follow up to #2375
2018-06-11 22:18:51 +10:00
amaitland 7f3a31b758 CefSharpSchemeHandlerFactory - Add example of new ResourceHandler.FromFilePath autoDisposeStream param 2018-05-17 16:51:57 +10:00
amaitland 552962ba77 IRequestHandler.OnBeforeBrowse - Add userGesture param
The userGesture value will be true if the browser
navigated via explicit user gesture (e.g. clicking a link) or false if it
navigated automatically (e.g. via the DomContentLoaded event).
2018-05-03 12:11:52 +10:00
amaitland 8f7692ae6e JSB - Add JavascriptBindingCompleteEventArgs and config options to CefSharp.BindObjectAsync
CefSharp.BindObjectAsync can now take an optional config object as first param
Include additional information when binding complete
Add option for cefSharp.bindObjectAsync (starting with lowercase latters)
Add new syntax options - not entirely complete, no variant for the options object
Add ignore cache option
2018-04-27 16:40:39 +10:00
amaitland cfb0db1c3f RequestEventHandler - Add CanGetCookies and CanSetCookie 2018-03-28 14:40:26 +10:00
amaitland a87d834409 Add Cef.GetBlockingCookieManager, IRequestHandler.CanGetCookies and IRequestHandler.CanSetCookie
RequestEventHandler example implementation is incomplete
2018-03-28 14:28:38 +10:00
WarWithinMe dace5d8f47 Serialize Dictionary type to V8 object (#2303)
* 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.
2018-03-22 11:00:52 +10:00
João Neves 5a713fdf7d Support uncaught exception handling (#2244)
* Added support for uncaught javascript exception in Render Process Message Handler
* Fixed typo
* Added stack frame column numbers
* Code review
* Code review
* Update JavascriptException.cs
2018-03-07 10:21:31 +10:00
amaitland fb374c0f94 CefExample - Add CefSharpSettings.Proxy example 2018-03-05 16:18:25 +10:00
amaitland 3175968339 Fix Async JSB unable to return class
Added note about memory leak
Added Test case to validate fix
2018-03-05 14:02:59 +10:00