Commit Graph

1628 Commits

Author SHA1 Message Date
amaitland 2a96ebc7de Upgrade to CEF 84.3.8+gc8a556f+chromium-84.0.4147.105 / Chromium 84.0.4147.105 2020-08-05 15:48:47 +10:00
Alex Maitland b5a83f526e Enhancement - Pluggable Javascript Naming (#3141)
* Core - Move NameConverter to IJavascriptObjectRepository

- Move NameConverter property from BindingOptions to IJavascriptObjectRepository
- Remove BindingOptions.CamelCaseJavascriptNames

**Breaking Change**

Follow up to https://github.com/cefsharp/CefSharp/commit/898ca38e7a7261b3a42c33b2abf5eac6c022ddde

* Core - Javascript Binding Pluggable Naming Improvements

- Added some basic unit tests (more required)
- DefaultBinder now accepts a IJavascriptNameConverter passed into the constructor
  to allow for conversion of names

* Core - Replace WeakReference with WeakReference<T>
2020-07-27 20:13:16 +10:00
campersau 5e67f789ea Upgrade to CEF 84.3.3 in netcore projects (#3198) 2020-07-23 20:44:44 +10:00
amaitland e8cf336bf3 Net Core - Support for compiling with .Net Core 3.1
- Make Wpf/WinForms/OffScreen projects target AnyCPU
Only the VC++ projects are platform specific now.
- Remove BrowserSubProcess project reference
Not needed as we now have a standalone exe
- Add OffScreen example
- Add WPF Example project
- Fix some compile errors for main solution
- Add BrowserSubProcess executable
- JavascriptObjectRepository remove isAsync param
Rather than throw exception remove the option
- BrowserSubprocess Exclude the WCF specific code from the netCore project
- Add some ifdef/ifndef to exclude the WCF specific implementation
- Move WCF implementation into separate namespace
2020-07-23 15:23:45 +10:00
Konstantin Preißer 5e89f71a44 Add new projects targeting .NET Core 3.1 (#3181)
* Add .NET Core 3.1 projects for CefSharp, CefSharp.Core, CefSharp.BrowserSubprocess.Core, CefSharp.WinForms, CefSharp.Wpf, CefSharp.OffScreen.

Contributes to CefSharp#2796

* - Remove dependencies to "opengl32.lib" and "glu32.lib" which aren't available for ARM64 and don't seem to be needed.
- Clean up project files.

* Switch project CefSharp.netcore.csproj to AnyCPU as it doesn't require different builds for each platform.

* Remove WindowsTargetPlatformVersion property as that is declared in CefSharp.props.

* Use "bin.netcore" and "obj.netcore" as [intermediate] output path for the .NET Core projects, to allow side-by-side builds with the .NET Framework projects.

* Output documentation files.

* Add CefSharp.Example.netcore and CefSharp.WinForms.Example.netcore.

* Follow-up: Remove properties from the example projects that are also not used in the corresponding .NET Framework projects.
2020-07-23 15:21:14 +10:00
amaitland 86e9b712e3 Core - Xml Doc Fixes 2020-07-23 14:56:11 +10:00
amaitland 3e5133dbb3 Upgrade to CEF 84.3.3+gffc2f0e+chromium-84.0.4147.89 / Chromium 84.0.4147.89 2020-07-23 14:56:10 +10:00
amaitland 282e25c8fd Core - Add IBrowser reference to TitleChangedEventArgs/ConsoleMessageEventArgs 2020-07-17 12:41:14 +10:00
Alex Maitland 8d25b71490 Core - Re-Add IAudioHandler (#3153)
Resolves #3152
2020-07-08 08:06:16 +10:00
amaitland 36b35e478b Upgrade to CEF 83.4.2+gc8d4f85+chromium-83.0.4103.106 2020-07-02 09:46:41 +10:00
amaitland bd4cadd2ed Core - Add ExecuteDevToolsMethodAsync extension method
ExecuteDevToolsMethod has to be called exclusively on the CEF UI thread.
This extension method will invoke into the CEF UI thread if required.
2020-06-30 14:48:35 +10:00
amaitland db75e9b6a3 Core - IBrowserHost.AddDevToolsMessageObserver can be run on any thread.
Remove ThrowIfExecutedOnNonCefUiThread as it appears the observer
can be added on any thread.
2020-06-29 13:09:31 +10:00
amaitland 49ee24912d Core - Add support for direct DevTools protocol messaging
Add support for direct DevTools protocol messaging (fixes issue #2961).

This change allows the client to directly send and receive DevTools
protocol messages (send method calls, and receive method results and
events) without requiring a DevTools front-end or remote-debugging
session.

https://bitbucket.org/chromiumembedded/cef/commits/fd6631bd181233d36b98e1327da84c44372add76
2020-06-29 11:12:37 +10:00
amaitland 88aae91ea5 Core - Add IRequestHandler.OnDocumentAvailableInMainFrame
Resolves #3157
2020-06-28 20:08:18 +10:00
amaitland 0bf05e6de7 Upgrade to CEF 83.4.0+gfd6631b+chromium-83.0.4103.106 / Chromium 83.0.4103.106 2020-06-28 20:08:18 +10:00
amaitland 971b7671a6 Core - Allow overriding of enable-features command line arg
Added example of NetworkServiceInProcess

NOTE: Running the Network Service in Process is not something CEF officially supports
It may or may not work for newer versions.
2020-06-19 20:48:25 +10:00
amaitland c1a4db20fd Upgrade to CEF 83.3.12+g0889ff0+chromium-83.0.4103.97 / Chromium 83.0.4103.97 2020-06-09 15:57:25 +10:00
amaitland ae99a30364 Core - IDownloadItemCallback incorrectly disposed on Pause/Resume
Resolves #3145
2020-06-09 14:14:14 +10:00
amaitland ae41e10d71 Core - Javascript Binding Configure Property Name
- Rename settings object to JavascriptBindingSettings
- Validate JavascriptBindingSettings.JsBindingGlobalObjectName in setter to provide immediate
  feedback
- Add FreezableBase which throws exception when frozen (we can reuse this for some other settings classes)
- Add some basic Unit Tests (More would be better)

Follow on from #3126
2020-05-30 19:28:50 +10:00
Geevo 66691105b4 Core - Added ability to configure/customize javascript binding property name. 2020-05-30 18:53:13 +10:00
amaitland c0ba9e9135 Upgrade to CEF 83.3.9+ged43e55+chromium-83.0.4103.61 / Chromium 83.0.4103.61 2020-05-25 20:04:27 +10:00
amaitland a70abc4437 Core - LegacyBinding is now configured per browser
Previously it was global set using CefSharpSettings.LegacyJavascriptBindingEnabled

Now it's configured through IJavascriptObjectRepository.Settings.LegacyBindingEnabled
which defaults to CefSharpSettings.LegacyJavascriptBindingEnabled (until it's removed).

IJavascriptObjectRepository.ResolveObject is raised with LegacyObjects as the name
to allow for easier binding of objects.

Issue #2977
2020-05-23 14:15:33 +10:00
amaitland 35e207d08b Update version number to 81.3.100 2020-05-23 12:05:06 +10:00
deonberlin 7e3159ebd3 WPF - Implement AltGr support. (#3131)
* Fixed #3104 AltGr support.

* Code format adjusted.

* Moved AltGr code to better location within the function.

Co-authored-by: Daniel Bitterlich <bitterlich@deon.de>
2020-05-23 10:13:23 +10:00
amaitland 99cc2d5030 Core - Cef.GetMimeType custom/fallback mimeType mapping
- return application/octet-stream when no mapping found
- Add custom dictionary with some additional mimeTypes, users can add their own to this dictionary
- Add xunit test

Resolves #3041
2020-05-18 11:47:42 +10:00
amaitland b9fba00078 Upgrade to CEF 81.3.10+gb223419+chromium-81.0.4044.138 2020-05-15 20:26:43 +10:00
amaitland 99dd3f4273 Upgrade version number to 81.3.20 2020-05-09 05:56:39 +10:00
amaitland 0f3de6f432 Upgrade to CEF 81.3.2+gb9282cc+chromium-81.0.4044.138 / Chromium 81.0.4044.138 2020-05-09 05:54:38 +10:00
amaitland 1824a0334d WPF/WinForms/OffScreen - CanExecuteJavascriptInMainFrame incorrectly false after loading page with different origin
Proof of concept for a workaround. The frameId for the second OnContextReleased that arrives after the OnContextCreated from
the old render process strangely has a frameId greater than the new frameId

TODO: Unit tests

Issue #3021
2020-05-04 12:34:47 +10:00
amaitland 6b440a84a3 Shutdown - Improve WaitForBrowsersToClose
- Add Cef.PreShutdown
- For WPF hook the DispatcherShutdownStarted and DispatcherShutdownFinished events then call Cef.PreShutdown
- Add NoOpBrowserRefCounter and set as default, needs a little more testing before it's enabled by default.
  Can be enabled by calling Cef.EnableWaitForBrowsersToClose before calling Cef.Initialize

Issue #3047
2020-05-03 21:58:05 +10:00
amaitland e1401e7092 Core - Ensure CachePath/RootCachePath/LocalesDirPath/BrowserSubprocessPath are absolute
CEF now requires this to be absolute, we enforce this by throwing exception if non-absolute

Resolves  #3102
2020-05-03 16:59:57 +10:00
amaitland 2602212f79 Upgrade to CEF 81.3.1+gb2b49f1+chromium-81.0.4044.113 / Chromium 81.0.4044.113 2020-05-03 14:01:48 +10:00
amaitland b71381980c Core - Remove unused files
They were renamed (spelling mistake) and the old ones seem to have been retained,
probably a merge issue
2020-05-02 07:17:43 +10:00
amaitland 3bac04d1d0 Upgrade to CEF 81.2.25+g3afea62+chromium-81.0.4044.113 2020-04-29 07:57:02 +10:00
amaitland bce627097b Upgrade version number to 81.2.210 2020-04-27 17:45:53 +10:00
amaitland f566d99b12 Upgrade to CEF 81.2.21+ge864886+chromium-81.0.4044.113 / Chromium 81.0.4044.113 2020-04-23 05:56:17 +10:00
amaitland 51fef05989 Upgrade to CEF 81.2.17+gb382c62+chromium-81.0.4044.113 / Chromium 81.0.4044.113 2020-04-18 10:52:53 +10:00
amaitland 73e7c5de13 Core - Rename AbstractCefSettings to CefSettingsBase
This is a somewhat cosmetic change so the API Doc looks better, the
classes appear next to each other (CefSettings, CefSettingsBase)
when sorted alphabetically.

Resolves #3093
2020-04-06 14:59:33 +10:00
amaitland defc2c3af6 WinForms - Remove WS_EX_NOACTIVATE style on initial page Load
- When LoadingStateChanged occurs we remove the ExStyle WS_EX_NOACTIVATE flag
- Previous change to the FocusHandler was reverted in 917480da3b

Updated to match the cefclient example
https://github.com/chromiumembedded/cef/blob/9df4a54308a88fd80c5774d91c62da35afb5fd1b/tests/cefclient/browser/root_window_win.cc#L1088

Resolves #2776
2020-04-06 10:48:53 +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 b2dc7bfc0d Upgrade to CEF 80.1.15+g7b802c9+chromium-80.0.3987.163 / Chromium 80.0.3987.163 2020-04-05 07:56:02 +10:00
amaitland 3d3c1c203c Upgrade to CEF 80.1.4+g8927396+chromium-80.0.3987.149 / Chromium 80.0.3987.149 2020-04-03 09:58:37 +10:00
amaitland 270b5c496e WinForms - Dispose of FrameworkCreated BrowserSettings when Control Disposed
If BrowserSettings is FrameworkCreated we dispose of the BrowserSettings object immediately,
this code was in ManagedCefBrowserAdapter::CreateBrowser, now it's duplicated in WPF/OffScreen

The WinForms version has a slightly different behaviour, we keep the browserSettings reference
until the Control is Disposed incase the Control handle is destroyed then Created again.

Issue #2840
2020-04-01 09:42:56 +10:00
amaitland 509c0dfcb5 Upgrade to CEF 80.1.2+g9d2a31e+chromium-80.0.3987.149 / Chromium 80.0.3987.149 2020-03-31 07:14:53 +10:00
amaitland 2b47cf56ce Core - Make ResourceHandler.GetMimeType obsolete
Instead use Cef.GetMimeType to use the Chromium MimeType Mappings

Rather than maintain our own mapping (which is out of date) we'll defer to Chromium.

Make ResourceHandler.FromString(string, string) and ResourceHandler.GetMimeType obsolete, they will be removed at some point
ResourceHandler.FromString uses ResourceHandler.GetMimeType internally, Replacing with ResourceHandler.FromString(resource, mimeType: Cef.GetMimeType(extension));
uses a different overload.

Issue #3041
2020-03-26 08:50:08 +10:00
amaitland 006445df03 MimeType - Add extra checking to Cef.GetMimeType
Also update the ResourceHandler.FromFilePath xml doc to reference Cef.GetMimeType

Issue #3041
2020-03-26 08:50:07 +10:00
amaitland d1279810ff Disable System Wide Flash Installation by Default
Can be re-enabled for a limited time using the enable-system-flash command line arg

Resolves #3048
2020-02-28 11:14:50 +10:00
amaitland 2c5b07d2d0 Upgrade version to 80.0.40 2020-02-27 17:38:00 +10:00
amaitland ec95a7245b Upgrade to CEF 80.0.4+g74f7b0c+chromium-80.0.3987.122 / Chromium 80.0.3987.122 2020-02-27 16:51:17 +10:00
amaitland 31c7e9957a Upgrade version number to 79.1.380 2020-02-27 15:24:18 +10:00