Commit Graph

50 Commits

Author SHA1 Message Date
Alex Maitland a5c9a66832 Example - Rename PermissionHandlerExample to ExamplePermissionHandler
- Matches other examples
- Minor changes
2022-08-08 15:41:45 +10:00
Alex Maitland 1ae9e01b41 Core - PermissionHandler followup
- Rename enums (remove cef prefix)
- Fix typos
- Slightly improve docs
2022-08-08 14:18:54 +10:00
Алексей f92687b7cc Core - Add support PermissonHandler
https://bitbucket.org/chromiumembedded/cef/issues/3352/add-cefpermissionhandler-callback-for-the
2022-08-08 13:59:32 +10:00
Alex Maitland 6c18e0e863 Update IDialogHandler.OnFileDialog method declaration
CEF is now using Chrome file dialogs on all platforms and runtimes, this brings a number of fixes and also some API changes.

- The selectedAcceptFilter filter arg has now been removed
- The CefFileDialogFlags enum has been removed as CEF no longer supports these options

This is a breaking change.

Issue #4110
2022-05-17 19:51:08 +10:00
Alex Maitland b4c4913b35 Core - Add IDownloadHandler.CanDownload
- Add IDownloadHandler.CanDownload
- Add to Fluent implementation
- Update examples

https://bitbucket.org/chromiumembedded/cef/commits/6d7a6801871cd4fcceb174dfa99a5b46da6253c1

Resolves #4090
2022-05-05 12:40:33 +10:00
Alex Maitland 2080fd616a Example - Update RequestContextHandler 2022-04-05 11:00:41 +10:00
Alex Maitland 1a162573fc Core - Remove remaining Plugin API (followup)
- Remove CefWebPluginInfoVisitorAdapter. from Net Core vcxproj
- Update BrowserProcessHandler example to set a different preference (the plugin ones will eventually be removed from Chromium)

Follow up to https://github.com/cefsharp/CefSharp/commit/0ac43cf69f11d2e6351eca51c81914d70b259be9

Issue #4045
2022-03-25 11:16:31 +10:00
Alex Maitland 0ac43cf69f Core - Remove Remaining Plugin APIs
- Remove plugin references
- Update xml doc comments
- Update ref assembly (netcore)
- Update examples

Issue #4045
2022-03-21 10:01:26 +10:00
Alex Maitland 8160ec1ce4 Remove IRequestContextHandler.OnBeforePluginLoad and IRequestContext.PurgePluginListCache
Resolves #3924
2021-12-07 14:54:11 +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 d8abfa6035 Example - AudioHandler now extends CefSharp.Handler.AudioHandler
Fixes compile error as IAudioHandler now implements IDisposable
2021-06-04 16:57:53 +10:00
Alex Maitland e035c39d2b Core - Add Default Handler implementations
Inherit and override only the required methods rather than implement the whole interface
2021-05-11 20:39:57 +10:00
Alex Maitland 6ea5ac49c8 Core - Remove ICookieManager.SetSupportedSchemes
- The method was removed upstream.
- New properties have been added to CefSettings and RequestContextSettings

**Breaking Change**

Resolves https://github.com/cefsharp/CefSharp/issues/3497
2021-04-13 15:10:38 +10:00
Konstantin Preißer 462bc747bd Add support for Windows ARM64 to CefSharp.NETCore packages (#3359)
* Add support for Windows ARM64 for the NETCore packages.

Note: .NET 5.0 or higher is required to build a WinForms/WPF application for win-arm64.

Fixes cefsharp/CefSharp#2944

* PR feedback: Remove "WIN32" define as it is already defined by minwindef.h.

* PR feedback: Switch the CefSharp.*.Example.netcore and CefSharp.Test.netcore projects from cef.redist to chromiumembeddedframework.runtime.

Note: These projects are excluded for build when platform is 'arm64', as otherwise the build fails as WinForms and WPF are not yet available for ARM64 in .NET 5.0.

* Follow-Up: Update path to CefSharp.Test.dll.

* PR feedback: Also use RuntimeInformation for the .NET Framework example projects.

* PR feedback:
- Remove copying of CefRedist files in CefSharp.AfterBuild.targets which is no longer needed.
- Update .vsconfig to include the VC ARM64 build tools.
2021-04-01 17:27:48 +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
amaitland e149cabe07 Example - Move RequestContextHandler into CefSharp.Example
Was previously only in WPF project, move into the common CefSharp.Example
as there was nothing WPF specific out the class.
2020-10-02 10:25:23 +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
Alex Maitland 8d25b71490 Core - Re-Add IAudioHandler (#3153)
Resolves #3152
2020-07-08 08:06:16 +10:00
amaitland 349c9a938b Core - IResourceRequestHandler implement IDisposible
Add ResourceRequestHandler.Dispose protected virtual method
Instance will be disposed when ref count frees the last instance.
2020-05-02 08:50:16 +10:00
amaitland a9d39d7965 Core - Add StreamResponseFilter
- Moved from the Cefsharp.Example.Filters.StreamResponseFilter
- Added CanWrite checks in InitFilter
- Updated example to reflect namespace change.
2019-12-10 18:31:38 +10:00
amaitland c925717cb0 ExampleRequestHandler - Improve GetAuthCredentials example 2019-10-04 11:29:33 +10:00
amaitland 647a072d67 ExampleRequestHandler - Improve OnCertificateError example 2019-10-04 10:47:59 +10:00
amaitland 802bb7f43c Remove IAudioHandler
The Chromium implementation has changed so dramatically that CEF has removed support see https://bitbucket.org/chromiumembedded/cef/commits/1f893c76a97eaa88e3ff782b8e2e47dd0f5d27b2

Track https://bitbucket.org/chromiumembedded/cef/issues/2755/reimplement-audio-mirroring-for for details on when it will be reimplemented

Original Issue #2727
2019-10-01 20:06:37 +10:00
amaitland cc8ffc8803 ExampleResourceRequestHandler - Add a brief xml doc to the class 2019-09-29 14:28:32 +10:00
amaitland 0d236b3b45 Example - Update ResponseFilter example to reflect NetworkService changes
- MemoryStreamResponseFilter renamed to StreamResponseFilter
- Stream is now passed into StreamResponseFilter constructor
- ExampleResourceRequestHandler updated to reflect that it now represents a single resource request
- ExampleResourceRequestHandler is now used for all requests from the CefSharpSchemeHandlerFactory.SchemeName custom scheme

Issue #2743
2019-09-29 14:19:25 +10:00
amaitland 52ec00c486 Code cleanup - Rename IWebBrowser browserControl to chromiumWebBrowser
Hopefully this makes it clearer that the IWebBrowser instance is actually the ChromiumWebBrowser

Updated almost all instances, there's one WinForms example that wasn't updated
2019-07-20 16:26:25 +10:00
amaitland 256e7275d5 IRequestHandler.GetAuthCredentials - Replace frame param with sourceUrl
https://bitbucket.org/chromiumembedded/cef/commits/5e9ca096e0bbdbd6661df5d882082e3324237993
2019-07-18 21:18:56 +10:00
amaitland 4183b464d1 WPF/WinForms Example - Allow mailto to trigger OnProtocolExecution
- When Url starts with mailto then use our ExampleResourceRequestHandler
- Ignore unknown scheme errors when it's mailto, we expect that it's unknown
- WPF Example remove duplicate OnLoadError in BrowserTabViewModel
2019-07-10 20:47:55 +10:00
amaitland b68d8d7a8f RequestHandler - Change interface implementation to be explicit
- Make members protected virtual (BREAKING CHANGE)
- Remove Default from name of DefaultResourceRequestHandlerFactory/DefaultResourceRequestHandlerFactoryItem
2019-06-25 19:24:57 +10:00
amaitland 8942b68336 ResourceRequestHandler - Move commented out methods in ExampleResourceRequestHandler 2019-06-25 19:24:57 +10:00
amaitland 7e731b0fa9 Code Cleanup - Rename DefaultRequestHandler to RequestHandler
Also renamed CefSharp.Example.Handlers.RequestHandler to CefSharp.Example.Handlers.ExampleRequestHandler

Will Add in Obsolete DefaultRequestHandler
2019-06-25 19:24:57 +10:00
amaitland 73a156fdc5 Initial version 75 upgrade and NetworkService changes
Compiles, that's about it at this point, there are major CEF breaking changes, and lots to be addressed.

Browser Process (main process)
- Removed IResourceHandlerFactory as it no longer fits with the structure that CEF provides
- New IResourceRequestHandler interface added, not plumbed in yet
- CefSettings - Add RootCachePath and ApplicationClientIdForFileScanning

BrowserSubprocess (render process)
- SendProcessMessage was moved from CefBrowser to CefFrame
- OnBrowserCreated added extraInfo param

The BrowserSubprocess changes for this upgrade should be complete
2019-06-25 19:24:57 +10:00
amaitland 302f5b2c83 WinForms Example - Improve Cef.DoMessageLoopWork examples
Change WinFormsBrowserProcessHandler to use a WinForms timer so it's Diposed when the Form is
switch it to using 60fps
2019-06-02 20:35:31 +10:00
Alex Maitland 76e5a8d5c0 Add IAudioHandler (#2727)
* Feature Request - Add IAudioHandler

- For performance reasons we return NULL if no audiohandler is assigned
- No example is provided currently

Initial implementation for #2714
2019-05-03 12:54:40 +10:00
amaitland 34f29f0323 TypeConversion - Improve ToNative type checking when converting from Object to CefValue
Previously you had to used a fixed type, now the type checking is more flexible.

Move the Dictionary check to before the collection check as a dictionary is technically a collection

Resolves #2625
2019-01-18 12:34:25 +10:00
campersau b31069633e add spaces in exception messages (#2620) 2019-01-11 08:57:28 +10:00
Alex Maitland 02e3084af3 Add Chromium Extension Support (#2613)
* Add Chromium Extension Support

Add IRequestContext.LoadExtension
Add IExtensionHandler
Add IExtension
Add example (import from cefclient) - was added to CefSharp.WinForms.Example projct
Add RequestContextExtensions - to make loading an extension slightly easier
2018-12-31 13:12:10 +10:00
amaitland 4f71295941 CefSharp.Example - Move example classes into handlers/javascriptbinding folders/namespaces
Basic code cleanup
2018-10-29 16:21:42 +10:00
Chris 30ee538ce0 Added EditorConfig (#2514) 2018-09-17 00:46:21 +02:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
amaitland d14c26a892 IResponse.ResponseHeaders - Make obsolete
Use IResponse.Headers instead
2018-08-07 19:33:51 +10:00
amaitland 552962ba77 IRequestHandler.OnBeforeBrowse - Add userGesture param
The userGesture value will be true if the browser
navigated via explicit user gesture (e.g. clicking a link) or false if it
navigated automatically (e.g. via the DomContentLoaded event).
2018-05-03 12:11:52 +10:00
amaitland bd3f336bdc CefSharp.Example - Add example registering a FolderSchemeHandlerFactory for the https scheme (https://cefsharp.example) 2018-01-29 12:57:33 +10:00
amaitland 8e34166d47 Add Debugger Display attribute to cookie - excluded the cookie value as they can be rather large, show basically the rest of the cookie in the debugger
Add example of VisitAllCookiesAsync
2018-01-18 10:25:49 +10:00
amaitland 464dd14b6f Update Example RequestHandler to inherit from DefaultRequestHandler
A new default implementation was added in #2157
BrowserTabView - cleanup usings and remove unused code
2017-12-20 10:01:34 +10:00
amaitland eee0a9e9d1 Add example of new CookieManager code 2017-03-06 08:55:07 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland 55f5ce44b5 Remove unused using statement from CookieManager
Update  cookieManager.SetSupportedSchemes usage as no longer accepts param array
2017-02-14 11:53:41 +10:00
amaitland 9fbde82ef0 Experimental implementation of IBrowserProcessHandler.OnScheduleMessagePumpWork
NOT READY FOR PRODUCTION USE
2016-09-01 16:51:20 +10:00
amaitland 63ef6beb5f Refactor OnContextInitialized out as part of IBrowserProcessHandler interface
Add OnScheduleMessagePumpWork for use with integrating into existing message loop - probably better for WinForms integration, will look at providing an example later
2016-07-20 13:08:47 +10:00