mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
libservo: Convert intercept_web_resource_load
into load_web_resource
(#35564)
Rework the `WebViewDelegate::intercept_web_resource_load` into `WebViewDelegate::load_web_resource` and clean up internal messaging. The main thing here is adding objects which manage the response to these delegate methods. Now we have `WebResourceLoad` and `InterceptedWebResourceLoad` which make it much harder to misuse the API. In addition, the internal messaging for this is cleaned up. Canceling and finishing the load are unrelated to the HTTP body so they are no longer subtypes of an HttpBodyData message. Processing of messages is made a bit more efficient by collecting all body chunks in a vector and only flattening the chunks at the end. Finally, "interceptor" is a much more common spelling than "intercepter" so I've gone ahead and made this change everywhere. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
f6e2e3d418
commit
cf2b93f18a
14 changed files with 245 additions and 208 deletions
|
@ -18,7 +18,7 @@ pub mod image_cache;
|
|||
pub mod local_directory_listing;
|
||||
pub mod mime_classifier;
|
||||
pub mod protocols;
|
||||
pub mod request_intercepter;
|
||||
pub mod request_interceptor;
|
||||
pub mod resource_thread;
|
||||
mod storage_thread;
|
||||
pub mod subresource_integrity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue