Commit Graph

4985 Commits

Author SHA1 Message Date
amaitland 72c1babab9 Upgrade version numbers to 67 2018-06-25 21:33:57 +10:00
amaitland d09c3e8b03 CefSharpArguments.ExitIfParentProcessClosed - Change to lowercase
Chromium changes the args to lowercase, so we switch to lowercase for compare.
2018-06-25 21:31:17 +10:00
amaitland 61f95f6893 BindingTest.html - Fix formatting
Braces on new lines
Remove blank line
2018-06-25 21:31:17 +10:00
Damir Ainullin 416cdde616 Fix possible null reference of RenderHandler (#2428)
* Fix possible null reference

* Used "is" operator instead of GetType and typeof

* Removed redundant condition
2018-06-25 11:53:09 +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
Alex Maitland d8f9b6faf5 Update appveyor.yml
Upgrade version number to 67
2018-06-24 13:16:10 +10:00
amaitland 5a82b0c8ec WPF - Mark OnMouseWheel as Handled
Resolves #2422
2018-06-20 21:34:24 +10:00
amaitland 41813c390e WPF - Rename WindowStateChanged to OnWindowStateChanged
Also tweak some of the comments
2018-06-14 22:45:19 +10:00
amaitland e7cacffe5a Upgrade to CEF 3.3396.1777.g636f29b / Chromium 67.0.3396.79 2018-06-14 22:33:47 +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
Henrik Heggelund-Berg ff2665444b Release window event handlers on Dispose (#2416)
* Release window event handlers on Dispose

Make sure event handlers related to `Window`, e.g. `WindowStateChanged`, is released during Dispose.

* Clear reference to `Window`
2018-06-12 21:24:59 +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 cb0d9275e0 WcfEnabledSubProcess - Revert codepage change 2018-06-09 21:53:15 +10:00
João Neves 274e841f35 Close CefSharp.BrowserSubprocess.exe if parent process exits (#2375)
* Close cefsharp subprocess if main process dies

* Code review

* Await before exiting

* Update Program.cs
2018-06-09 21:39:23 +10:00
Philipp Feigl 2f49ba6852 Update DependencyChecker with now required "v8_context_snapshot.bin" file (#2399) (#2400) 2018-05-25 10:27:25 +10:00
amaitland 7f3a31b758 CefSharpSchemeHandlerFactory - Add example of new ResourceHandler.FromFilePath autoDisposeStream param 2018-05-17 16:51:57 +10:00
amaitland 5adff7014b ResourceHandler - Expose AutoDisposeStream for ResourceHandler.FromStream and ResourceHandler.FromFilePath
Also add OneTime param to WebBrowserExtensions.RegisterResourceHandler which translates to AutoDisposeStream
2018-05-17 16:43:14 +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 fdc7cc21d5 Upgrade to CEF 3.3359.1772.gd1df190 / Chromium 66.0.3359.117 2018-05-17 12:40:39 +10:00
amaitland 5f3dca4d96 JavascriptAsyncMethodHandler - Obtain Promise from context on Execute
Previously the promise reference was passed into the handler, now we obtain the reference on demand
2018-05-15 16:12:46 +10:00
amaitland ddb2fdcbbc CefAppUnmanagedWrapper - Add comment about mapping layer so code isn't duplicated to handle camel casing of object names 2018-05-15 15:52:31 +10:00
amaitland 306ac694e1 RegisterBoundObjectHandler - Reduce code duplication slightly 2018-05-15 15:52:30 +10:00
amaitland 5ab2fc0142 JavascriptRootObjectWrapper - Log error when trying to bind sync object when IBrowserProcess is null 2018-05-15 15:52:29 +10:00
amaitland e6c909b282 JavascriptBindingExtensions - Remove unnecessary async keyword from script 2018-05-15 15:52:29 +10:00
amaitland 35b795075c Untabify JavascriptBindingExtensions 2018-05-15 15:52:28 +10:00
amaitland 7d7b6d8d48 Example Projects - Upgrade to .Net 4.6
Remove the usage of TrySetResultAsync and replace with TaskCreationOptions.RunContinuationsAsynchronously
2018-05-13 13:07:14 +10:00
amaitland 11cfb7d434 Review Callback classes and implement the simplest possible fix until a long term solution for #2349 is devised
- Add OnComplete check to all the TaskCompletionSource based callbacks that could potentially have executed TrySetResultAsync twice, which could on rare occasions
execute in a non deterministic fashion (The Disposed execution of TrySetResultAsync called before the OnComplete one). See #2349 for a more detailed
proposal and one potential long term solution (upgrading to .Net 4.6 is the best option, though not practical now, will update the example projects shortly).
- Update callbacks for consistency, all now implement IDisposable and have an IsDisposed
2018-05-13 13:07:13 +10:00
nicholas-str 22b299e3b5 OnPopupSize - fix incorrect ordering of Rect params
OnPopupSize - fix incorrect ordering of Rect params
2018-05-10 12:08:24 +10:00
amaitland 0a849a8976 JSB - Add EnsureObjectBoundAsync method
To support this use case added IJavascriptObjectRepository.ObjectsBoundInJavascript (called a single time with names of all objects bound)

Implements the idea put forward in #2362
2018-05-09 13:16:07 +10:00
amaitland dd42fdbed7 AsyncExtensionFacts - Add test case for #2349 2018-05-03 13:06:10 +10:00
amaitland 56ce91fa9d Upgrade version numbers to 66 and update README.md 2018-05-03 12:20:45 +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 05e67ddc2d Upgrade to CEF 3.3359.1769.gd0bfc4d / Chromium 66.0.3359.117 2018-05-02 17:31:20 +10:00
amaitland d56eed0f06 NuGet/CefSharp.Common.props - For x86/x64 platforms the BrowserSubProcess wasn't being copied
Revert to Private false and let the None target copy the files
2018-05-01 12:23:10 +10:00
amaitland c54755aa12 appveyor.yml - Update temp myget api key 2018-05-01 11:25:44 +10:00
amaitland ebd7c5d55a build.ps1 - Stip off -pre from Assembly version 2018-05-01 11:11:05 +10:00
amaitland 43c1ff3ed0 Task Callbacks - only call TrySetResultAsync if the callback was never called
Add IsDisposed property to ICompletionCallback, IPrintToPdfCallback, IRegisterCdmCallback, IResolveCallback
Should resolve #2349 until the code review can be finished
2018-04-30 13:58:47 +10:00
amaitland f2fcbf0add Always pass through Process Id to subprocess
Improve command line parsing

Partial import of changes from #2375
2018-04-30 12:45:15 +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
Drew Noakes aaf67695cb Use HashSet over Stack (#2372)
V8Serialization - Replace usage of Stack with HashSet
2018-04-27 12:37:22 +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
amaitland d49f975f1c OffScreen - IRenderHandler now implements all methods
DefaultRenderHandler handles all the calls required by the OffScreen ChromiumWebBrowser implementation
2018-04-23 14:15:25 +10:00
amaitland 93fdd63525 WPF - Fix incorrect param ordering of IRenderHandler.OnPaint
Param order now matches CEF interface
2018-04-23 13:06:05 +10:00
amaitland c51a615d7d OffScreen - Add IRenderHandler and DefaultRenderHandler basic implementation
Only supports OnPaint, will expand to support the other methods
2018-04-23 13:02:12 +10:00
amaitland 61033e66c8 WPF/OffScreen cleanup
- More code cleanup, use null-propagating operator
- WPF Add protected virtual UpdateDragCursor
2018-04-23 12:42:00 +10:00
amaitland c1b89c62e9 WPF/OffScreen - Code cleanup and minor refactor
IRenderWebBrowser - Method naming now matches CEF, xmldoc updated to be more accurate

CefSharp.Wpf.ChromiumWebBrowser and CefSharp.OffScreen.ChromiumWebBrowser both updated as a result of IRenderWebBrowser changes
Should be minimal public API changes, should only require changes for those that are implementing their own rendering, who will have a major rewrite on their hands regardless of this.
2018-04-20 14:49:25 +10:00
amaitland b492905cea Code cleanup - Move some structs and enums into separate namespace
- Move the less likely to be used structs/enums into the relevant namespaces, would ideally like to move them all, would likely cause a few issues
for some when upgrading though, so deferring for now.
- Remove Geoposition as it's no longer used (Geolocation API was removed in CEF)
2018-04-20 12:56:32 +10:00
amaitland 9fedc1255d CefWriteHandlerWrapper - Revert accidental change to Write method
Might look at changing the code later
2018-04-20 12:32:27 +10:00
amaitland f6e58283a6 LegacyBinding - Remove objects from cache if key already exists
Temp fix for #2301 Will be resolved properly in #2306
2018-04-20 10:45:52 +10:00
amaitland 7490b53490 IDragData.GetFileContents - update to properly closer represent the CEF API
Pass in null to get the stream size, pass in a valid stream (typically MemoryStream) to get the actual contents
2018-04-19 17:39:21 +10:00