Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Side by Side Diff: content/common/url_loader.mojom

Issue 2467833002: Implement redirect handling on MojoAsyncResourceHandler (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/typemaps.gni ('k') | content/common/url_request_redirect_info.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module content.mojom; 5 module content.mojom;
6 6
7 [Native] 7 [Native]
8 struct URLRequest; 8 struct URLRequest;
9 9
10 [Native] 10 [Native]
11 struct URLResponseHead; 11 struct URLResponseHead;
12 12
13 [Native] 13 [Native]
14 struct URLRequestRedirectInfo;
15
16 [Native]
14 struct URLLoaderStatus; 17 struct URLLoaderStatus;
15 18
16 // Destroying a URLLoader will cancel the associated request. 19 // Destroying a URLLoader will cancel the associated request.
17 interface URLLoader { 20 interface URLLoader {
18 // If the associated request has |auto_follow_redirects| set to false, 21 // If the associated request has |auto_follow_redirects| set to false,
19 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, 22 // then upon receiving an URLResponse with a non-NULL |redirect_url| field,
20 // |FollowRedirect| may be called to load the URL indicated by the redirect. 23 // |FollowRedirect| may be called to load the URL indicated by the redirect.
21 FollowRedirect(); 24 FollowRedirect();
22 }; 25 };
23 26
24 interface URLLoaderClient { 27 interface URLLoaderClient {
25 // Called when the response head is received. 28 // Called when the response head is received.
26 OnReceiveResponse(URLResponseHead head); 29 OnReceiveResponse(URLResponseHead head);
27 30
31 // Called when the request has been redirected. The receiver is expected to
32 // call FollowRedirect or cancel the request.
33 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head);
34
28 // Called when some data from a resource request has been downloaded to the 35 // Called when some data from a resource request has been downloaded to the
29 // file. This is only called in the 'download_to_file' case and replaces 36 // file. This is only called in the 'download_to_file' case and replaces
30 // OnStartLoadingResponseBody in the call sequence in that case. 37 // OnStartLoadingResponseBody in the call sequence in that case.
31 OnDataDownloaded(int64 data_length, int64 encoded_length); 38 OnDataDownloaded(int64 data_length, int64 encoded_length);
32 39
33 // Called when the loader starts loading response body. 40 // Called when the loader starts loading response body.
34 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); 41 OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
35 42
36 // Called when the loading completes. No notification will be dispatched for 43 // Called when the loading completes. No notification will be dispatched for
37 // this client after this message arrives. 44 // this client after this message arrives.
38 OnComplete(URLLoaderStatus completion_status); 45 OnComplete(URLLoaderStatus completion_status);
39 }; 46 };
40 47
OLDNEW
« no previous file with comments | « content/common/typemaps.gni ('k') | content/common/url_request_redirect_info.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698