Commit Graph

48 Commits

Author SHA1 Message Date
Alex Maitland 0a8e7d2b6c 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:42:21 +10:00
Alex Maitland 8d25b71490 Core - Re-Add IAudioHandler (#3153)
Resolves #3152
2020-07-08 08:06:16 +10:00
amaitland 88aae91ea5 Core - Add IRequestHandler.OnDocumentAvailableInMainFrame
Resolves #3157
2020-06-28 20:08:18 +10:00
amaitland 436e565f04 Core - Remove DefaultRequestHandler
Issue #3124
2020-05-15 20:26:42 +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 39a305cac1 Xml Doc - Improvements and fixes
- Some classes are now excluded
- Many minor fixes should hopefully reduce the number of errors reported by Sandcastle
- Some of the xml doc is generated by Atomineer, usually in cases where CEF lacks documentation
2020-01-29 05:36:54 +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 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 c50b495458 IResourceHandler - Update Obsolete attribute as methods will be removed next version 2019-07-09 07:33:50 +10:00
amaitland e64b3afa5d DefaultRequestHandler - Revert changes and just mark Obsolete 2019-06-25 19:24:57 +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 68326c938f Add DefaultRequestHandler (marked as Obsolete) for backwards compatibility
Ditching Default from naming convention.
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 7e31a9523e DefaultResourceRequestHandler - Add default implementation for users to override only the methods they require 2019-06-25 19:24:57 +10:00
amaitland 07d8862c96 IResourceHandler - Improve xml doc 2019-06-25 19:24:57 +10:00
amaitland 7eff7d17c0 ResourceHandler - Add new methods and callbacks
Now uses IResourceHandler.Open to call IResourceHandler.ProcessRequestAsync
IResourceHandler.ProcessRequestAsync now returns CefReturnValue instead of bool as there are three states
2019-06-25 19:24:57 +10:00
amaitland e2c7a3781c CefCookieAccessFilterAdapter - Add adapter and wire up CefResourceRequestHandlerAdapter
Cookie access can now be controlled using ICookieAccessFilter.CanSendCookie and ICookieAccessFilter.CanSaveCookie
- Remove ResourceHandlerWrapper::GetCookie as it's not used anymore
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
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 a0d74dd63e IDisplayHandler - Add OnLoadingProgressChange
Resolves #2686
2019-03-27 22:05:17 +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
Alex Sukhovy 304a300b0c Call OnContextCreated and OnContextReleased for each frame (#2373)
* ContextEvents for each frame

* set CanExecuteJavascriptOnMainFrame

* example and comments

* whitespace fix

* comments

* whitespace

* update comments
2018-10-28 16:48:50 +10:00
amaitland dcff3d0094 IJsDialogHandler - Rename OnJSBeforeUnload to OnBeforeUnloadDialog
Also fix xml doc

Resolves #2523
2018-09-25 20:56:31 +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 8ed2681619 Xml Doc - Add some more xml doc
Some of it's just placeholder doc to keep sandcastle happy
2018-09-05 13:01:41 +10:00
Igor 0ede12e7ba Add OSR AccessiblityHandler. (#2480)
* Add AccessibilityHander.

Implement CefAccessibilityHandler. Add IAccessibilityHandler interface. Add AccessibilityHandler field to IWebBrowser.

* Pull request fixes.

Replaces tabs with spaces; move CefAccessibilityHandler implementation to RenderClientAdapter; add missing comments.

* Add CefValueWrapper.

Add ICefValue interface; pass ICefValue to IAccessibilityHandler.

* Pull request fixes.

Rename CefValue to Value and CefValueType to ValueType; add CefValueWrapper::GetObject() method; remove stub code in AccessibilityHandler; fix comment on IAccessibilityHandler.

* Pull request fixes.

Fix comments for IValue; remove redundant global namespace reference for CefValueType.
2018-08-16 19:33:02 +10:00
amaitland a9f249e835 ClientAdapter::OnSetFocus - When DevTools is opened, OnSetFocus is called before OnAfterCreated
The causes GetBrowserWrapper to return null when DevTools is opened, for now we'll just create the wrapper
and pass it directly (wrapper is disposed when it goes out of scope).
2018-08-07 19:10:58 +10:00
amaitland 9d4504db99 IDownloadHandler - Add IWebBrowser param to methods
Resolves #2470
2018-07-24 12:38:45 +10:00
amaitland 430c439690 IFocusHandler - Add IWebBrowser and IBrowser Params
IFocusHandler methods are now called for popups, use browser.IsPopup to differentiate
DefaultFocusHandler has been updated accordingly

Resolves #2468
2018-07-24 12:26:04 +10:00
amaitland d28ce081ed Handler Xml Doc Cleanup - Rename webBrowser to chromiumWebBrowser 2018-07-24 12:13:37 +10:00
amaitland 48bd8d5590 Add IRequestContextHandler.OnRequestContextInitialized
- Rename RequestContextHandler to CefRequestContextHandlerAdapter and move to internals
- Add missing RequestContextSettings.EnableNetSecurityExpiration
- Minor code cleanup
2018-07-10 20:21:46 +10:00
amaitland 8301090afe Merge branch 'split_ceffiledialogmode_enum' of https://github.com/fuzzykiller/CefSharp 2018-07-02 18:24:44 +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 b492905cea Code cleanup - Move some structs and enums into separate namespace
- Move the less likely to be used structs/enums into the relevant namespaces, would ideally like to move them all, would likely cause a few issues
for some when upgrading though, so deferring for now.
- Remove Geoposition as it's no longer used (Geolocation API was removed in CEF)
2018-04-20 12:56:32 +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
João Neves 5a713fdf7d Support uncaught exception handling (#2244)
* Added support for uncaught javascript exception in Render Process Message Handler
* Fixed typo
* Added stack frame column numbers
* Code review
* Code review
* Update JavascriptException.cs
2018-03-07 10:21:31 +10:00
Daniel B 613ddced0a Split CefFileDialogMode into CefFileDialogMode and CefFileDialogFlags 2018-02-18 22:34:51 +01:00
amaitland 921ea55fff Add IDisplayHandler.OnAutoResize, IBrowserHost.SetAccessibilityState, IBrowserHost.SetAutoResizeEnabled
Wrappers for new methods/callback added
2017-12-21 08:53:56 +10:00
Martinek Vilmos 021d780de1 Added default implementation of IRequestHandler (#2157)
* Added default implementation of IRequestHandler

* Functions made virtual

* Include DefaultRequestHandler in csproj (merge fix)

* Moved DefaultRequestHandler to CefSharp.Handler namespace; added comments
2017-12-19 14:29:04 +10:00
Chris 2b7bdf863f Updated OnTooltipChanged to allow for modifying text (#1953)
* Updated OnTooltipChanged to allow for modifying text

* Updated examples
2017-05-15 02:52:02 +02:00
amaitland 3015bc31de Fix typo on IRenderProcessMessageHandler.OnContextCreated 2017-05-03 09:50:30 +10:00
amaitland 5d459a5d32 Add IRenderProcessMessageHandler.OnContextReleased - native IPC message sent from render process 2017-03-07 09:23:10 +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 960c5953ba Continue with CefSharp.csproj restructure - move more classes into subfolders (again no namespace change for backwards compatibility) 2017-02-14 12:08:58 +10:00