Commit Graph

8 Commits

Author SHA1 Message Date
amaitland 1d8c90258e Core - ByteArrayResourceHandler throw exception if byte[] length 0
We cannot create a CefStreamReader when buffer length is 0
CefStreamReader::CreateForData returns null and CefStreamResourceHandler crashes
as the stream is null

https://github.com/chromiumembedded/cef/blob/9df4a54308a88fd80c5774d91c62da35afb5fd1b/libcef/browser/stream_impl.cc#L27
https://github.com/chromiumembedded/cef/blob/a94dc6a0588e15deb184650b9015cd259e52a702/libcef_dll/wrapper/cef_stream_resource_handler.cc#L79
2020-06-09 14:14:14 +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
amaitland 05b640532f Xml doc improvements/fixes 2019-01-09 20:27:06 +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 f6088f33d2 DefaultResourceHandlerFactory - Rewrite so it stores byte[] instead of storing IResourceHandler
It's not actually a factory and will handle multiple requests to the same url

Only API change is for DefaultResourceHandlerFactory directly, the LoadHtml and RegisterResourceHandler extension methods
stay unchanged
2018-08-13 12:39:04 +10:00
amaitland ab4e513693 Improve ByteArrayResourceHandler and FileResourceHandler comments
They should probably be renamed before the next version is branched, give a better indication
they're classes that represent unmanaged CEF implementations
2017-05-11 13:02:13 +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