| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // When the message pipe for this interface is closed, the browser process will | 44 // When the message pipe for this interface is closed, the browser process will |
| 45 // clean up the corresponding temporary file. | 45 // clean up the corresponding temporary file. |
| 46 interface DownloadedTempFile { | 46 interface DownloadedTempFile { |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 | 49 |
| 50 interface URLLoaderClient { | 50 interface URLLoaderClient { |
| 51 // Called when the response head is received. |downloaded_file| is non-null in | 51 // Called when the response head is received. |downloaded_file| is non-null in |
| 52 // the 'download_to_file' case. | 52 // the 'download_to_file' case. |
| 53 OnReceiveResponse(URLResponseHead head, | 53 OnReceiveResponse(URLResponseHead head, |
| 54 associated DownloadedTempFile? downloaded_file); | 54 DownloadedTempFile? downloaded_file); |
| 55 | 55 |
| 56 // Called when the request has been redirected. The receiver is expected to | 56 // Called when the request has been redirected. The receiver is expected to |
| 57 // call FollowRedirect or cancel the request. | 57 // call FollowRedirect or cancel the request. |
| 58 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); | 58 OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head); |
| 59 | 59 |
| 60 // Called when some data from a resource request has been downloaded to the | 60 // 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 | 61 // file. This is only called in the 'download_to_file' case and replaces |
| 62 // OnStartLoadingResponseBody in the call sequence in that case. | 62 // OnStartLoadingResponseBody in the call sequence in that case. |
| 63 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated | 63 // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated |
| 64 // instead. | 64 // instead. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 // Called when the loader starts loading response body. This is called after | 87 // Called when the loader starts loading response body. This is called after |
| 88 // OnReceiveResponse is called. | 88 // OnReceiveResponse is called. |
| 89 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); | 89 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); |
| 90 | 90 |
| 91 // Called when the loading completes. No notification will be dispatched for | 91 // Called when the loading completes. No notification will be dispatched for |
| 92 // this client after this message arrives. | 92 // this client after this message arrives. |
| 93 OnComplete(URLLoaderStatus completion_status); | 93 OnComplete(URLLoaderStatus completion_status); |
| 94 }; | 94 }; |
| 95 | 95 |
| OLD | NEW |