Commit Graph

2231 Commits

Author SHA1 Message Date
Alex Maitland b160c1dd4d Upgrade to CEF 100.0.12+g734f820+chromium-100.0.4896.60 / Chromium 100.0.4896.60 2022-04-01 17:30:31 +10:00
Alex Maitland 0ac43cf69f Core - Remove Remaining Plugin APIs
- Remove plugin references
- Update xml doc comments
- Update ref assembly (netcore)
- Update examples

Issue #4045
2022-03-21 10:01:26 +10:00
Alex Maitland e6d9aba3f6 Upgrade to CEF 100.0.11+g45b9728+chromium-100.0.4896.46 / Chromium 100.0.4896.46 2022-03-21 09:10:44 +10:00
Alex Maitland 181271630c Upgrade to CEF 99.2.12+g2977b3a+chromium-99.0.4844.74 / Chromium 99.0.4844.74 2022-03-18 09:29:12 +10:00
Alex Maitland f52740b796 DevTools Client - Upgrade to 99.0.4844.51 2022-03-07 13:19:36 +10:00
Alex Maitland 87f161dd0f Upgrade to CEF 99.2.9+gf426765+chromium-99.0.4844.51 / Chromium 99.0.4844.51 2022-03-06 09:21:16 +10:00
Alex Maitland f6aff4f075 Upgrade to CEF 99.2.7+g674fc01+chromium-99.0.4844.51 / Chromium 99.0.4844.51 2022-03-04 20:46:59 +10:00
Alex Maitland 08f3a4015d Core - Update CefErrorCode (99.0.4844.27)
https://raw.githubusercontent.com/chromium/chromium/99.0.4844.27/net/base/net_error_list.h

Resolves #4015
2022-02-22 11:51:31 +10:00
Alex Maitland 6bb262e7bb Core - Update ContextMenuMediaState values to match Chromium
- Enum updated
- Other enum values added to related enums

Resolves #4014
2022-02-22 11:45:58 +10:00
Alex Maitland 3d39238a93 Core - Code cleanup
- Make more classes sealed
- Add xml doc
- Add serializable constructor
2022-02-22 11:33:18 +10:00
Alex Maitland 597e54fc11 IBrowserHost.Find remove identifier param
Resolves #4013
2022-02-22 11:17:56 +10:00
Alex Maitland 0d5e830c27 Upgrade to CEF CEF 99.2.3+g962d9c9+chromium-99.0.4844.27 / Chromium 99.0.4844.27 2022-02-22 10:41:32 +10:00
Alex Maitland e4e6cb8f7a IResourceRequestHandlerFactory - Clarify HasHandlers documentation
Follow up to #3998
2022-02-14 13:59:02 +10:00
Santosh M Ghanti 9e0236876c Sync Javascript Binding - Add support for property interception (#3935)
* Core - added support for property interceptor

* Incorporated the review comments

* Incorporated the review comments 2

* Review comments exclude trygetproperty and trysetproperty for .netcore app

* Added the unit test cases for trygetproperty and trysetproperty

* Fixed .net core app build failure

* Added the separate test case for property interceptor

Co-authored-by: sghanti <santosh_ghanti@intuit.com>
2022-02-14 13:58:35 +10:00
Craig Fowler 535671658c Update docs for IResourceRequestHandlerFactory (#3998)
I have just discovered that when HasHandlers returns false, the GetResourceRequestHandler method is never executed.  Presumably this is an optimisation which happens inside of Chromium, as I can see that the HasHandlers property value goes all way back to the C++ native project.

I was about to suggest removing this optimisation because it'd be trivial to optimise and return early inside the default factory impl in C# world.  If it goes all the way down to Chromium then that's less easy and so the next best thing would be to document it.
2022-02-14 13:50:00 +10:00
Alex Maitland 3b1c46aab9 Code Cleanup - Minor code cleanup
- Add Microsoft.CodeAnalysis.NetAnalyzers package
- Make some classes sealed
- Fix/Add xml doc
2022-02-01 14:07:01 +10:00
Alex Maitland 21efaf3c46 Upgrade to CEF 98.1.12+gd87e3f4+chromium-98.0.4758.55 / Chromium 98.0.4758.55 2022-01-31 11:30:22 +10:00
Alex Maitland cd225bc169 Async JavascriptBinding - Return null instead of empty object for async Task methods
Resolves #3980
2022-01-27 17:37:49 +10:00
Alex Maitland 8b247a6a37 Javascript Binding - IJavascriptCallbackProxy.ExecuteAsync correctly creates pending task using callback Id
- Previously a new PendingTask(TaskCompletionSource) was created using a new Id which worked when the Ids matched
  between the browser and render process. If you skipped executing a callback then the Ids would get out of sync.

Issue #3979
2022-01-27 16:03:22 +10:00
chylex 48280b7d32 Fix not disposing callback in ResourceHandler.Skip (#3978) 2022-01-21 15:09:35 +10:00
campersau 543e9d9d9d Core - Update CefErrorCode (#3965)
Using https://raw.githubusercontent.com/chromium/chromium/97.0.4692.71/net/base/net_error_list.h
2022-01-18 11:03:04 +10:00
Alex Maitland d179fe55c6 DevTools Client - Upgrade to 97.0.4692.71 2022-01-11 10:04:33 +10:00
Alex Maitland 571a1db548 Core - Further migration of extensions methods from IWebBrowser to IChromiumWebBrowserBase
- EvaluateScriptAsync can now be used from IChromiumWebBrowserBase, if also IWebBrowser then
main frame check will occur as previous.

Related to #3944
2022-01-10 13:44:29 +10:00
Alex Maitland 288825d30c Core - IFrame.EvaluateScriptAsPromiseAsync add javascriptBindingApiGlobalObjectName
- Defaults to null, only required if you set JavascriptBindingSettings.JavascriptBindingApiGlobalObjectName
2022-01-10 13:44:29 +10:00
Alex Maitland 82d7ae7ab2 Upgrade to CEF 97.1.1+g50067f2+chromium-97.0.4692.71 / Chromium 97.0.4692.71 2022-01-10 13:44:29 +10:00
Alex Maitland 2a9826601b Core - Change WebBrowserExtensions replace IWebBrowser with IChromiumWebBrowserBase where possible
- Improve xml doc comments also
2022-01-10 13:44:28 +10:00
Alex Maitland 0ae18addc1 Core - ExecuteScriptAsync(script) incorrectly appends braces and semicolon to script.
Issue #3944
2022-01-10 13:44:28 +10:00
Alex Maitland d45aaff7ca Upgrade to CEF 97.0.11+g695453b+chromium-97.0.4692.71 / Chromium 97.0.4692.71 2022-01-05 10:54:41 +10:00
Alex Maitland d0c9adcf9d Core - Add TryGetBrowserCoreById
- Can be used to obtain an IBrowser reference by Browser Identifier (Id).
- Added a couple of basic unit tests.
2022-01-05 10:47:48 +10:00
Alex Maitland 6f0f20f3b2 DevTools - Add SetMainFrameDocumentContentAsync extension method
- Updated example error handlers to use SetMainFrameDocumentContentAsync for displaying error messages
  so back/forward navigation works correctly.
- DevToolsExtensions updated to use IChromiumWebBrowserBase instead of IWebBrowser so they're usable
  for WinForms hosted popups

Issue #2985
2022-01-05 10:09:56 +10:00
Alex Maitland f07be8c5e5 build.ps1 - Add new update-build-version target
Updated Version/AssemblyVersion

Performs some unnecessary tasks, so could be improved
2021-12-16 13:02:24 +10:00
Alex Maitland 8160ec1ce4 Remove IRequestContextHandler.OnBeforePluginLoad and IRequestContext.PurgePluginListCache
Resolves #3924
2021-12-07 14:54:11 +10:00
Alex Maitland 51b2c74801 Core - Fix ExecuteScriptAsync infinite recursion
Resolves #3914
2021-12-01 05:47:01 +10:00
Alex Maitland b72d41353e WinForms - Improve hosting of popups using ChromiumHostControl
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
2021-11-30 13:47:42 +10:00
Alex Maitland 165a05071d WinForms - ChromiumHostControl now has basic events
- Create ChromiumHostControlBase as common base class for ChromiumHostControl and ChromiumWebBrowser
- ChromiumHostControl is now the specific implementation for hosting popups
  Has AddressChanged, LoadingStateChanged, etc events
2021-11-30 13:47:41 +10:00
Alex Maitland a84f623e8e DevTools Client - Upgrade to 96.0.4664.55 2021-11-25 13:36:44 +10:00
Alex Maitland 4d7c354f63 Update build number to 96.0.140 2021-11-25 11:01:57 +10:00
Alex Maitland aa8403a5d6 WPF - Add ChromiumWebBrowser.OnBrowserWasHidden
Can be overridden to keep the browser in a visible state even when it's not displayed
on screen.
2021-11-05 10:29:36 +10:00
Alex Maitland 88cf0a9879 DevTools Client - Upgrade to Chromium 95.0.4638.54 2021-11-01 13:53:33 +10:00
Alex Maitland 52f40e3e84 Core - Update CefErrorCode.DnsNameHttpsOnly
It should be a negative number

https://source.chromium.org/chromium/chromium/src/+/651bd32d5d559010ed5dd44aee0f33c7a0162301:net/base/net_error_list.h;dlc=190de627f4460740328ecffcfadce8bb8d5aec8b
2021-11-01 13:35:03 +10:00
Alex Maitland a7aea1821e Core - WaitForInitialLoadAsync set to Cancelled if control is Disposed 2021-11-01 13:27:09 +10:00
Alex Maitland 4112340e48 Core - LoadUrlAsync require url and remove SyncContext param
- Remove url optional null, a Url is now required and an exception will be
  thrown if null or empty. If the browser wasn't loading an null was passed
  in then the task would have never resolved. This provides a predictable behaviour.
  A new WaitForInitialLoadAsync method was added to simplify waiting for initial
  browser load.
- Remove SynchronizationContext param, best to let the framework handle

Issue #3842
2021-10-28 10:51:18 +10:00
Alex Maitland 4a07af26e9 Core - Rename WaitForBrowserInitialLoadAsync to WaitForInitialLoadAsync and simplify
- Initial intention was to have a reusable method that could be used CefSharp.Wpf.HwndHost,
  upon further deliberation I've decided to build the functionality into the ChromiumWebBrowser.Partial.cs
  and will need to duplicate the functionality in CefSharp.Wpf.HwndHost. This guarantees that the
  Task will be resolved in all cases. The previous implementation there was a theoretical change we'd
  miss subscribing to the relevant events
- Remove CancellationToken as it's not possible to cancel

Issue #3842
2021-10-28 10:31:03 +10:00
Alex Maitland 91b7514a1c WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync
Second attempt at WaitForBrowserInitialLoadAsync, includes optional
CancellationToken param.

Issue #3842
2021-10-27 13:58:57 +10:00
Alex Maitland 9993aa78e0 OffScreen - Create Browser when Global CefRequestContext initialized.
- GlobalContextInitialized wraps a TaskCompletionSource which is resolved
  when the Global CefRequestContext has been created
- Reduce code duplication

If successful we can apply the same changes to WinForms/WPF though they're less likely to have
issues than the OffScreen implementation as the CreateBrowser doesn't happen until much later

Issue #3850 #3634
2021-10-26 14:31:10 +10:00
Alex Maitland 1524482ede Core - Add Cef.InitializeAsync
- InitializeAsyncBrowserProcessHandler is used to complete the taskCompletionSource
  when OnContextInitialized is called
- Update the OffScreen example to be async with a simply SingleThreadSynchronizationContext
  to ensure we continue on our main thread.

Issue #3634
2021-10-22 20:10:38 +10:00
Alex Maitland c7e477b306 WebBrowserExtensions - Hide RegisterJsObject and RegisterAsyncJsObject from intellisense
They're obsolete and will throw exceptions anyway, only exist to point upgrading users to the correct doco
2021-10-22 16:29:21 +10:00
Alex Maitland 0e242a8706 Upgrade to CEF 95.7.10+g00d4ad5+chromium-95.0.4638.54 / Chromium 95.0.4638.54
Remove CefBrowserSettings.universal_access_from_file_urls and CefBrowserSettings.file_access_from_file_urls.
https://bitbucket.org/chromiumembedded/cef/commits/ff33d7f72144

Remove CefBrowserSettings.application_cache
https://bitbucket.org/chromiumembedded/cef/commits/370a7749e950ef6784c29a666d07a0b67148dd5f

Remove ignore_certificate_errors setting
https://bitbucket.org/chromiumembedded/cef/commits/aabe4ce466766f8bd9907e7fa30546a3afada214

RequestContextSettings.IgnoreCertificateErrors was removed, the CefSettings.IgnoreCertificateErrors property
now set the command line arg

Use CefRect for CefWindowInfo bounds
https://bitbucket.org/chromiumembedded/cef/commits/8587cc4e4bbc187aa989152e521318818b3f41d3

Additional overload has been added to pass in a Rect directly to SetAsChild

Rename SendFocusEvent to SetFocus
https://bitbucket.org/chromiumembedded/cef/commits/49a4611e28d7bbc221cff816d7c4a96c55ba2721

SendFocusEvent will now call SetFocus internally, the project internally has been updated to use SetFocus for WPF

Replace CefRequestCallback with CefCallback
https://bitbucket.org/chromiumembedded/cef/commits/3e7f1bb529442a6c7674262d9219df57964e9524

No changes to the API for this, I've kept the same interface and just mapped internally

Resolves #3857, #3667, #3668
2021-10-22 14:45:12 +10:00
Alex Maitland 67a08c47ee BrowserSubProcess/Examples/Tests - Migrate to newer SDK Style projects
- Migrate to new SDK style projects
- Migrate to chromiumembeddedframework.runtime packages
- Remove old packages.config files
- Update post build event for BrowserSubprocess to set TSAware/LargeAddressAware
- Change project build order

Issue #3706
2021-10-12 19:48:11 +10:00
Alex Maitland 544abc68d1 Revert "WinForms/WPF/OffScreen - Add WaitForBrowserInitialLoadAsync"
Tests started failing so will revisit later.

This reverts commit 08e5140060.
2021-10-11 10:14:31 +10:00