feat: migrate webRequest module to NetworkService (Part 6) (#19752)

* Implement OnBeforeSendHeaders

* Pass the request

* Handle simple listeners

* Handle response listeners

* Read responses from listener
This commit is contained in:
Cheng Zhao 2019-08-16 10:19:05 +09:00 committed by GitHub
parent e59095423e
commit c3bb73a711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 297 additions and 64 deletions

View file

@ -60,6 +60,15 @@ struct Converter<net::HttpResponseHeaders*> {
net::HttpResponseHeaders* out);
};
template <>
struct Converter<net::HttpRequestHeaders> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
const net::HttpRequestHeaders& headers);
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
net::HttpRequestHeaders* out);
};
template <>
struct Converter<network::ResourceRequest> {
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,