Implement protocol.interceptProtocol

This commit is contained in:
Cheng Zhao 2015-08-13 20:10:05 +08:00
parent 374d83ed9c
commit 773e932e98
2 changed files with 49 additions and 1 deletions

View file

@ -57,7 +57,15 @@ mate::ObjectTemplateBuilder Protocol::GetObjectTemplateBuilder(
.SetMethod("registerHttpProtocol",
&Protocol::RegisterProtocol<URLRequestFetchJob>)
.SetMethod("unregisterProtocol", &Protocol::UnregisterProtocol)
.SetMethod("isHandledProtocol", &Protocol::IsHandledProtocol);
.SetMethod("isHandledProtocol", &Protocol::IsHandledProtocol)
.SetMethod("interceptStringProtocol",
&Protocol::InterceptProtocol<URLRequestStringJob>)
.SetMethod("interceptBufferProtocol",
&Protocol::InterceptProtocol<URLRequestBufferJob>)
.SetMethod("interceptFileProtocol",
&Protocol::InterceptProtocol<UrlRequestAsyncAsarJob>)
.SetMethod("interceptHttpProtocol",
&Protocol::InterceptProtocol<URLRequestFetchJob>);
}
void Protocol::RegisterStandardSchemes(