Commit Graph

30 Commits

Author SHA1 Message Date
Alex Maitland fd46a4c145 Core - Add EvaluateScriptAsPromiseAsync (#3251)
- Add useImmediatelyInvokedFuncExpression param to EvaluateScriptAsync which wraps the script in an IIFE
  with the cefSharpInternalCallbackId variable defined in scope to allow for deferred completion
- Wrap script in Immediately Invoked Function Expression and call promise.resolve to guarantee a promise.
- Return 'CefSharpDefEvalScriptRes' as the result of the js function to defer execution of the callback
- Call newly added cefSharp.sendEvalScriptResponse method in javascript when promise has been resolved/rejected

This is built up of a few parts and can technically be used by the new user to defer the response until they are ready.
Just return `'CefSharpDefEvalScriptRes'` and manually call cefSharp.sendEvalScriptResponse using the cefSharpInternalCallbackId
variable which is injected into the script execution (wrapped in an IIFE to limit scope)
2020-10-06 15:19:37 +10:00
amaitland 955b3f3c1a Core - Consistent C++ naming
- Following the adapter/wrapper naming scheme
- Moved classes to internals that aren't public facing

Resolves #1005
2020-04-06 06:50:32 +10:00
amaitland ec8d58bcec Core - Rename CefSharp.Internals.CefUrlRequestWrapper to CefSharp.UrlRequest
- Make public
- Add public constructor
2019-11-23 15:11:14 +10:00
amaitland 493897983d Core - Rename CefSharp.Internals.CefRequestWrapper to CefSharp.Request
- Made public
- Added public constructor

Related issue #1721
2019-11-23 14:27:27 +10:00
amaitland 60a1f640cf CEF Upgrade - Breaking Changes
- Remove CefSettings.EnableNetSecurityExpiration
- Remove RequestContextSettings.EnableNetSecurityExpiration
#2954

- Remove IFrame.LoadStringForUrl and IWebBrowser.LoadString
Resolves #2955
2019-11-03 12:33:45 +10:00
amaitland 4a79b75726 IUrlRequest - Minor formatting and xml doc improvements
- Formatting
- Xml doc improvements
- Rewrite test case to run continuation async

Issue #2881
2019-10-01 20:44:46 +10:00
David M Iserovich a843407dab Core - Add IURLRequest #1721 (#2881)
* Core - Add IURLRequest #1721

Add IURLRequest, IURLRequestClient, and GetURLRequest to IFrame

* Rename URL classes to Url, add xmldoc and licenses

* Add UrlRequestClient to CefSharp.Example, more minor cleanup

* Getters

* Rebase tweaks

* Fix filenames, remove unused

* Use UnmanagedMemoryStream instead of byte array for IUrlRequestClient.OnDownloadData
2019-10-01 20:11:10 +10:00
amaitland 0542c5138b SendProcessMessage - Remove frame/browserid from messages
Not complete or tested yet
2019-06-25 19:24:57 +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
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland f2050a0861 Add scriptUrl and startLine to EvaluateScriptAsync 2016-12-02 06:10:40 +10:00
amaitland bc298f6415 Add GetSource and GetText methods that take an IStringVisitor 2016-05-29 22:21:32 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland dcbddfbab9 Rewrite CefFrameWrapper::Parent::get - unsure if it would have worked previously, logic now follows CefFrameWrapper::Browser::get() 2016-01-11 12:03:12 +10:00
amaitland 4ef95605c5 Add ThrowIfDisposed check as accessing an invalid frame will cause a hard crash.
Resolves #1509
2016-01-11 11:45:04 +10:00
amaitland 3b2bd43880 Add initializePostData param to CreateRequest - simplifies the initialization of the CefPostDataWrapper, basically if you know that you'll need to use PostData then initialize up front 2015-11-29 06:19:35 +10:00
amaitland d5bde1cdfc Expose IFrame.LoadRequest
Add IFrame.CreateRequest to instantiate a new instance of the CefRequestWrapper
Was planning on using VC++ extensions methods, have yet to get that working, so for now just have a method on the IFrame interface directly.
2015-11-25 08:30:38 +10:00
amaitland b9ee476e8e Fix up some of the vc++ include mess that we had going
Cleanup using namespace statements as well
2015-09-29 16:26:06 +10:00
amaitland 72b1bcab49 Add CefWrapper object to abstract some of the boiler plate stuff like ThrowIfDisposed and IsDisposed
Fix up incorrect namespaces (move to Internals)
2015-09-01 12:10:42 +10:00
amaitland 330e6b38b0 Add IsDisposed property to interface objects
Fixes #1223
2015-08-31 13:32:48 +10:00
amaitland d766cc826e The Message should be sent on the corresponding browser, not just the first browser - handle popups
Remove browserId from the message as it shouldn't be required now
2015-07-09 12:01:44 +10:00
amaitland 2129c1907e Remove IBrowserAdapter from Frame and Browser wrappers - now directly cast CefClient to ClientAdapter so can execute js 2015-06-29 14:03:10 +10:00
Bill Tutt a7ba17fbc2 The changes continue... 2015-06-08 22:48:29 -04:00
amaitland d0d409a8fd Rename LoadHtml to LoadStringForUrl (Internal method is LoadString, for some reason that causes the compiler a problem as there is a define already aliasing LoadString).
LoadHtml was a somewhat conflicting name with the LoadHtml extension methods that use a ResourceHandler to load the html
2015-05-27 17:44:03 +10:00
amaitland 2f40861dca Use default params on the IFrame interface to provide the ExecuteJavaScriptAsync overload 2015-05-21 13:51:45 +10:00
Bill Tutt adb5ae0d77 More work on wrapping CefBrowser/CefFrame. 2015-05-17 17:41:44 -04:00
Bill Tutt 21efc10628 Use .Net friendly property names. 2015-05-04 19:15:57 -04:00
Bill Tutt ac0b52d646 Return Async task for GetSource/GetText based on review. 2015-05-04 18:52:34 -04:00
Bill Tutt 3d4f2a76d6 Add extra overload based on feedback. 2015-05-04 18:39:17 -04:00
Bill Tutt 872cb06c71 Part 1 of Wrap CefBrowser. 2015-05-02 23:32:22 -04:00