Index: third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom |
diff --git a/third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom b/third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c10c8662c8107b341a86b88d00f1a548c25e02e9 |
--- /dev/null |
+++ b/third_party/WebKit/public/platform/modules/fetch/fetch_api_request.mojom |
@@ -0,0 +1,105 @@ |
+// Copyright 2017 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 blink.mojom; |
+ |
+import "third_party/WebKit/public/platform/referrer.mojom"; |
+import "url/mojo/url.mojom"; |
+ |
+// The mode associated with a request. |
+// https://fetch.spec.whatwg.org/#concept-request-mode |
+enum FetchRequestMode { |
+ SAME_ORIGIN, |
+ NO_CORS, |
+ CORS, |
+ CORS_WITH_FORCED_PREFLIGHT, |
+ NAVIGATE, |
+}; |
+ |
+// Type of the context associated with a request. |
+enum RequestContextType { |
+ UNSPECIFIED, |
+ AUDIO, |
+ BEACON, |
+ CSP_REPORT, |
+ DOWNLOAD, |
+ EMBED, |
+ EVENT_SOURCE, |
+ FAVICON, |
+ FETCH, |
+ FONT, |
+ FORM, |
+ FRAME, |
+ HYPERLINK, |
+ IFRAME, |
+ IMAGE, |
+ IMAGE_SET, |
+ IMPORT, |
+ INTERNAL, |
+ LOCATION, |
+ MANIFEST, |
+ OBJECT, |
+ PING, |
+ PLUGIN, |
+ PREFETCH, |
+ SCRIPT, |
+ SERVICE_WORKER, |
+ SHARED_WORKER, |
+ SUBRESOURCE, |
+ STYLE, |
+ TRACK, |
+ VIDEO, |
+ WORKER, |
+ XML_HTTP_REQUEST, |
+ XSLT, |
+}; |
+ |
+// Frame type of the context associated with a request. |
+enum RequestContextFrameType { |
+ AUXILIARY, |
+ NESTED, |
+ NONE, |
+ TOP_LEVEL, |
+}; |
+ |
+// Credentials mode indicating which credentials should be included with a |
+// request. |
+enum FetchCredentialsMode { |
+ OMIT, |
+ SAME_ORIGIN, |
+ INCLUDE, |
+ PASSWORD, |
+}; |
+ |
+// The redirect mode indicating how redirects should be handled. |
+// https://fetch.spec.whatwg.org/#concept-request-redirect-mode |
+enum FetchRedirectMode { |
+ FOLLOW, |
+ ERROR_MODE, |
+ MANUAL, |
+}; |
+ |
+// Whether this is a regular fetch, or a foreign fetch request. |
+enum ServiceWorkerFetchType { |
+ FETCH, |
+ FOREIGN_FETCH, |
+}; |
+ |
+struct FetchAPIRequest { |
+ FetchRequestMode mode; |
+ bool is_main_resource_load; |
+ RequestContextType request_context_type; |
+ RequestContextFrameType frame_type; |
+ url.mojom.Url url; |
+ string method; |
+ map<string, string> headers; |
+ string? blob_uuid; |
+ uint64 blob_size; |
+ Referrer referrer; |
+ FetchCredentialsMode credentials_mode; |
+ FetchRedirectMode redirect_mode; |
+ string? client_id; |
+ bool is_reload; |
+ ServiceWorkerFetchType fetch_type; |
+}; |