OLD | NEW |
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 SSLInfo; |
| 15 |
| 16 [Native] |
14 struct URLRequestRedirectInfo; | 17 struct URLRequestRedirectInfo; |
15 | 18 |
16 [Native] | 19 [Native] |
17 struct URLLoaderStatus; | 20 struct URLLoaderStatus; |
18 | 21 |
19 // This enum corresponds to net::RequestPriority. See its comments for details. | 22 // This enum corresponds to net::RequestPriority. See its comments for details. |
20 enum RequestPriority { | 23 enum RequestPriority { |
21 kThrottled = 0, | 24 kThrottled = 0, |
22 kIdle, | 25 kIdle, |
23 kLowest, | 26 kLowest, |
(...skipping 17 matching lines...) Expand all Loading... |
41 | 44 |
42 // Opaque handle passed from the browser process to a child process to manage | 45 // Opaque handle passed from the browser process to a child process to manage |
43 // the lifetime of temporary files used for download_to_file resource loading. | 46 // the lifetime of temporary files used for download_to_file resource loading. |
44 // When the message pipe for this interface is closed, the browser process will | 47 // When the message pipe for this interface is closed, the browser process will |
45 // clean up the corresponding temporary file. | 48 // clean up the corresponding temporary file. |
46 interface DownloadedTempFile { | 49 interface DownloadedTempFile { |
47 }; | 50 }; |
48 | 51 |
49 | 52 |
50 interface URLLoaderClient { | 53 interface URLLoaderClient { |
51 // Called when the response head is received. |downloaded_file| is non-null in | 54 // Called when the response head is received. |
52 // the 'download_to_file' case. | 55 // |downloaded_file| is non-null in the 'download_to_file' case. |
| 56 // |ssl_info| is non-null if kSendSSLInfo was specified to |
| 57 // CreateLoaderAndStart. |
53 OnReceiveResponse(URLResponseHead head, | 58 OnReceiveResponse(URLResponseHead head, |
| 59 SSLInfo? ssl_info, |
54 DownloadedTempFile? downloaded_file); | 60 DownloadedTempFile? downloaded_file); |
55 | 61 |
56 // Called when the request has been redirected. The receiver is expected to | 62 // Called when the request has been redirected. The receiver is expected to |
57 // call FollowRedirect or cancel the request. | 63 // call FollowRedirect or cancel the request. |
58 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); | 64 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); |
59 | 65 |
60 // Called when some data from a resource request has been downloaded to the | 66 // Called when some data from a resource request has been downloaded to the |
61 // file. This is only called in the 'download_to_file' case and replaces | 67 // file. This is only called in the 'download_to_file' case and replaces |
62 // OnStartLoadingResponseBody in the call sequence in that case. | 68 // OnStartLoadingResponseBody in the call sequence in that case. |
63 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated | 69 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated |
(...skipping 22 matching lines...) Expand all Loading... |
86 | 92 |
87 // Called when the loader starts loading response body. This is called after | 93 // Called when the loader starts loading response body. This is called after |
88 // OnReceiveResponse is called. | 94 // OnReceiveResponse is called. |
89 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); | 95 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); |
90 | 96 |
91 // Called when the loading completes. No notification will be dispatched for | 97 // Called when the loading completes. No notification will be dispatched for |
92 // this client after this message arrives. | 98 // this client after this message arrives. |
93 OnComplete(URLLoaderStatus completion_status); | 99 OnComplete(URLLoaderStatus completion_status); |
94 }; | 100 }; |
95 | 101 |
OLD | NEW |