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] |
(...skipping 30 matching lines...) Expand all Loading... | |
41 // call FollowRedirect or cancel the request. | 41 // call FollowRedirect or cancel the request. |
42 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); | 42 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); |
43 | 43 |
44 // Called when some data from a resource request has been downloaded to the | 44 // Called when some data from a resource request has been downloaded to the |
45 // file. This is only called in the 'download_to_file' case and replaces | 45 // file. This is only called in the 'download_to_file' case and replaces |
46 // OnStartLoadingResponseBody in the call sequence in that case. | 46 // OnStartLoadingResponseBody in the call sequence in that case. |
47 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated | 47 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated |
48 // instead. | 48 // instead. |
49 OnDataDownloaded(int64 data_length, int64 encoded_length); | 49 OnDataDownloaded(int64 data_length, int64 encoded_length); |
50 | 50 |
51 // Called when the service made some progress on the file upload. This is | |
52 // called only when the request has an upload data. | |
53 // Call the response closure when the client is ready to receive the next | |
kinuko
2017/01/23 08:28:09
nit: Call -> Calls ?
tzik
2017/01/23 09:34:17
Updated the comment. This is a request to the impl
| |
54 // upload progress. | |
55 OnUploadProgress(int64 current_position, int64 total_size) => (); | |
56 | |
51 // Called when cached metadata from a resource request is ready. | 57 // Called when cached metadata from a resource request is ready. |
52 OnReceiveCachedMetadata(array<uint8> data); | 58 OnReceiveCachedMetadata(array<uint8> data); |
53 | 59 |
54 // Called when the transfer size is updated. This is only called if | 60 // Called when the transfer size is updated. This is only called if |
55 // |report_raw_headers| is set and |download_to_file| is unset in the request. | 61 // |report_raw_headers| is set and |download_to_file| is unset in the request. |
56 // The transfer size is the length of the response (including both headers | 62 // The transfer size is the length of the response (including both headers |
57 // and the body) over the network. |transfer_size_diff| is the difference from | 63 // and the body) over the network. |transfer_size_diff| is the difference from |
58 // the value previously reported one (including the one in OnReceiveResponse | 64 // the value previously reported one (including the one in OnReceiveResponse |
59 // and OnReceiveRedirect). It must be positive. | 65 // and OnReceiveRedirect). It must be positive. |
60 // TODO(yhirano): Dispatch this notification even when |download_to_file| is | 66 // TODO(yhirano): Dispatch this notification even when |download_to_file| is |
61 // set. | 67 // set. |
62 // TODO(yhirano): Consider using an unsigned type. | 68 // TODO(yhirano): Consider using an unsigned type. |
63 OnTransferSizeUpdated(int32 transfer_size_diff); | 69 OnTransferSizeUpdated(int32 transfer_size_diff); |
64 | 70 |
65 // Called when the loader starts loading response body. This is called after | 71 // Called when the loader starts loading response body. This is called after |
66 // OnReceiveResponse is called. | 72 // OnReceiveResponse is called. |
67 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); | 73 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); |
68 | 74 |
69 // Called when the loading completes. No notification will be dispatched for | 75 // Called when the loading completes. No notification will be dispatched for |
70 // this client after this message arrives. | 76 // this client after this message arrives. |
71 OnComplete(URLLoaderStatus completion_status); | 77 OnComplete(URLLoaderStatus completion_status); |
72 }; | 78 }; |
73 | 79 |
OLD | NEW |