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

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

Issue 2646343007: [Mojo-Loading] Implement URLLoader::SetPriority (Closed)
Patch Set: fix Created 3 years, 11 months 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
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; 14 struct URLRequestRedirectInfo;
15 15
16 [Native] 16 [Native]
17 struct URLLoaderStatus; 17 struct URLLoaderStatus;
18 18
19 // This enum corresponds to net::RequestPriority. See its comments for details.
20 enum RequestPriority {
21 kThrottled = 0,
22 kIdle,
23 kLowest,
24 kLow,
25 kMedium,
26 kHighest
27 };
28
19 // Destroying a URLLoader will cancel the associated request. 29 // Destroying a URLLoader will cancel the associated request.
20 interface URLLoader { 30 interface URLLoader {
21 // If the associated request has |auto_follow_redirects| set to false, 31 // If the associated request has |auto_follow_redirects| set to false,
22 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, 32 // then upon receiving an URLResponse with a non-NULL |redirect_url| field,
23 // |FollowRedirect| may be called to load the URL indicated by the redirect. 33 // |FollowRedirect| may be called to load the URL indicated by the redirect.
24 FollowRedirect(); 34 FollowRedirect();
35
36 // Sets the request priority.
37 SetPriority(RequestPriority priority, int32 intra_priority_value);
dcheng 2017/01/24 19:07:18 Nit: maybe document what intra_priority_value is?
yhirano 2017/01/27 07:53:55 I found no document but it looks so according to t
25 }; 38 };
26 39
27 // Opaque handle passed from the browser process to a child process to manage 40 // Opaque handle passed from the browser process to a child process to manage
28 // the lifetime of temporary files used for download_to_file resource loading. 41 // the lifetime of temporary files used for download_to_file resource loading.
29 // When the message pipe for this interface is closed, the browser process will 42 // When the message pipe for this interface is closed, the browser process will
30 // clean up the corresponding temporary file. 43 // clean up the corresponding temporary file.
31 interface DownloadedTempFile { 44 interface DownloadedTempFile {
32 }; 45 };
33 46
34 47
(...skipping 30 matching lines...) Expand all
65 78
66 // Called when the loader starts loading response body. This is called after 79 // Called when the loader starts loading response body. This is called after
67 // OnReceiveResponse is called. 80 // OnReceiveResponse is called.
68 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); 81 OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
69 82
70 // Called when the loading completes. No notification will be dispatched for 83 // Called when the loading completes. No notification will be dispatched for
71 // this client after this message arrives. 84 // this client after this message arrives.
72 OnComplete(URLLoaderStatus completion_status); 85 OnComplete(URLLoaderStatus completion_status);
73 }; 86 };
74 87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698