amaitland
5ec1dbfe78
ResourceHandler - Rename CharSet to CharSet
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
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
d14c26a892
IResponse.ResponseHeaders - Make obsolete
...
Use IResponse.Headers instead
2018-08-07 19:33:51 +10:00
amaitland
5adff7014b
ResourceHandler - Expose AutoDisposeStream for ResourceHandler.FromStream and ResourceHandler.FromFilePath
...
Also add OneTime param to WebBrowserExtensions.RegisterResourceHandler which translates to AutoDisposeStream
2018-05-17 16:43:14 +10:00
amaitland
7d720c6f80
ResourceHandler.FromFilePath - Remove Obsolete attribute
...
Update to use File.OpenRead and FromStream method instead
2018-03-05 16:36:22 +10:00
amaitland
5a5ba89ebf
ResourceHandler.FromFilePath - Mark as Obsolete
...
There are problems with multiple concurrent calls to the underlying CefResourceHandler
See #2041 for background
2018-03-05 16:14:19 +10:00
amaitland
6691d0080a
Refactor ResourceHandler, split FileResourceHandler out into it's own class, rather than relaying on ResourceHandlerType - this allows us to add more underlying CEF type wrappers without a huge amount of effort now.
...
Add new ByteArrayResourceHandler - uses CefStreamReader::CreateForData to load the byte array, for use with CefStreamResourceHandler
Add ResourceHandler.FromByteArray method for ease of use
Change ResourceHandler.FromString to use the new ByteArrayResourceHandler class
2017-05-05 12:55:44 +10:00
amaitland
b357b736bb
Set ResponseLength when Stream.CanSeek
...
Don't attempt to write bytes when the bytesRead count is 0
2017-04-06 17:25:34 +10:00
amaitland
440cc7a67c
Remove ResourceHandler.FromFileName - was marked as Obsolete a while back
2017-04-06 16:05:18 +10:00
amaitland
7bf33f4a36
Expose ResourceH.GetMemoryStream - turns a string into a memory stream and optionally appends a BOM to the beginning
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
9df1bc132c
Add RegisterResourceHandler and UnRegisterResourceHandler to simplify using the DefaultResourceHandlerFactory
2016-12-08 22:14:09 +10:00
amaitland
153296df63
Add ErrorCode to ResourceHandler - can now set the IResponse.ErrorCode without having to manually implement IResourceHandler
2016-06-22 11:52:15 +10:00
amaitland
04d2a8ede8
Add ResourceHandler.FromFilePath method that takes in a MimeType
...
Make ResourceHandler.FromFileName obsolete
2016-06-16 15:16:30 +10:00
amaitland
9d5abddc9a
Fix typos
2016-06-01 16:30:34 +10:00
amaitland
e97fe18165
ResourceHandler - Add AutoDisposeStream (Stream will be disposed when the ResourceHandler is Disposed)
2016-06-01 15:09:58 +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
560fa2b867
Improve ResourceHandler documentation, add a minor simplification and update the FlashResourceHandler example to demo how simple it is to use a ResourceHandler when extending FlashResourceHandler
2016-04-15 16:25:06 +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
Atvaark
b04ccbb269
Add missing comments
2015-11-04 13:10:00 +10:00
Alex Maitland
042f873975
Resolve issue with loging plugin diagnostic page - MimeType was null which crashed unexpectedly
...
Added validation so that MimeType is required or exception throw
Remove some of the method overloads and replace with default params on the main methods
2015-08-09 12:26:00 +10:00
amaitland
2f863b5c9b
Make MimeType directly settable - think that's the last change required to make it flexible
2015-07-29 21:14:15 +10:00
amaitland
9225da0a26
Make constructor public again, guess it's possible that you would need an empty ResourceHandler with a different StatusCode for example
2015-07-29 21:12:29 +10:00
amaitland
88b02ba904
Add ResourceHandlerType to deal with Files differently, use the underlying CefStreamReader::CreateForFile implementation
2015-07-29 20:49:29 +10:00
amaitland
864f9ea7a2
Rename GetResponseHeaders to GetResponse
2015-06-15 23:07: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
c193020c72
Change public API to use Continue and Cancel methods - callback is then somewhat more consistent with other callback wrappers
2015-06-05 12:17:12 +10: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
Bill Tutt
1df0d648a8
Don't create a task for MemoryStreams, and some more Resharper Cleanups.
2015-05-28 22:14:34 -04: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
187b255730
Change ResourceHandler to use explicit IResourceHandler interface implementation
...
Add some extra spacing and fix up a comment
2015-05-27 17:17:29 +10:00
amaitland
9c7bf2e930
Change ResourceHandler to IResourceHandler
...
Add StatusText
2015-05-27 17:11:52 +10:00
rassilon
7128e40fd1
It's time for copyright updates again. Yay!
...
Throw in a couple of tab containing files for good measure.
Evil tabs, evil I say.
2015-04-25 02:45:21 -04:00
James
44fa52cc96
Update ResourceHandler.cs
...
Missing mime type for svg added
2015-03-05 14:57:27 +08:00
rassilon
a300631954
Do a little cleaning up of StreamAdapter to more effeciently deal with MemoryStreams, and add lame header to ResourceHandler usage in CefExample.cs.
...
Additionally, allocate Headers NameValueCollection in constructor.
2015-03-02 19:02:37 -05:00
MantisCore
1cc6ab2f5e
Changed the ResourceHandler constructor overload taking a stream to a method FromStream instead to make it more consistent with existing methods.
2014-12-27 12:22:16 +01:00
MantisCore
eabfcff3fe
Added constructor overloads to ResourceHandler to enable supplying an existing resource stream.
2014-12-27 11:56:54 +01:00
amaitland
f805f50544
Save the internal byte array of MemoryStream from being expanded unnecessarily as per https://github.com/cefsharp/CefSharp/pull/691#issuecomment-67116871
2014-12-16 16:19:51 +10:00
amaitland
e235cf1598
Spelling mistakes
2014-12-16 12:35:03 +10:00
amaitland
85024f2fb0
Add ability to specify FromText Encoding and Preamble (without a preamble then Cef will use DefaultEncoding to render the html)
2014-12-16 10:43:44 +10:00
amaitland
907cca8b53
ResourceHandler formatting change (indentation)
2014-11-25 17:29:39 +10:00
James
b57fafe38d
Update ResourceHandler.cs
...
Added override for passing in the file ext to correctly set the correct mime type
2014-11-21 12:43:29 +08:00
amaitland
757bc66122
Untabify
2014-11-18 14:33:26 +10:00
amaitland
8e9c5da0da
Add basic example
2014-11-18 12:03:59 +10:00
amaitland
da16b3a9bc
Add FromString method for loading ResourceHandler from string
2014-11-18 12:03:59 +10:00
amaitland
30c8cf9248
Make ToHeaderMap static in SchemeHandlerWrapper (Needs to be moved to a common place in the future)
...
Get basic CefStreamResourceHandler compiling
Add headers and status codes to ResourceHandler
2014-11-18 12:03:59 +10:00
amaitland
85c260d07c
Implement missing method in StreamAdapter
...
Implementation of GetResourceHandler still incomplete
2014-11-18 12:03:59 +10:00