Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 kThrottled = 0, | 24 kThrottled = 0, |
| 25 kIdle, | 25 kIdle, |
| 26 kLowest, | 26 kLowest, |
| 27 kLow, | 27 kLow, |
| 28 kMedium, | 28 kMedium, |
| 29 kHighest | 29 kHighest |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 // Destroying a URLLoader will cancel the associated request. | 32 // Destroying a URLLoader will cancel the associated request. |
| 33 interface URLLoader { | 33 interface URLLoader { |
| 34 // Starts loading and binds the given |loader| request with this loader. | |
| 35 // This method is intended to be called in C++ impl (as it is not | |
| 36 // possible to Start this before |loader| binding in mojo layer), and | |
| 37 // is not necessary to call this if the loader is created and stgarted by | |
| 38 // URLLoaderFactory. | |
| 39 // It is not valid to call this method more than once. | |
| 40 Start(associated URLLoader& loader, URLLoaderClient client); | |
|
kinuko
2017/06/05 09:44:23
Having a method like this in mojom feels a bit wei
| |
| 41 | |
| 34 // If the associated request has |auto_follow_redirects| set to false, | 42 // If the associated request has |auto_follow_redirects| set to false, |
| 35 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, | 43 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, |
| 36 // |FollowRedirect| may be called to load the URL indicated by the redirect. | 44 // |FollowRedirect| may be called to load the URL indicated by the redirect. |
| 37 FollowRedirect(); | 45 FollowRedirect(); |
| 38 | 46 |
| 39 // Sets the request priority. | 47 // Sets the request priority. |
| 40 // |intra_priority_value| is a lesser priority which is used to prioritize | 48 // |intra_priority_value| is a lesser priority which is used to prioritize |
| 41 // requests within a given priority level. | 49 // requests within a given priority level. |
| 42 SetPriority(RequestPriority priority, int32 intra_priority_value); | 50 SetPriority(RequestPriority priority, int32 intra_priority_value); |
| 43 }; | 51 }; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 | 100 |
| 93 // Called when the loader starts loading response body. This is called after | 101 // Called when the loader starts loading response body. This is called after |
| 94 // OnReceiveResponse is called. | 102 // OnReceiveResponse is called. |
| 95 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); | 103 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); |
| 96 | 104 |
| 97 // Called when the loading completes. No notification will be dispatched for | 105 // Called when the loading completes. No notification will be dispatched for |
| 98 // this client after this message arrives. | 106 // this client after this message arrives. |
| 99 OnComplete(URLLoaderStatus completion_status); | 107 OnComplete(URLLoaderStatus completion_status); |
| 100 }; | 108 }; |
| 101 | 109 |
| OLD | NEW |