Commit Graph

34 Commits

Author SHA1 Message Date
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
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 699a181f95 Change IResourceHandler.ProcessRequest lifetime handling for IRequest
Previous it was disposed immediately after the method had executed which made it hard to execute
in an async fashion (which is possible with the callback)
2017-03-06 08:55:08 +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 3061becb3f IResourceHandler now implements IDisposable - you can cleanup and resources when the handler is disposed 2016-05-26 07:28:19 +10:00
amaitland 12f42331dc Resolves #1592 - Expose all methods of CefResourceHandler
Previously we were passing in the frame, request wrappers which hadn't been used, so just keep things simple and remove the code.
Current users should extend ResourceHandler instead of IResourceHandler and add the override keyword
TODO: Deal with setting bytesRead property - currently using Stream.Length which won't work for every stream type
2016-02-18 16:44:51 +10:00
amaitland bae3c28e92 Update copyright to 2016 2016-01-11 14:11:30 +10:00
amaitland b9ee476e8e Fix up some of the vc++ include mess that we had going
Cleanup using namespace statements as well
2015-09-29 16:26:06 +10:00
amaitland d4dd2bfeaf Revert "Do not self-dispose CefCallbackWrapper" Reverts commit 86c72ea1eb.
No longer keep reference to the callback wrapper in ResourceHandlerWrapper, will be disposed like all the other callbacks

Changes are still related to GitHub issue #1143
2015-09-09 09:09:51 +10:00
amaitland de7f6e186e Remove lock from StreamAdapter (was only used one, so not required)
Remove lock from ResourceHandlerWrapper - seemed kinda pointless and the cef implementation doesn't have one.
https://bitbucket.org/chromiumembedded/cef/src/4a8546efd70700eed1e1f921e85293abf90d2691/libcef_dll/wrapper/cef_stream_resource_handler.cc?at=master#cef_stream_resource_handler.cc-140
2015-09-01 18:59:33 +10:00
amaitland fb2f2efa11 Add CanSetCookie and CanGetCookie method stubs, look at implementing later 2015-08-19 08:53:09 +10:00
amaitland 2acc334570 Remove unused constructor from ResourceHandlerWrapper 2015-06-25 10:34:22 +10:00
rassilon 1a62db2446 Allow the browser/frame instances to be active (i.e. non-disposed) until ResourceHandlerWrapper has completed processing for ResourceHandlers and Schemes. 2015-06-18 08:27:53 -04:00
rassilon 1d2454b0bc Merge remote-tracking branch 'origin/master' into continued/43
Conflicts:
	CefSharp.Core/Internals/CefRequestCallbackWrapper.h
	CefSharp.Core/ResourceHandlerWrapper.h
2015-06-18 07:56:59 -04:00
rassilon afb8aae4eb Fix things that break VS2012. 2015-06-17 19:13:42 -04:00
rassilon 8ec01da230 Use GetBrowserWrapper everywhere except popup creation/closing for all of ClientAdapter.cpp.
This means that none of the callbacks need to own disposing the IBrowser^ instance.
2015-06-17 18:14:07 -04:00
amaitland afbed86524 First draft of what is hopefully the final rewrite of ResourceHandler/SchemeHandler
This will built but won't run as CefResponseWrapper has not yet been implemented.
2015-06-15 21:03:25 +10:00
amaitland c445a508ea Allow for ISchemeHandlerFactory.Create to return null (allow for default behaviour)
Updated ISchemeHandlerFactory xml doc

As both current use cases for ResourceHandlerWrapper can potentially return null rather than handle the resource change CefRequestWrapper to be disposed of automatically and use the CefRequest provided by ResourceHandlerWrapper::ProcessRequest
2015-06-15 20:00:32 +10:00
amaitland 63cc978ce6 Change CefRequestWrapper to use the IRequest interface instead 2015-06-15 18:46:34 +10:00
amaitland 4b245f1ab9 Revert "Be paranoid about _requestWrapper being disposed properly in ResourceHandlerWrapper."
This reverts commit 4f7302086b.
2015-06-15 18:45:12 +10:00
rassilon 4f7302086b Be paranoid about _requestWrapper being disposed properly in ResourceHandlerWrapper. 2015-06-13 10:45:36 -04:00
rassilon 431cb511c3 * Move unmanged objects into finalizer and call finalizer from Dispose.
* Remove DisposableResources from ManagedCefBrowserAdapter
* Improve disposing of CefRequestWrapper
* Have callbacks dispose themselves.
* Allow the Application exit handler shutdown CEF from the Winforms example application.
2015-06-13 10:42:33 -04:00
amaitland c8d73574da Add cancel param to ProcessRequestCallback - previously only able to call the Continue() method on the callback 2015-06-05 12:12:33 +10:00
amaitland 2983bf7383 Change ContentLength to be a long (int64)
Set ContentLength in ResourceHandler when using a MemoryStream
2015-05-27 18:01:17 +10:00
amaitland 9c7bf2e930 Change ResourceHandler to IResourceHandler
Add StatusText
2015-05-27 17:11:52 +10:00
rassilon 61ce52a2a4 Merge remote-tracking branch 'origin/cef/2272' into cleanup/resourcehandler
Conflicts:
	CefSharp.Core/SchemeHandlerFactoryWrapper.cpp
	CefSharp.Core/SchemeHandlerFactoryWrapper.h
	CefSharp.Core/SchemeHandlerResponse.cpp

Merge merge merge, merges are fun.
2015-04-25 03:06:21 -04:00
amaitland 2468e41ea1 Extract ISchemeHandler into IResourceHandler - haven't marked as [Obsolete] as it may make more sense naming wise to keep this interface
Maybe need to add a code comment explaining the reason for keeping both interfaces?
2015-04-17 13:07:07 +10:00
amaitland 1863c571ae Extract ISchemeHandlerResponse into IResourceHandlerResponse and mark as obsolete 2015-04-17 13:07:07 +10:00
amaitland f32b717187 ResourceHandlerWrapper release resources on destructor 2015-04-17 13:07:05 +10:00
amaitland c1d15e46d2 Switch to using ISchemeHandlerResponse interface 2015-04-17 13:07:05 +10:00
amaitland 3551faa364 Move ToHeaderMap method into TypeConversion as it's generic and used in two places 2015-04-17 13:07:04 +10:00
amaitland 6480706ced Rename SchemeHandlerWrapper to ResourceHandlerWrapper 2015-04-17 13:07:03 +10:00