Commit Graph

31 Commits

Author SHA1 Message Date
Alex Maitland 65534275b7 Core - Upgrade to newer SDK Style project
- Upgrade CefSharp.Core.csproj
- Upgrade CefSharp.csproj
- Ensure pdbs are generated for release builds with same settings as before

Issue #3791
2021-09-20 11:32:14 +10:00
Alex Maitland 172ee5afe8 Migrate from GitLink to Source link
Resolves #3036
2021-09-07 12:08:56 +10:00
Alex Maitland e4e0f22ca7 WinForms/WPF/OffScreen - Upgrade to SDK style projects and multi-target net452 and net462
Haven't tested the output nuget packages yet, we might still need to change the nuspec files to add a
dependency group.

Issue #3791
2021-09-05 15:09:35 +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
Alex Maitland 3dc37b2dd2 WinForms - Add LifeSpanHandler implementation capable of hosting popups as Tabs/Controls (#3529)
* WinForms - Add LifeSpanHandler implementation capable of hosting popups  as Tabs/Child controls in WinForms

- Update Example
- Remove PopupAsChildHelper and example LifeSpanHandler
- Examples always opens popups as tabs now.
- Improve xml doc and comments
- Make ParentFormMessageInterceptor public
- Make ChromiumHostControl public, move into CefSharp.WinForms.Host namespace
  Rather than having the class in the CefSharp.WinForms namespace and potentially
  confuse users, move into it's own namespace.
- Clarify ShowDevToolsDocked needs to be used with the new WinForms lifespan handler
2021-06-04 14:51:49 +10:00
Alex Maitland e1b0d07c17 WinForms - Add ChromiumRenderWidgetHandleFinder/ChromiumWidgetNativeWindow
Used to hook the low level HWND and get message (e.g. mouse messages)

Updated the example
2021-05-11 20:39:57 +10:00
Alex Maitland 8a367fbdc4 Refactor CefSharp.Core into CefSharp.Core.Runtime (#3311)
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll

Partial rename, only Net Core, folder not renamed

* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore

Remove GenApi

* Core - Rename CefDragDataWrapper to DragData

Move into CefSharp.Core namespace

* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package

* Net Core - Refactor to have CefSharp.Core.dll contain only public Api

* Net Core - Remove CefSharp.Core.RefAssembly

* Net Core - Change CefSharp.Core.netcore output folder

* Net Core - Restructure nuget packages

* Net Core - Add Cefsharp.Core.Runtime.RefAssembly

* Net Core - Hide CLI/C++ classes from intellisense

Make sure users don't attempt to load them directly

* Rename CefSharp.Core to CefSharp.Core.Runtime

* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant

Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version

* Rename CefSharp.Core.netcore to CefSharp.Core

* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU

As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll

* Convert RequestContextBuilder from C++ to C#

Now part of the CefSharp.Core PublicApi

* Update version number to 87.1.11

* Migrate more of the public Api to C#

* Net Core - Basic restructure complete

* Net Core - ModuleInitializer (Doesn't work yet)

* Remove direct references to BrowserSettings

* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl

* Net Core - Load libcef.dll via CLR Module initializer

If no RID is specified then we can load libcef.dll using the module initializer

* Add version to CefSharp.Core

* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets

* AnyCPU app.config transform

Improve AnyCPU support

* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU

* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore

* Fix Typos

Based on #3306

* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file

* Net Full - Generate CefSharp.Core.Runtime Ref Assembly

For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project

* Net Core - Old packages copy files to required folders

* Test - Install newer .Net Compiler and set Lang Version to 7.3

* Net Core - Exclude Net 452 Runtime generated reference source

* Core - Add Refactoring TODO

* Ref Assembly - Generate source as part of build

- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build

Runs locally, see if Appveyor has a problem with the powershell script execution

* Core - Add more factory methods to create instances of managed wrappers

* Net Core - Make Initialzier properties internal

Not quite sure what the public API should look like as yet, so making internal for now.
2020-12-16 10:47:34 +10:00
Alex Maitland c0ef404213 Core - VS2019 Invalid option '7.3' for /langversion
When building CefSharp3.sln under VS2019 the Microsoft.Net.Compilers (version 2.4) is passed version 7.3 for c# version
Version 2.4 supports a maximum of version 7.1, the issue doesn't happen on VS2015 or VS2017
Hard code LangVersion in csproj files

CS1617	Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default, Latest or a valid version in range 1 to 7.1.

https://stackoverflow.com/questions/46419760/using-c-sharp-7-1-with-msbuild
2020-11-06 13:13:28 +10:00
amaitland 3372ce8a57 Build - Generate Ref Assemblies for .Net 4.5.2 assemblies
Only for Release builds.

This appears to work as expected under VS2017, not sure about VS2015
Roslny .Net compiler upgraded to 2.4 allows for Ref Assembly generation
2020-10-21 18:10:04 +10:00
amaitland 5d4897f4c6 Core - Add Microsoft.Net.Compilers 2.4
This is the last version to support .Net 4.5.2
Set allowedVersions="2.4"  to stop from updating to a newer version which won't compile under VS2015
2020-10-21 17:55:29 +10:00
amaitland 0183c429e0 WPF/WinForms/OffScreen - Reduce Code Duplication Initial
- Add ChromiumWebBrowser.Partial.cs and include in all three projects
- Remove InternalsVisibleTo from Cefsharp.dll start moving code into the partial class
  (We don't want to publish our internals as part of our Ref Assembly so this goings together)

#3082
#3197
2020-08-07 14:24:07 +10:00
amaitland 1e88322b7d WinForms - Rename WinFormsWebBrowserExtensions to WebBrowserExtensions
Let's just keep it simple, we're in the WinForms namesapce, so we already know the context.
2019-12-10 08:09:22 +10:00
amaitland d87e795000 WinForms/Wpf/OffScreen - Create specific CefSettings class for each version
- This is a breaking change as there is no common `CefSharp.CefSettings`, there is no `CefSharp.Wpf.CefSettings`, `CefSharp.WinForms.CefSettings` and `CefSharp.OffScreen.CefSettings`
 - Cef.Initialize has been removed, the `ChromiumWebBrowser` constructor will call the `Cef.Initialize` with the defaults for your flavour
 - CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled

Resolves #2477
2018-08-02 10:47:12 +10:00
Chris 29fc52e6da Revert build breaking change (#2262) 2018-02-05 10:35:32 +10:00
amaitland bfbd30cce5 WinForms - Add custom Designer
Add some custom designer attributes
Converted the logo.png to a 16x16 bmp as a short term placeholder (someone is welcome to contribute something better)
Hide all the handlers from the designer
2018-02-02 15:51:21 +10:00
amaitland 54f7fccdaa Upgrade to .Net 4.5.2
Resolve #1572
2016-05-10 20:28:21 +10:00
amaitland 71ce888073 First steps to publishing a symbols package
Add pdb files to nuspec - they're only included when the -symbol flag is used
Add src files to nuspec - they're only included when the -symbol flag is used
Update appveyor.yml to push symbol packages to the MyGet feed
Add -symbol flag to build.ps1 so the symbol packages are generated
WinForms project not outputs pdb files
WinForms release builds are not optimized - probably should have been already
2016-02-26 11:49:52 +10:00
amaitland b4b0cf1d7e Move the IWinFormsWebBrowser interface into the WinForms project 2015-05-22 11:06:16 +10:00
rassilon 7c3dcb656e * Code Review changes
* Add float right select drop down for additional move test.
2015-02-11 17:30:33 -05:00
rassilon 7a8498bb69 Add System.ServiceModel reference. 2015-02-04 20:14:12 -05:00
rassilon e921b1b818 Add new file to project. 2015-02-04 02:04:05 -05:00
amaitland 6e30c097dd Another attempt at getting focus to work correctly - Simplest approach possible this time 2015-01-29 20:58:47 +10:00
amaitland 584baa2170 Remove User32.cs and implement Focused methods in NativeMethodWrapper 2014-12-30 16:23:36 +10:00
amaitland fc96909e0c Move User32 from CefSharp to CefSharp.WinForms 2014-11-27 20:28:44 +10:00
amaitland 9cf234fc20 Missing include in CefSharp.WinForms.csproj (VS doesn't always save projects unless you ask nicely) 2014-11-26 13:38:42 +10:00
jankurianski 4804efd306 WinForms: don't report size changed when Size is 0x0.
This occurs when the control is on a modeless Form and it is minimized.
Same guard is in cefclient.
2014-10-14 11:27:46 +11:00
jornh 311cb9c9dd Generate XML documentation for x64/Release builds 2014-10-05 09:38:56 +02:00
Per Lundberg de0f1fefac Renamed the WinForms WebView to ChromiumWebBrowser, in line with how System.Windows.Forms.WebBrowser is named. (and our browser control is arguably very similar in nature to the Microsoft ones) 2014-06-02 12:50:55 -07:00
JanEggers 52bfa60c23 remaining stuff that i desired to put in on changeset 2014-03-09 14:11:37 +01:00
Per Lundberg 70dd2ea3cc #210 Apparently, I had only renamed the project; the assembly name and the namespace was still wrong. 2013-11-13 17:49:40 +02:00
Per Lundberg 5d675a4492 …so we can rename this project to its proper name. (#210) 2013-11-10 23:59:51 +02:00