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

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

Issue 2646343007: [Mojo-Loading] Implement URLLoader::SetPriority (Closed)
Patch Set: fix Created 3 years, 10 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
« no previous file with comments | « content/common/OWNERS ('k') | content/common/url_request.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // |intra_priority_value| is a lesser priority which is used to prioritize
38 // requests within a given priority level.
39 SetPriority(RequestPriority priority, int32 intra_priority_value);
25 }; 40 };
26 41
27 // Opaque handle passed from the browser process to a child process to manage 42 // 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. 43 // 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 44 // When the message pipe for this interface is closed, the browser process will
30 // clean up the corresponding temporary file. 45 // clean up the corresponding temporary file.
31 interface DownloadedTempFile { 46 interface DownloadedTempFile {
32 }; 47 };
33 48
34 49
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 86
72 // 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
73 // OnReceiveResponse is called. 88 // OnReceiveResponse is called.
74 OnStartLoadingResponseBody(handle<data_pipe_consumer> body); 89 OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
75 90
76 // Called when the loading completes. No notification will be dispatched for 91 // Called when the loading completes. No notification will be dispatched for
77 // this client after this message arrives. 92 // this client after this message arrives.
78 OnComplete(URLLoaderStatus completion_status); 93 OnComplete(URLLoaderStatus completion_status);
79 }; 94 };
80 95
OLDNEW
« no previous file with comments | « content/common/OWNERS ('k') | content/common/url_request.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698