11 Commits

Author SHA1 Message Date
Alex Maitland 7b9e24db55 Core - Upgrade to stdcpp20 (#5215)
* Core - Upgrade to stdcpp20

- Set NOMINMAX
- Change compiler options
- Fix compiler errors

---------

Co-authored-by: amaitland <307872+amaitland@users.noreply.github.com>
2026-02-21 14:48:13 +10:00
Alex Maitland d3e7040ff5 Add IBrowser.GetAllFrames 2024-03-12 06:32:54 +10:00
Alex Maitland 8d7a169590 Change Frame identifier from Int64 to String (#4740)
* Change Frame identifier from Int64 to String

Issue https://github.com/cefsharp/CefSharp/issues/4737

* Fix SetCanExecuteJavascriptOnMainFrame frameId parsing

* Add tests

* NetCore Tests - Install missing packages
2024-03-09 06:55:27 +10:00
Alex Maitland 4596d33f1e BrowserSubprocess - TreatWarningAsError for debug builds
Statically cast size_t to int to remove warnings
2021-09-10 10:08:40 +10:00
Alex Maitland a18637facd C++/CLI - Replace NULL with nullptr
Issue #3636
2021-07-31 15:52:56 +10:00
Alex Maitland 0a1a8855c5 Core - Add IBrowser.IsValid
- Add IBrowser.IsValid
- Update xml doc comments
- Remove ExecuteScriptAsync CanExecuteJavascriptInMainFrame check as CEF should now internally queue commands for ExecuteScript and LoadRequest

https://bitbucket.org/chromiumembedded/cef/issues/2421/add-onframecreated-onframedeleted#comment-60616371

Issue #3588
2021-07-22 13:27:36 +10:00
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 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
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 3731dfa931 BrowserSubprocess Wrappers - Fix copyright year 2019-03-21 05:26:23 +10:00
Alex Maitland 70de3a6d9c Add Initial IRenderProcessHandler.OnContextCreated/Released implementation (#2697)
* WinForms/WPF - Dispose of IFrame after calling LoadUrl

* BrowserProcess - Add initial implementation of IRenderProcessHandler.OnContextCreated/OnContextReleased

- IV8Context.Execute is the only method to be implemented so far (execute script without returning a result)
- Wrappers for CefFrame and CefBrowser have yet to be imported yet, still need to determine if they should be included individually or reference to CefSharp.Core added

* BrowserProcess - Add wrappers for Browser and Frame

Ultimately we should probably remove the CefSharp.BrowserSubprocess.Core project and move all the code into a folder/namespace within CefSharp.Core
This would allow us to share the a lot of existing code, major refactor required

* CefSharp.Common.props - Add CefSharpBrowserProcessCore32/64 properties

Make creating your own custom browser process easier

* BrowserProcess - Remove example and add comments about creating your own custom version
2019-03-20 20:33:10 +10:00