Commit Graph

252 Commits

Author SHA1 Message Date
amaitland 38c7941ab6 xml doc - remove seealso internal interface references 2020-01-29 10:22:17 +10:00
amaitland 19a70727f2 WinForms/WPF/OffScreen - Improve Dispose/BrowserInitialized error messaging
- Set CanExecuteJavascriptInMainFrame to false when disposing
- Throw exception if Disposed when calling GetBrowser method
- Improve error messaging
2020-01-15 11:16:06 +10:00
amaitland fe83ba0aa5 OffScreen - Disable GPU Compositing 2020-01-08 16:46:49 +10:00
amaitland 05172d6943 OffScreen - Add HtmlString constructor overload to ChromiumWebBrowser 2019-11-03 09:21:01 +10:00
amaitland 67c05da691 OffScreen - ScreenshotAsync incorrectly returned null on first Paint call
Resolve a sequence issue where the Paint event is called before the buffer is updated, the first call
to ScreenshotAsync would return null incorrectly even when the paint event fired.
Add internal AfterPaint event, this event is called regardless of args.Handled
If args.Handled is true and ScreenshotAsync is called then the TaskCompletionSource returns an Exception
2019-10-29 20:42:04 +10:00
amaitland 802bb7f43c Remove IAudioHandler
The Chromium implementation has changed so dramatically that CEF has removed support see https://bitbucket.org/chromiumembedded/cef/commits/1f893c76a97eaa88e3ff782b8e2e47dd0f5d27b2

Track https://bitbucket.org/chromiumembedded/cef/issues/2755/reimplement-audio-mirroring-for for details on when it will be reimplemented

Original Issue #2727
2019-10-01 20:06:37 +10:00
amaitland f088a7c169 CefSettings - Add custom dictionary to allow setting of command line args with no value
- Updated CefExample to remove "1" values from the command line arg examples

Issue #2858
2019-09-06 13:05:50 +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
medoni 4638f8a628 OffScreen - ChromiumWebBrowser constructor change RequestContext to IRequestContext
Changed typeof requestContext to IRequestContext in ChromiumWebBrowser.ctor
2019-06-18 07:06:07 +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
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 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
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
Chris 987f988dac Refactoring - Moved RegisterJsObject and RegisterAsyncJsObject to WebBrowserExtensions (#2703) 2019-03-23 13:31:09 +10:00
amaitland d2d1e6f879 WPF/WinForms/OffScreen - Move BrowserSettings Dispose into ManagedCefBrowserAdapter::CreateBrowser
- Improve BrowserSettings disposed check message

Follow up to #2643
2019-03-22 10:46:54 +10:00
amaitland 3423670740 WinForms/WPF/OffScreen - Dispose of BrowserSettings only if created by CefSharp framework
- 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
2019-03-21 20:13:02 +10:00
amaitland b1ef9e8bc2 OffScreen - ChromiumWebBrowser.Dispose add comment for Interlocked.CompareExchange 2019-03-01 14:10:27 +10:00
merceyz 58fac3865b OffScreen - Cleanup and improvements to the dispose pattern
- Added thread safe dispose pattern

Issue #1954
2019-03-01 13:38:29 +10:00
amaitland b2acd4ad76 OffScreen - Add CefSettings.EnableAudio
Just a helper method to remove the mute-audio command line arg
2019-01-12 06:40:34 +10:00
campersau b31069633e add spaces in exception messages (#2620) 2019-01-11 08:57:28 +10:00
amaitland a340ebd922 OffScreen - BrowserSettings throw exception if attempting to use Disposed instance 2019-01-09 17:26:39 +10:00
amaitland ee7a7c2b34 OffScreen - Fill in missing xml doc
Hopefully this is the whole CefSharp.OffScreen namespaces now documented
2018-12-17 13:50:29 +10:00
amaitland 3cb5c119fa OffScreen - Remove obsolete methods
- Removed ChromiumWebBrowser methods OnPaint, OnCursorChange, StartDragging, UpdateDragCursor, OnPopupShow, OnPopupSize, OnImeCompositionRangeChanged
Access to that functionality is available through CefSharp.OffScreen.IRenderHandler, you can subclass the DefaultRenderHandler implementation should you require.
- Improve the xml doc for OnPaintEventArgs and some other methods

Resolves #2598
2018-12-17 13:41:05 +10:00
amaitland bbf7795d80 WPF/OffScreen - Add OnAcceleratedPaint
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
2018-12-16 19:37:12 +10:00
amaitland c618dc155b RenderClientAdapter.h - GetViewRect must return a CefRect
CEF API Change see https://bitbucket.org/chromiumembedded/cef/commits/09afa3a843531a1768896bed3f64fb49ed81b525?at=3578
2018-12-16 10:48:52 +10:00
amaitland ccd721c98f OffScreen - Add xml doc to ChromiumWebBrowser.JavascriptObjectRepository property 2018-12-10 14:14:07 +10:00
amaitland 485297bb7f Fix some xml doc encoding issues 2018-11-19 13:22:45 +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 84e7a7d1de OffScreen - Improve IRenderHandler doco 2018-09-28 12:37:42 +10:00
amaitland 1b39c2a70a WinForms/WPF/OffScreen - Cleanup some xml doc around BrowserInitialized event
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
2018-09-27 22:02:00 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
amaitland 4ab07c8a32 OffScreen - CefSettings remove command line args
OSR mouse scroll issue has been resolved.
2018-09-16 13:12:42 +10: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 8ed2681619 Xml Doc - Add some more xml doc
Some of it's just placeholder doc to keep sandcastle happy
2018-09-05 13:01:41 +10:00
amaitland b0af05a6ab OffScreen - ChromiumWebBrowser Fix xml doc 2018-08-24 19:17:25 +10:00
amaitland 13bafa709b OffScreen - Untabify 2018-08-24 19:13:59 +10:00
amaitland 8bc9e25e11 OffScreen - BitmapBuffer.CreateBitmap create new bitmap and copy buffer to it's back buffer
Bitmap was not a true snapshot of the image, the backbuffer being updated would change the image
2018-08-24 19:12:53 +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 5a469d4a15 WPF/OffScreen - OSR rendering now supports surface sync
Remove the disabled-features SurfaceSynchronization command arg
Remove RootLayerScrolling command line arg (causes strange scrolling behaviour)

https://bitbucket.org/chromiumembedded/cef/issues/2447/osr-add-support-for-surface
2018-08-13 19:19:14 +10:00
amaitland e08e882c90 CefSharp.OffScreen - Disable audio by default
It doesn't make much sense in an offscreen scenario
2018-08-08 18:56:50 +10:00
amaitland a7c738456c WPF/OffScreen - Add missing ScreenInfo values
Change to using Rect struct

Follow up to #2474
2018-08-02 13:22:41 +10:00
amaitland ba8b9db4b5 WPF/OffScreen - Removed unneeded code 2018-08-02 13:22:26 +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 2f7618bf0e OffScreen - Remove BrowserSettings property
Can now only set BrowserSetting through the constructor or CreateBrowser method
BrowserSettings are only changeable before the browser has been created, this removes any confusion.
2018-07-18 19:38:11 +10:00
amaitland b779d2b567 OffScreen - Add xml doc comment to constructor
Add note about legacy binding and creating the browser
2018-07-12 20:35:52 +10:00
amaitland 2899112843 OffScreen - ScreenshotAsync now correctly passes through blend to ScreenshotOrNull 2018-06-27 21:51:53 +10:00
amaitland 90c5e71aeb WPF/OffScreen - Removed ViewRect and replaced with existing Rect (struct)
IRenderWebBrowser.GetViewRect didn't allow you to return the x and y coordinates

This is a breaking change
2018-06-27 19:54:41 +10:00
amaitland 2da7df0379 WPF/OffScreen - Initialize Cef with WindowlessRendering enabled by default
Suggestion is this is now required to be set

https://github.com/cefsharp/CefSharp/issues/2431
2018-06-27 18:57:11 +10:00
amaitland 0f6d70226e OffScreen - Simplify BitmapBuffer.ResizeBuffer
Was using Array.Resize to modify the existing array, unfortunately this doesn't yield the performance result the name implies.
A new array is created and copies elements from the old array, so performance is actually worse than allocating a new array.
For now we'll just create a new empty array.

https://msdn.microsoft.com/en-us/library/bb348051(v=vs.110).aspx
2018-05-17 14:22:40 +10:00
amaitland 9eb19756ac OffScreen - Default GetScreenPoint to the view x/y coordinates provided
This is likely a better default than 0, 0
2018-04-23 14:18:22 +10:00