Commit Graph

5873 Commits

Author SHA1 Message Date
Alex Maitland 17cdba524c Upgrade to CEF 93.1.14+gf38ce34+chromium-93.0.4577.82 / Chromium 93.0.4577.82 v93.1.140 2021-09-19 12:04:45 +10:00
Alex Maitland e2d3dce681 Nuget - Use PlatformTarget instead of CefSharpPlatformTarget for copy targets
CefSharpPlatformTarget isn't defined on initial load
2021-09-10 16:00:36 +10:00
Alex Maitland 71a7efd0c3 Update build version to 93.1.111 v93.1.111 2021-09-10 14:59:07 +10:00
campersau e60126ae17 Readme - Make API reference link version independent (#3797) 2021-09-10 14:35:50 +10:00
Alex Maitland 79f2503e53 WinForms Example - Set BrowserTabUserControl Bounds on creation to create browser at final size
Previously the ChromiumWebBrowser instance was created smaller and resized to fill, this would
show a black region that's resized.
Set the initial Bounds to improve the sizing
2021-09-10 14:35:40 +10:00
Alex Maitland 8e58174224 Core - FrameHandler track frame lifecycle
- FrameHandler now tracks frame creation and removal and reuses the IFrame reference
- CefFrameWrapper no longer throws exception if accessing Identifier for invalid frame, this appears
to be a valid use case now which makes sense otherwise we'd never be able to identify the frame.

Resolves #3588
2021-09-10 14:35:29 +10:00
Alex Maitland 3affa0b16f DevTools Client - Add Event error handling
- New event that is raised when an exception occurs during converting a response to JSON
- Test cleanup
- New unit test to validate IEventProxy has been removed from ConcurrentDictionary

Resolves #3787
2021-09-10 14:35:29 +10:00
Alex Maitland 880c466267 Core - IStringVisitor.Visit check for empty string
Speculative fix for #3779
2021-09-05 15:41:44 +10:00
Alex Maitland 88a53557a6 Core - Update CefSettings.UserDataPath xml doc
Updated to reflect Widevide CDM changes

Issue #3767
v93.1.110-pre
2021-09-05 12:10:29 +10:00
Alex Maitland a16f16d040 README.md - Add cefsharp/93 branch 2021-09-05 11:02:38 +10:00
Alex Maitland 03e441db9c Net Core - Update Nuget Readme.txt to include ARM64 2021-09-05 10:59:33 +10:00
Alex Maitland ba7ea5bd12 DevTools Client - Upgrade to Chromium 93.0.4577.63 2021-09-05 10:59:33 +10:00
Alex Maitland 8c5c8bd2bd Net Core - Update Ref Assembly Generated Code 2021-09-05 10:33:37 +10:00
Alex Maitland 9140c08a34 WPF - Re-add Resize Hack for when browser switches from hidden to visible (#2779)
Problem still reproduces, so readding hack to release branch
2021-09-05 10:18:22 +10:00
Alex Maitland 61138ecf3e Appveyor - Update to Release CI build version no 2021-09-05 10:13:02 +10:00
Alex Maitland 464232538a Net Core/Net 5 - Improve CefSharp.Common.NETCore.targets RID handling
Resolves #3773
2021-09-04 14:08:05 +10:00
Alex Maitland 9567d14ab2 Core - FrameHandler update object lifespan (again)
- Only OnFrameCreated provides a heap managed IFrame reference
  this should be sufficient to keep track of frames using a
  Dictionary in FrameHandler
- Xml doc updates
- Reorder IFrameHandler methods

Issue #3588
2021-09-03 20:41:48 +10:00
Alex Maitland 7937f78b6f Core - OnFrameCreated/OnFrameAttached/OnFrameDetached allocate IFrame on managed heap
- Previously they were stack allocated and disposed when out of scope, they're now managed heap allocated
  to allow for users to keep a long lived reference.

FrameHandler still needs to be updated to deal with Disposing of the references.

Follow up to #3757

Issue #3588
2021-09-03 20:21:22 +10:00
campersau 8d98043000 Core - Add IFrameHandler (#3757)
* Core - Add IFrameHandler/FrameHandler
* Update comments
2021-09-03 20:13:42 +10:00
Alex Maitland cf00a45833 DevTools Client - Simplify Strongly Typed Event handling (#3777)
* DevTools Client - Simplify Strongly Typed Event handling

Now it's only possible to register one System.Type per event.

- Remove RegisterEventHandler
- Add AddEventHandler and RemoveEventHandler
- Change constraint from DevToolsDomainEventArgsBase to EventArgs

https://github.com/cefsharp/CefSharp/issues/3666

* Changes were based on https://github.com/CefNet/CefNet.DevTools.Protocol

Add links to original source files

* Reset stream position

* AddEventHandler - Use GetOrAdd for Thread safety

* AddEventHandler - Fix double event handler registration for first call

* RemoveEventHandler - Remove IEventProxy when handler null
2021-09-03 20:10:42 +10:00
Alex Maitland 704f24bab9 Update build version number to 93.1.110 2021-09-03 19:39:40 +10:00
Alex Maitland 90b631a5ad WPF - Add TODO regarding shutdown support for multiple dispatchers 2021-09-03 14:51:17 +10:00
Alex Maitland c62563c52c Upgrade to CEF CEF 93.1.11+g9e254fa+chromium-93.0.4577.63 / Chromium 93.0.4577.63 2021-09-03 11:42:32 +10:00
campersau 1cdb21960c Core - Update CefErrorCodes (#3785)
Using https://raw.githubusercontent.com/chromium/chromium/92.0.4515.176/net/base/net_error_list.h
2021-09-03 10:54:41 +10:00
campersau 449cb30b0b AppVeyor - Build both solutions and use dotnet test 2021-09-03 10:53:28 +10:00
Alex Maitland d350cad52a Update to M93 (#3781)
* Upgrade to CEF 93.1.7+g9117d6a+chromium-93.0.4577.42 / Chromium 93.0.4577.42

- Core - Add basic ref counting implementation

IMPLEMENT_REFCOUNTING implementation uses atomic which
forces the VC++ compiler to compile as native which doesn't work for our managed ref classes.

    - Use InterlockedCompareExchange for custom ref count reads
    - Use InterlockedIncrement/InterlockedDecrement directly
    - There's no memory barrier for HasOneRef/HasAtLeastOneRef as the read of a LONG should happen in one operation
on 32/64 bit architectures (at least that's my understanding at this point in time).

    References:
    https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_x86_msvc.h#L125
    https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_arm64_msvc.h#L107
    https://github.com/chromiumembedded/cef/blob/4472/include/base/cef_atomic_ref_count.h#L114
    https://github.com/chromiumembedded/cef/blob/4472/include/cef_base.h#L91

-  Remove Microsoft.Net.Compilers package from projects
Now that we require a min of VS2019 to build there's no need for a custom compiler package
- Start removing VS2015/VC++2015 references
- Remove RegisterWidevineCdm
This is a breaking change. CEF will now automatically download the Widevine CDM component
Resolves #3767

- RequestContext.LoadExtension now uses managed to code spawn on CEF UI Thread
Avoid having to use cef_callback.h which was causing problems for x86 builds
2021-09-03 10:51:18 +10:00
Jozef Izso 5d14f7c159 Add property Cef.IsShutdown to allow checks for the shutdown state of Cef runtime (#3782) (#3783) 2021-08-31 07:15:55 +10:00
Alex Maitland 46e9a1b34e Example - Update CaptureScreenShotAsPng to use strongly typed DevTools client 2021-08-28 14:08:43 +10:00
campersau 898b843d5d DevTools - Add GetNextDevToolsMessageId to IBrowserHost (#3774) 2021-08-28 11:44:12 +10:00
Alex Maitland d069714c8a Update README.md and cefclient links (92.0.260 release) 2021-08-26 10:30:53 +10:00
Alex Maitland e7c4c726ed Core - Remove Cookie.Creation/LastAccessed setters
Resolves #3741
2021-08-25 10:48:58 +10:00
Alex Maitland e03b166c0c .Net Core/.Net 5 - Module Initializer When CurrentFolder IsNullOrEmpty use AppContext.BaseDirectory
Resolves #3772
2021-08-25 09:58:03 +10:00
Alex Maitland e00b1ce0bf WPF - SendKeyEvent use VK_MENU instead of VK_RMENU || VK_LMENU
Follow up to https://github.com/cefsharp/CefSharp/pull/3769
2021-08-25 09:35:57 +10:00
spinalcord b86aa00c41 WPF - Support ALT(Left) and ALT GR (Right) Key (#3769)
Allows also to use the left ALT key, which necessary to input symbols e.g. german keyboard layout.
2021-08-25 09:28:08 +10:00
campersau aae39fc1e5 WPF - Check for "ax_tree_id" and avoid referencing IValue in class member (#3770) 2021-08-25 09:13:41 +10:00
amaitland 5c729c2b22 Upgrade DevTools to Chrome 92.0.4515.131 2021-08-14 13:38:55 +10:00
Alex Maitland ceda8fe390 Upgrade to CEF 92.0.25+gd15cfa8+chromium-92.0.4515.131 / Chromium 92.0.4515.131 2021-08-14 13:38:51 +10:00
Alex Maitland b13c8ad41d DevToolsClient - AccessViolationException: Attempted to read or write protected memory
Issue #3725
2021-07-31 17:11:15 +10:00
Alex Maitland a18637facd C++/CLI - Replace NULL with nullptr
Issue #3636
2021-07-31 15:52:56 +10:00
Alex Maitland b24cd8e2d7 C++/CLI - Replace OVERRIDE with override
OVERRIDE was a CEF macro which has been removed, use standard compliant override

Issue #3636
2021-07-31 15:52:55 +10:00
Alex Maitland 018aefcda0 Core - Throw exception if calling Cef.Initialize after calling Cef.Shutdown 2021-07-31 15:52:54 +10:00
ValentinNikin d0bdc735eb Updated example for Audio Handler (#3724)
* Implemented example for Audio Handler

* Rename AudioHandlerExample to AudioHandler

* Allow unsafe code

* Remove UnmanagedMemoryStream using

* Fix problem with build

* Allow unsafe code for .NET Core project

* Remove excess PropertyGroup

Co-authored-by: Valentin Nikin <nikin.v@tecomgroup.ru>
2021-07-31 06:30:59 +10:00
Alex Maitland 6cf756f25a WPF - WritableBitmapRenderHandler ArgumentOutofRange
Resolves #3474
2021-07-30 10:29:52 +10:00
Alex Maitland e99fab4091 WinForms Example - TabulationDemoForm defer browser creation
- Was creating the chromiumWebBrowser instance too early and thus calling Cef.Initialize
before our example code resulting in an exception
2021-07-29 11:15:48 +10:00
Alex Maitland 929470e5bc WinForms Example - Remove MultiFormFocusHandler
- No longer needed as it's identical to the DefaultFocusHandler implementation.
- Minor code cleanup, no longer need to pass through multithreadedmessageloop param
2021-07-29 11:11:39 +10:00
Alex Maitland e5f2381351 WinForms/WPF/OffScreen - Use custom FocusHandler when disposing to block taking focus
This was added as a workaround for Issue #3715 which is specific to WinForms
and will hopefully be fixed upstream.

I've added the logic to all three implementations as I think the behaviour should be
consistent across all implementations.
2021-07-27 13:13:17 +10:00
Alex Maitland f48c6567ea WinForms Example - Remove redundant code
The Focus handler when multithreaded message loop = true is already null as
we check if running on CEF UI Thread before creating the instance in the ChromiumWebBrowser.OnAfterBrowserCreated
2021-07-27 13:06:49 +10:00
campersau 9a37ebdbd3 DevTools Client - Generic ExecuteDevToolsMethodAsync and add RegisterEventHandler (#3674)
* Make ExecuteDevToolsMethodAsync generic

* Make RegisterEventHandler generic

* PR feedback and added test for registering multiple event handlers

* Updated generated code to latest version

* Fix possible NRE when removing event listener before adding one
2021-07-26 12:01:46 +10:00
Alex Maitland 8fb2e414b6 Nuget - Manually copy CefSharp Common files after initial Nuget restore
Follow up to https://github.com/cefsharp/CefSharp/commit/24d64c427e8d41709230baf460cb8c803048dc54
2021-07-24 16:13:10 +10:00
campersau b83bebb042 WPF - Simplify Support Shift + AltGr (#3701) 2021-07-24 15:46:44 +10:00