Commit Graph

132 Commits

Author SHA1 Message Date
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
campersau b31069633e add spaces in exception messages (#2620) 2019-01-11 08:57:28 +10:00
amaitland 5854abea03 VC++ - Fix up includes and add some more header guards 2019-01-09 21:58:52 +10:00
Alex Maitland ce38ed81f0 Add IApp interface and DefaultApp implementation (#2616)
* Core - Add IApp interface and DefaultApp implementation

Move code from Cef.Initialize into CefSharpApp

Working towards #2139

* CefSharpApp.h - Allow CefCustomScheme->SchemeHandlerFactory to be null

If cefCustomScheme->SchemeHandlerFactory is null then we no longer attempt to call CefRegisterSchemeHandlerFactory
You can then choose which RequestContext you wish to register your handler for, no longer forcing you to register
in the global context

Remove null checks in OnScheduleMessagePumpWork as we're throwing an exception if they're null when the CefApp is created
2019-01-09 05:57:57 +10:00
amaitland f8349db9af Cef.h - Remove ThrowIfCefNotInitialized
As IsInitialized is set when CefInitialize returns and it appears to be possible the OnContextInitialized is called
before it returns then this exception wasn't going to work.

Testing with Cef.GetGlobalRequestContext and Cef.GetGlobalCookieManager and they both return null if called before Cef.Initialize
So it shouldn't be possible to actually access the cookie manager/RequestContext. Improved the xml doc

Resolves #2600
2019-01-01 21:47:51 +10:00
amaitland 90054f9497 Cef.h - Temporarily comment out ThrowIfCefNotInitialized
There appears to be a timing issue/race condition, see https://github.com/cefsharp/CefSharp/issues/2600#issuecomment-450551309 for details
2018-12-30 21:56:28 +10:00
campersau 2942f71d32 Fix OffScreen spelling (#2614) 2018-12-28 07:01:52 +11:00
amaitland 6540813849 Cef.h - Improve error message when calling method before Cef Initialized
- InitializedCheck renamed to ThrowIfCefNotInitialized
- ThrowIfCefNotInitialized added to more methods

Follow up to #2605
2018-12-27 21:33:17 +10:00
Chris 5d658c7eb0 Cef - Added initialized checks to Cef.Get* (#2605) 2018-12-27 22:16:18 +11:00
amaitland 485297bb7f Fix some xml doc encoding issues 2018-11-19 13:22:45 +10:00
amaitland f146a00b1f Cef.Initialize - Only validate browsersubprocesspath file exists specifically if dependency check is false 2018-10-26 13:22:08 +10:00
amaitland 30ba596db7 CefSettings/Cef.Initialize - Improve BrowserSubprocessPath checks
Change to using an absolute path for the BrowserSubprcessPath and validate the file exists in Cef.Intialize
2018-10-26 13:18:33 +10:00
amaitland 1a37c63182 Cef.Initialize - Improve xml doc 2018-09-15 19:33:49 +10: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 28f43261b6 Xml Doc - Add more comments and fixes 2018-09-05 13:02:43 +10:00
amaitland 9f2f1365c9 Cef.Initialize - Add more detail to exception through
Hopefully this reduces the support requests
2018-08-06 12:52:02 +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
amaitland 0f789fb09b Cef.Shutdown - Improve Thread Check error message 2018-07-25 21:58:08 +10:00
amaitland 0544428f4c Untabify 2018-07-16 20:24:05 +10:00
amaitland 1502a06eb6 BrowserSettings/CefSettings BackgroundColor xml doc updated
Also added Cef.ColorSetARGB helper function
2018-07-16 20:20:13 +10:00
Martin Chrástek 11fe9203e9 Fixed a typo (#2345) 2018-04-05 06:52:53 +10:00
amaitland a87d834409 Add Cef.GetBlockingCookieManager, IRequestHandler.CanGetCookies and IRequestHandler.CanSetCookie
RequestEventHandler example implementation is incomplete
2018-03-28 14:28:38 +10:00
amaitland c37dbcd06a Remove Geolocation API and Upgrade version numbers to 65 2018-03-17 21:31:25 +10:00
amaitland f67ff89e44 Geolocation - Mark as obsolete/deprecated
See #2293 for details
2018-03-05 16:34:35 +10:00
amaitland 9fc2f33ea8 Xml Doc improvements
Fix some invalid markup
Move some unmanaged constructors and implicit conversion to internal
2018-02-09 13:41:55 +10:00
amaitland c9000dc0de Add Cef.ShutdownWithoutChecks method - basically allows you to call the underlying CefShutdown method with minimal checks (just IsInitialized and a simple lock) 2018-01-18 10:25:52 +10:00
Chris 8df4ec5342 Expanded proxy support, made it easier to set proxy settings (#2007)
- Added a ProxyOptions class
- Added a CefSharpSettings.Proxy property
- Made ClientAdapter::GetAuthCredentials take care of the authentication for the proxy
2017-04-12 02:43:11 +02:00
amaitland aba002a8d7 Start of class/struct cleanup - classes like WebPluginInfo should really have private setters, make it clearer than the values provided are readonly
Remove Plugin and replace with WebPluginInfo - resolves #1991
Still need to revisit the class/struct debate
2017-03-21 12:26:35 +10:00
amaitland 6173f4db43 Change PluginVisitor to accept the newly added IWebPluginInfoVisitor
Extract PluginVisitor TaskCompletionSource out into TaskWebPluginInfoVisitor
2017-03-10 15:31:25 +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 ff836fdb98 Start spilitting out the Task based callbacks that are implemented in VC++ and implement them in C# with an interface - allow direct access to underlying CEF API 2017-02-14 12:27:07 +10:00
amaitland ee5fd34ee6 Comment out Cef example - none of the CefSharp examples have the relevant directory present.
Update xml comments on Cef.RegisterWidevineCdm
Add braces to if check - even single line if statements have braces for consistency
2017-02-13 15:55:44 +10:00
Justin Stenning 2298ea0a93 Implementation of Cef.RegisterWidevineCdm (#1935)
* Added Cef.RegisterWidevineCdm for CEF Widevine CDM registration #1934
* Added test page for WidevineCdm registration and example registration #1934
* Noted additional steps for Widevine and proprietary codecs to CdmSupportTest.html
* Link for more information changed to issue #1934 in CefExample.cs
* replaced Cef.RegisterCdmCallback's async result with IRegisterCdmCallback parameter
* RegisterCdmCallback now uses taskCompletionSource
2017-02-13 15:37:55 +10:00
amaitland 454be3cfa8 Add Crashreport functions
https://bitbucket.org/chromiumembedded/cef/src/6e0baff75ceeb3e079b1dda4099d81573334d741/include/cef_crash_util.h?at=2883&fileviewer=file-view-default
2017-01-16 11:30:37 +10:00
amaitland 2415529519 Add calls to CefDoMessageLoopWork before CefShutdown is called when settings.MultiThreadedMessageLoop = false 2017-01-06 14:08:55 +10:00
amaitland 264b42d35b Cef.Shutdown add double check lock - shouldn't be possible as it should always be run on the UI thread. Since we have the lock, best to double check
Add ManagedThreadId checking to Initialize/Shutdown - make sure they're called on the same thread.
2017-01-06 13:22:40 +10:00
amaitland 5f1adc695b Move CookieManager to CefSharp.Core folder 2016-10-18 22:53:34 +10:00
amaitland b8d2a755a7 Improve xml doc around Cef.Shutdown and Cef.Initialize 2016-10-14 14:47:14 +10:00
amaitland 98f1dedd16 Expose CefRunMessageLoop and CefQuitMessageLoop - It may be possible to run the CEF message loop and then load the WinForms Form on the same thread. 2016-09-08 15:54:08 +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
amaitland 3568629535 Remove Cef.LoadLibCefLibrary - needs to be called before the managed wrapper is loaded
Added CefLibraryHandle - uses P/Invoke to call LoadLibraryEx
2016-06-13 09:27:21 +10:00
amaitland 62292e4211 NPAPI Plugin methods removed from API
cef_runnable.h has been removed
Update IJsDialogHandler.OnJSDialog - acceptLang removed from API
2016-05-30 07:57:48 +10:00
amaitland 6ffbbf198a EXPERIMENTAL : Add Cef.LoadLibCefLibrary - calls LoadLibraryEx allowing potentially can be used to host libcef.dll and resources in a different folder 2016-05-09 11:49:47 +10:00
amaitland b246192b1b Remove shutdownOnExit handler - WinForms and WPF have their own, OffScreen it's better to call explicitly.
Resolve #1671
2016-04-27 19:13:23 +10:00
amaitland e2a690dca9 Change PluginVisitor to set the TaskCompletionSource to an empty list when Visit is never called
Slightly nicer behaviour than timing out
Update the example
2016-04-15 15:44:35 +10:00
amaitland 5f087838ac Improve comments around CEF UI thread 2016-03-20 10:01:49 +10:00
amaitland f18fe9d4ae Add Cef.CurrentlyOnThread method for checking if your on a particular CEF thread
Add Cef.GetGlobalRequestContext, can be used to set preferences and other related features
Update IRequestContext.SetPreference documentation, preferences set via the command line are read only
2016-03-19 07:30:03 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland 9ef0e21c62 Add CookieManager nullptr check - rather than return a wrapper around an empty CefRefPtr return null directly 2015-12-09 13:26:46 +10:00
amaitland 0fe0b4c4de Add CefExecuteProcess as Cef.ExecuteProcess - useful for implementing your own very minimal browser without the custom subprocess 2015-11-19 18:15:31 +10:00