| Index: content/common/url_loader.mojom
|
| diff --git a/content/common/url_loader.mojom b/content/common/url_loader.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..62f36ee411ae6848d1d47d6640bb0151c9638175
|
| --- /dev/null
|
| +++ b/content/common/url_loader.mojom
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +module content.mojom;
|
| +
|
| +[Native]
|
| +struct URLRequest;
|
| +
|
| +[Native]
|
| +struct URLResponseHead;
|
| +
|
| +[Native]
|
| +struct URLLoaderStatus;
|
| +
|
| +interface URLLoader {
|
| + // Starts loading the given |request|. |client|'s method will be called when
|
| + // certain events related to that loading (e.g., response arrival) happen.
|
| + // |request_id| is for compatibility with the existing Chrome IPC.
|
| + Start(int32 request_id,
|
| + URLRequest request,
|
| + URLLoaderClient client);
|
| +
|
| + // If the request passed to |Start| had |auto_follow_redirects| set to false,
|
| + // then upon receiving an URLResponse with a non-NULL |redirect_url| field,
|
| + // |FollowRedirect| may be called to load the URL indicated by the redirect.
|
| + FollowRedirect();
|
| +
|
| + // Cancels the request. The service will cancel loading, but there may be some
|
| + // time lag and it is possible that the client gets some notification after
|
| + // calling this method for a while.
|
| + Cancel();
|
| +};
|
| +
|
| +interface URLLoaderClient {
|
| + // Called when the response head is received.
|
| + OnReceiveResponse(URLResponseHead head);
|
| +
|
| + // Called when the loader starts loading response body.
|
| + OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
|
| +
|
| + // Called when the loading completes. No notification will be dispatched for
|
| + // this client after this message arrives.
|
| + OnComplete(URLLoaderStatus completion_status);
|
| +};
|
| +
|
|
|