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

Unified Diff: content/common/url_loader.mojom

Issue 2964503003: Move NetworkService mojom files to content/public/common. (Closed)
Patch Set: Merge Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/common/url_loader.mojom
diff --git a/content/common/url_loader.mojom b/content/common/url_loader.mojom
deleted file mode 100644
index 53b7521310516182449a01f6742898b4e7d90f3e..0000000000000000000000000000000000000000
--- a/content/common/url_loader.mojom
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-module content.mojom;
-
-[Native]
-struct URLRequest;
-
-[Native]
-struct URLResponseHead;
-
-[Native]
-struct SSLInfo;
-
-[Native]
-struct URLRequestRedirectInfo;
-
-[Native]
-struct URLLoaderStatus;
-
-// This enum corresponds to net::RequestPriority. See its comments for details.
-enum RequestPriority {
- kThrottled = 0,
- kIdle,
- kLowest,
- kLow,
- kMedium,
- kHighest
-};
-
-// Destroying a URLLoader will cancel the associated request.
-interface URLLoader {
- // If the associated request has |auto_follow_redirects| set to false,
- // then upon receiving an URLResponse with a non-NULL |redirect_url| field,
- // |FollowRedirect| may be called to load the URL indicated by the redirect.
- FollowRedirect();
-
- // Sets the request priority.
- // |intra_priority_value| is a lesser priority which is used to prioritize
- // requests within a given priority level.
- SetPriority(RequestPriority priority, int32 intra_priority_value);
-};
-
-// Opaque handle passed from the browser process to a child process to manage
-// the lifetime of temporary files used for download_to_file resource loading.
-// When the message pipe for this interface is closed, the browser process will
-// clean up the corresponding temporary file.
-interface DownloadedTempFile {
-};
-
-
-interface URLLoaderClient {
- // Called when the response head is received.
- // |downloaded_file| is non-null in the 'download_to_file' case.
- // |ssl_info| is non-null if kSendSSLInfo was specified to
- // CreateLoaderAndStart.
- OnReceiveResponse(URLResponseHead head,
- SSLInfo? ssl_info,
- DownloadedTempFile? downloaded_file);
-
- // Called when the request has been redirected. The receiver is expected to
- // call FollowRedirect or cancel the request.
- OnReceiveRedirect(URLRequestRedirectInfo redirect_info, URLResponseHead head);
-
- // Called when some data from a resource request has been downloaded to the
- // file. This is only called in the 'download_to_file' case and replaces
- // OnStartLoadingResponseBody in the call sequence in that case.
- // TODO(yhirano): Remove |encoded_length| and use OnTransferSizeUpdated
- // instead.
- OnDataDownloaded(int64 data_length, int64 encoded_length);
-
- // Called when the service made some progress on the file upload. This is
- // called only when the request has an upload data.
- // The implementation should call the response closure when the client is
- // ready to receive the next upload progress.
- OnUploadProgress(int64 current_position, int64 total_size) => ();
-
- // Called when cached metadata from a resource request is ready.
- OnReceiveCachedMetadata(array<uint8> data);
-
- // Called when the transfer size is updated. This is only called if
- // |report_raw_headers| is set and |download_to_file| is unset in the request.
- // The transfer size is the length of the response (including both headers
- // and the body) over the network. |transfer_size_diff| is the difference from
- // the value previously reported one (including the one in OnReceiveResponse
- // and OnReceiveRedirect). It must be positive.
- // TODO(yhirano): Dispatch this notification even when |download_to_file| is
- // set.
- // TODO(yhirano): Consider using an unsigned type.
- OnTransferSizeUpdated(int32 transfer_size_diff);
-
- // Called when the loader starts loading response body. This is called after
- // OnReceiveResponse is called.
- OnStartLoadingResponseBody(handle<data_pipe_consumer> body);
-
- // Called when the loading completes. No notification will be dispatched for
- // this client after this message arrives.
- OnComplete(URLLoaderStatus completion_status);
-};
-

Powered by Google App Engine
This is Rietveld 408576698