Commit Graph

39 Commits

Author SHA1 Message Date
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 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 5e6addc0c9 CefTime.GetDoubleT returns invalid .Net date
Issue #2283
2018-03-05 16:55:11 +10:00
amaitland 41b3da004f Cleanup CefTime handling - make consistent across all projects
# Conflicts:
#	CefSharp.Core/ResourceHandlerWrapper.cpp
2018-01-18 10:25:54 +10:00
GrabzIt 93b08f1c12 Upgraded CEF to version 60 (#2159)
* Fixed pointer problem.

* Upgrade to CEF version 60

* Fix for invalid cookie date time

Error and stacktrace:

Year, Month, and Day parameters describe an un-representable DateTime.
   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond)
   at CefSharp.ResourceHandlerWrapper.GetCookie(ResourceHandlerWrapper* , CefStructBase<CefCookieTraits>* cookie)
   at CefSharp.ResourceHandlerWrapper.CanGetCookie(ResourceHandlerWrapper* , CefStructBase<CefCookieTraits>* cookie)

Fixed by copying the same solution found here:

https://github.com/cefsharp/CefSharp/blob/cd934267c65f494ceb9ee75995cd2a1ca0954543/CefSharp.Core/Internals/CookieVisitor.cpp
2017-11-08 13:08:59 +02: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 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 24a423bfc7 Fixed VS2015 build errors - had to prefix array<> with cli namespace as compiler was reporting ambiguous reference (VS2013 was fine with the code)
Basic VS2015 build should now be working
2015-09-01 22:09:47 +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 f04f7c7595 Fix typo - newRedirectUrl 2015-08-19 09:34:08 +10:00
amaitland fb2f2efa11 Add CanSetCookie and CanGetCookie method stubs, look at implementing later 2015-08-19 08:53:09 +10:00
jankurianski 5e658fccb5 Upgraded to use local 3.2357.1274 NuGet packages and fixed breaking changes 2015-07-21 15:16:25 +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
amaitland 864f9ea7a2 Rename GetResponseHeaders to GetResponse 2015-06-15 23:07:02 +10:00
amaitland 018598171a Add first draft of CefResponseWrapper 2015-06-15 21:20:02 +10: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 35d31bd533 Only set ResourceHandlerWrapper values if we plan to continue, if we Cancel they would be ignored 2015-06-15 19:03:35 +10:00
amaitland 63cc978ce6 Change CefRequestWrapper to use the IRequest interface instead 2015-06-15 18:46:34 +10: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 1fdf6da796 Default StatusCode = 200 and StatusText = "OK"
Remove the check ResourceHandlerWrapper - use the default value for StatusCode
2015-05-28 20:55:42 +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 37384a9461 Rename SchemeHandlerResponse to ResourceHandlerResponse 2015-05-27 17:14:42 +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 1863c571ae Extract ISchemeHandlerResponse into IResourceHandlerResponse and mark as obsolete 2015-04-17 13:07:07 +10:00
amaitland 98e89111f4 Remove unnecessary ret value and simply use bytes_read instead 2015-04-17 13:07:06 +10:00
amaitland e07148815e Fix has_data naming - remove underscore
Replace if statement with ternary operator for response_length
2015-04-17 13:07:06 +10:00
amaitland a904e6c667 Simplify code by removing local variable handled variable - simply return 2015-04-17 13:07:05 +10:00
amaitland f38438874c Resolve SeekOrigin ambiguous reference 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 5cc55b50ad Switch SchemeHandlerResponse to using a more traditional destructor and calling delete on the object (I think it explains the behaviour better when reading the code) 2015-04-17 13:07:04 +10:00
amaitland 16e785a723 Remove OnRequestCompletedHandler action wrapper and expose the method directly on SchemeHandlerResponse 2015-04-17 13:07:03 +10:00
amaitland 6480706ced Rename SchemeHandlerWrapper to ResourceHandlerWrapper 2015-04-17 13:07:03 +10:00