Commit Graph

1628 Commits

Author SHA1 Message Date
Alex Maitland 12e583d2ef Core - PublicApi remove references to CefSharp.Core.Runtime
- Add an UnWrap method to the interfaces (should be hidden from IntelliSense)
- For .Net 4.5.2 projects they're  not a decorator class which an inner instance of the CefSharp.Core.Runtime Type
- For Net Core we have a ref assembly which allows us to reference the CefSharp.Core.Runtime without issues
  We can potentially remove the ref assembly now and forgo any direct reference.
2021-01-13 16:56:57 +10:00
Alex Maitland 66228eb429 Core - Make ObjectFactory types readonly
https://github.com/cefsharp/CefSharp/commit/66c95bc4997d11f212a756ed8b203e93408fe74e#r45840060
2021-01-12 10:53:13 +10:00
Alex Maitland 83d960e5cf Net Core - Fix BrowserSubProcess.SelfHost path lookup
- Add Initializer.BrowserSubProcessCorePath which is calculated the same as BrowserSubProcessPath
- Update SelfHost to use new path then fallback to old path.

Details in https://github.com/cefsharp/CefSharp/issues/3197#issuecomment-757819840
2021-01-12 10:49:07 +10:00
Alex Maitland 2a80b71161 WinForms/WPF - Fix BrowserSettings/RequestContext type checking
- When settings BrowserSettings/RequestContext properties the type checking needs to make sure the
CefSharp.Core.BrowserSettings and CefSharp.BrowserSettings objects are acceptable
- In WPF only the RequestContext was updated as there's no check for BrowserSettings property yet (probably should be)

https://github.com/cefsharp/CefSharp/issues/3343#issuecomment-757581368
2021-01-11 20:29:54 +10:00
Alex Maitland 56afee5c09 Net Core - CefSettingsBase add missing namespace qualifier 2021-01-11 14:47:00 +10:00
Alex Maitland 8858365c16 Core - Split PublicApi.cs out into separate classes
Issue #3319
2021-01-11 10:47:57 +10:00
Alex Maitland 02d045832b Core - CefSettings no longer implements IDisposable
**This is a breaking change**

- CefSharp.Core.CefSettingsBase is now disposed when calling Cef.Initialize
- CefSharpApp was refactored to no longer need a reference to CefSettingsBase so it can be disposed

Resolves #3220
2020-12-31 17:08:08 +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 6daf660caf Upgrade to 87.1.12+g03f9336+chromium-87.0.4280.88 / Chromium 87.0.4280.88 2020-12-11 11:19:02 +10:00
GitHubPang 6258b86059 Fix typos (#3306)
* Fix typos in md files in .github

* Fix typos in Cef.h
2020-12-08 09:08:18 +10:00
Alex Maitland a84d6e0958 Upgrade to CEF 87.1.11+g8bb7705+chromium-87.0.4280.66 / Chromium 87.0.4280.66 2020-11-29 17:58:59 +10:00
Alex Maitland f1daac7131 Core - Add IResponse.SetHeaderByName/GetHeaderByName 2020-11-26 16:43:16 +10:00
Alex Maitland 01d775a46d Core - Add BrowserSubprocess.SelfHost.Main
Can be used to self host the browser SubProcess
Fixes build errors, the Net Core implementation is now renamed from MainNetCore to Main

Issue #3197
2020-11-26 09:27:35 +10:00
Alex Maitland 6e4e41573a Net Core - Add missing files to vcxproj
They were only added to the NetCore specific version
2020-11-25 21:35:45 +10:00
Alex Maitland aada072f80 Net Core - Add SelfHost class to CefSharp.Core
Allows for quick self hosting of the BrowserSubprocess

Issue #3197
2020-11-25 17:10:45 +10:00
amaitland 55af252d91 Core - Refactor JavascriptObjectRepository to IJavascriptObjectRepositoryInternal
Basic refactoring in preparation for allowing users(advanced) to provide their own custom JavascriptObjectRepository implementation
2020-11-25 15:23:29 +10:00
Alex Maitland 2aa3ed13e5 Upgrade to CEF 87.1.6+g315d248+chromium-87.0.4280.66 / Chromium 87.0.4280.66 2020-11-24 10:29:35 +10:00
Alex Maitland 8258102569 Core - Move OnCursorChange from CefRenderHandler to IDisplayHandler
Resolves #3275
2020-11-07 18:17:14 +10:00
Alex Maitland f26d518a9a Core - RequestContext.LoadExtension update JSON parsing
CEF has removed the errorCode param removed from CefParseJSONAndReturnError
We now check if the return value is null as per the doc (null for failure)

https://github.com/chromiumembedded/cef/commit/015e3621a3ccaf4b90301d7b24e1fbd5abae7150#diff-f9ffbbceb0fb483a501949fe58321caaa4c6652688ab718bc4a5fbb68651bb5dR149
2020-11-07 16:38:29 +10:00
Alex Maitland 74326a62ec Upgrade to CEF 87.1.1+g9a70877+chromium-87.0.4280.27 / Chromium 87.0.4280.27 2020-11-07 16:00:58 +10:00
Alex Maitland 25defd0d59 Core - Fix/suppress some compiler warnings.
size_t -> int conversion warnings

Still lots to resolve, some properties like frameidentifier could be changed to Int64
2020-11-06 20:40:09 +10:00
Alex Maitland 6b5feafb70 Core - PopupFeatures regenerate RefAssembly
- remove commented out code
- manually delete CefSharp.Core.cs and regenerate.

Issue #3270
2020-11-06 19:44:52 +10:00
Austin Stephens f9971730be Fixed issue #3270 (Core - Improve IPopupFeatures mapping and xml doc)
Now using nullable ints for optional values in IPopupFeatures
2020-11-06 19:44:52 +10:00
Alex Maitland 810560cfdd Net Core - Make more VC++ classes private
They aren't used publicly so make private so they don't show up in the ref assembly.

Issue #3197
2020-11-06 16:30:10 +10:00
amaitland 11060ddc5a Upgrade build version to 86.0.20 2020-10-31 19:28:35 +10:00
amaitland bf504a2641 Upgrade to 86.0.20+gf2039ae+chromium-86.0.4240.111 / Chromium 86.0.4240.111 2020-10-31 19:22:45 +10:00
amaitland 44e1e03fab Update build version to 86.0.19 2020-10-30 16:23:29 +10:00
amaitland c8fc8810dd Upgrade to CEF 86.0.19+g9c5fca5+chromium-86.0.4240.111 / Chromium 86.0.4240.111 2020-10-30 15:55:25 +10:00
amaitland 9be805cf62 Xml Doc - Fix param reference 2020-10-25 12:04:04 +10:00
amaitland ae22607fe1 Xml Doc - Minor improvements 2020-10-25 12:04:03 +10:00
amaitland dad43386c0 Core - JavascriptCallbackProxy::ExecuteWithTimeoutAsync return failure task
The failure task wasn't being returned (surprised VC++ actually compiled).
2020-10-25 12:04:01 +10:00
amaitland 166c57addb Upgrade to CEF 86.0.17+g4a33048+chromium-86.0.4240.75 / Chromium 86.0.4240.75 2020-10-21 15:56:23 +10:00
amaitland f0b7bd1e81 Core - Rename vcxproj packages.config files
nuget.exe keeps removing packages.config so renaming to project specific naming
each project in the same directory has a unique packages.config file
2020-10-21 15:50:30 +10:00
amaitland 10f6a4bd20 Core - Add Cookie.SameSite and Cookie.Priority
Resolves #3254
2020-10-14 14:56:35 +10:00
Alex Maitland 3eca8bdba6 Enhancement - Simplify Setting of RequestContext Proxy (#3250)
Core - Simplify Setting of Proxy for new RequestContext

- Throw exception if requestContext.CanSetPreference returns false.
Proxy likely set via command line args.
- Add IRequestContext.SetPreferenceAsync
-  Test - Add SelfHosted Proxy
Use Titanium.Web.Proxy to self host a proxy for testing proxy settings
Only run Proxy Tests when run locally
- Add RequestContext Builder Fluent API
2020-10-13 13:40:46 +10:00
Alex Maitland fd46a4c145 Core - Add EvaluateScriptAsPromiseAsync (#3251)
- Add useImmediatelyInvokedFuncExpression param to EvaluateScriptAsync which wraps the script in an IIFE
  with the cefSharpInternalCallbackId variable defined in scope to allow for deferred completion
- Wrap script in Immediately Invoked Function Expression and call promise.resolve to guarantee a promise.
- Return 'CefSharpDefEvalScriptRes' as the result of the js function to defer execution of the callback
- Call newly added cefSharp.sendEvalScriptResponse method in javascript when promise has been resolved/rejected

This is built up of a few parts and can technically be used by the new user to defer the response until they are ready.
Just return `'CefSharpDefEvalScriptRes'` and manually call cefSharp.sendEvalScriptResponse using the cefSharpInternalCallbackId
variable which is injected into the script execution (wrapped in an IIFE to limit scope)
2020-10-06 15:19:37 +10:00
amaitland d0b53da211 Core - Fix IRequestContextHandler.GetResourceRequestHandler never called
CefRequestContextHandlerAdapter now implements GetResourceRequestHandler
2020-10-04 15:13:33 +10:00
amaitland 02a8ea70cd Upgrade to CEF 85.3.12+g3e94ebf+chromium-85.0.4183.121 / Chromium 85.0.4183.121 2020-10-04 14:45:58 +10:00
amaitland 0dcd86026e Net Core - Split netcore vcxproj packages.config files
To make updating easier the netcore vcxproj files have their own packages.config files now
2020-10-04 14:32:06 +10:00
amaitland b0ee2f2bda Core - Add Cef.Initialize(settings, performDependencyCheck) overload
Added based on feedback from https://github.com/cefsharp/Questions-and-Support/issues/38
2020-10-02 10:25:25 +10:00
Jozef Izso 23fd91b353 Fix typos in Cef documentation (#3237) 2020-09-25 08:29:23 +10:00
amaitland 53f15f22eb Upgrade to CEF 85.3.6+gacfac2f+chromium-85.0.4183.102 / Chromium 85.0.4183.102
- Remove CefSettings.RegisterExtension (#3184)
- Add IRenderProcessHandler.OnWebKitInitialized
- Add Cef.RegisterExtension (Browser SubProcess specific implementation)

Resolves #3184
2020-09-16 13:49:37 +10:00
Gilberto Stankiewicz b0b5103100 Fix code analysis C4018 warnings (#3223)
* Replace `auto`s with `size_t`s to reduce:

```
Severity	Code	Description	Project	File	Line	Suppression State
Warning	C4018	'<': signed/unsigned mismatch	CefSharp.BrowserSubprocess.Core	c:\repos\cefsharp\cefsharp.browsersubprocess.core\serialization\jsobjectsserialization.cpp	71
```

* Fix templates
2020-08-26 19:13:13 +10:00
amaitland 89e95ef3be Core - Add CompositionUnderline.Style (IME)
https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/win/imm32_manager.cc;l=82;drc=c70af83bc44f6829277cdc3621e7015d6e0d7530;bpv=1;bpt=1?q=GCS_COMPCLAUSE&ss=chromium%2Fchromium%2Fsrc

Resolves #3107
2020-08-26 14:55:51 +10:00
amaitland 1e141d0479 Upgrade to CEF 84.4.1+gfdc7504+chromium-84.0.4147.105 / Chromium 84.0.4147.105 2020-08-26 13:50:41 +10:00
amaitland 7640b65b97 Net Core - Add Assembly.manifest
Add assembly manifest for VC++ projects to prevent loading issues of ijwhost.dll

https://github.com/dotnet/runtime/issues/38231
https://github.com/dotnet/runtime/issues/37972#issuecomment-647726082

Not sure exactly how to test this works as expected

Reference
https://docs.microsoft.com/en-us/windows/win32/sbscs/assembly-manifests

#3197
2020-08-14 21:29:29 +10:00
amaitland d76379f7e9 Upgrade to CEF 84.4.0+g304e015+chromium-84.0.4147.105 / Chromium 84.0.4147.1055 2020-08-14 16:14:09 +10:00
amaitland d0c14cd036 Update version number to 84.4.0 2020-08-14 15:17:03 +10:00
amaitland 159a45b79d Net Core - GenApi Generate CefSharp.Core.dll reference assembly
- Cannot currently compile the generated output yet
2020-08-12 14:51:05 +10:00
amaitland 217258c2ae Net Core - Make VC++ Methods internal to avoid being included in Ref Assembly 2020-08-12 14:50:56 +10:00