Commit Graph

6294 Commits

Author SHA1 Message Date
Alex Maitland 8b9a5e21c1 WinForms - Designer avoid calling Cef.Shutdown on Application.Exit 2022-02-23 11:06:00 +10:00
Alex Maitland 8927a33503 Example - Remove some old Pepper Flash references 2022-02-22 11:56:24 +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 009687f7dd Core - SetCrashKeyValue fix key not being passed to CEF 2022-02-22 11:33:47 +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 54bd29a551 Core - Fix typo 2022-02-22 11:17:40 +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 b50f7b40a8 README.md/CONTRIBUTING.md - Update as M98 has been released 2022-02-17 12:45:53 +10:00
Alex Maitland e4e6cb8f7a IResourceRequestHandlerFactory - Clarify HasHandlers documentation
Follow up to #3998
2022-02-14 13:59:02 +10:00
Alex Maitland ad41e1d6aa Nuget - Add CefSharpTransformXmlDllPathOverride
Allow for setting a custom location for CefSharpTransformXmlDllPath
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 12d28b6c02 WinForms - Add new IWinFormsChromiumWebBrowser interface
- Common interface of ChromiumHostControl and ChromiumWebBrowser
- WinForms Example Fix removing of Tab
2022-01-31 12:54:18 +10:00
Alex Maitland 746925b1f7 WinForms - Make ChromiumHostControlBase.FromBrowser public
- Can be used to get the ChromiumHostControlBase instances from the IBrowser instance
2022-01-31 11:35:46 +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 5704dba5aa Net Core - Fix failing test
- WaitForQUnitTestExeuctionToComplete was renamed to CreateBrowserAndWaitForQUnitTestExeuctionToComplete
2022-01-30 09:01:53 +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 c0aae6842f Test - Add IntegrationTestFacts.LoadJavaScriptBindingAsyncTaskQunitTestsSuccessfulCompletion
- Runs the AsyncTask binding tests
2022-01-27 16:06:13 +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
Alex Maitland f043040276 Contributing/BugReport - Update as 97.1.60 released 2022-01-27 16:02:32 +10:00
Alex Maitland 1c1aa6384e Update CONTRIBUTING.md
Update cefclient command line args.
2022-01-27 05:42:13 +10:00
chylex 48280b7d32 Fix not disposing callback in ResourceHandler.Skip (#3978) 2022-01-21 15:09:35 +10:00
Alex Maitland dc9d0a2cca README.md - Version 97 release 2022-01-18 12:59:59 +10:00
Alex Maitland a4a6fb20c7 Core - CefResourceRequestHandlerAdapter.GetCookieAccessFilter object reference not set to an instance of an object.
For resource requests that are handled by CefRequestContextHandlerAdapter::GetResourceRequestHandler
then _browserControl field will be null, added additional checks before calling TryGetBrowserCoreById

Follow up to https://github.com/cefsharp/CefSharp/commit/4ade0b8284d4f95f763c471a867139bff2bac2a9

Issue #3967
2022-01-18 11:04:12 +10:00
campersau 5e16914d9a OffScreen - Fix ResizeAsync with deviceScalingFactor (#3964)
* OffScreen - Fix ResizeAsync with deviceScalingFactor

* OffScreen - Fix CaptureScreenshotAsync Width / Height calculation to include X and Y

Always apply Scale changes
2022-01-18 11:03:44 +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
campersau 0401cf8abe Test - Fix CanEvaluateDoubleValues by not relying on the current culture (#3966) 2022-01-16 07:37:56 +10:00
Alex Maitland 137a4bbe6f WPF - Update CleanupElement when PresentationSource changes
- If the CleanupElement is a Window then move it to the new Window
2022-01-15 11:20:07 +10:00
Alex Maitland 4dba51955b OffScreen - CaptureScreenshotAsync only resize if larger and support clip 2022-01-15 11:20:06 +10:00
Alex Maitland d179fe55c6 DevTools Client - Upgrade to 97.0.4692.71 2022-01-11 10:04:33 +10:00
Alex Maitland 409c8a85f4 WinForms - Add ChromiumWebBrowser.FromBrowser static method
- Can be used to get ChromiumWebBrowser instance from IBrowser instance
- Added generic base implementation to reduce code duplication
2022-01-10 14:10:26 +10:00
Alex Maitland e8bd3cc616 README.md - Update release tab as version 97 is coming soon 2022-01-10 13:44:30 +10:00
Alex Maitland 01b7a4330e WinForms - Add LifeSpanHandler.OnBeforePopupCreated
- Allow for cancelling of popup creation

browser.LifeSpanHandler = CefSharp.WinForms.Handler.LifeSpanHandler
	.Create()
	.OnBeforePopupCreated((chromiumWebBrowser, b, frame, targetUrl, targetFrameName, targetDisposition, userGesture, browserSettings) =>
	{
		//Can cancel opening popup based on Url if required.
		if(targetUrl?.StartsWith(CefExample.BaseUrl + "/cancelme.html") == true)
		{
			return PopupCreation.Cancel;
		}

		return PopupCreation.Continue;
	})
2022-01-10 13:44:30 +10:00
Alex Maitland 4ade0b8284 Core - ResourceRequestHandler now passes a long lived instance of IBrowser
- The methods in CefResourceRequestHandlerAdapter previously passed on a scoped instance of
  IBrowser which would have been disposed when the method was executed. This made it very
  difficult to use the callback in OnBeforeResourceLoad so now we check to see if we
  already have an IBrowser instance with the matching Id and only use a scoped instance
  if we don't have a match.
2022-01-10 13:44:30 +10:00
Alex Maitland 0efd241eb3 WinForms - Allow creation of custom ChromiumHostControl instance
- Add new CreatePopupChromiumHostControl delegate which can be passed to
  LifeSpanHandler.Create to create a new ChromiumHostControl instance.
  You can create a class that inherits from ChromiumHostControl and add
  additional functionality.

LifeSpanHandler
  .Create(() =>
  {
     return new ChromiumHostControl
     {
       Dock = DockStyle.Fill
     };
})
2022-01-10 13:44:29 +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 604e9570f7 WinForms - Improve xml doc 2022-01-05 13:20:33 +10:00
Alex Maitland 00254b9377 README.md - Add CefSharp.Wpf.HwndHost package links 2022-01-05 13:14:17 +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 463df86f3c UpdateNugetPackages.ps1 - Update assembly/build version as part of script
- UpdateNugetPackages.ps1 now calls .\build.ps1 -Target update-build-version
2022-01-05 10:52:14 +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 27816d54b8 Core - Change from using GetBrowser() method to BrowserHost
- BrowserHost will return null if not set where GetBrowser() will throw an exception
2022-01-05 10:14:24 +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