| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef FetchAPIRequestStructTraits_h | 5 #ifndef FetchAPIRequestStructTraits_h |
| 6 #define FetchAPIRequestStructTraits_h | 6 #define FetchAPIRequestStructTraits_h |
| 7 | 7 |
| 8 #include "platform/wtf/text/WTFString.h" | 8 #include "platform/wtf/text/WTFString.h" |
| 9 #include "public/platform/WebURLRequest.h" | 9 #include "public/platform/WebURLRequest.h" |
| 10 #include "public/platform/modules/fetch/fetch_api_request.mojom-blink.h" | 10 #include "public/platform/modules/fetch/fetch_api_request.mojom-blink.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 static blink::WebURLRequest::FetchCredentialsMode credentials_mode( | 109 static blink::WebURLRequest::FetchCredentialsMode credentials_mode( |
| 110 const blink::WebServiceWorkerRequest& request) { | 110 const blink::WebServiceWorkerRequest& request) { |
| 111 return request.CredentialsMode(); | 111 return request.CredentialsMode(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 static blink::WebURLRequest::FetchRedirectMode redirect_mode( | 114 static blink::WebURLRequest::FetchRedirectMode redirect_mode( |
| 115 const blink::WebServiceWorkerRequest& request) { | 115 const blink::WebServiceWorkerRequest& request) { |
| 116 return request.RedirectMode(); | 116 return request.RedirectMode(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 static WTF::String integrity(const blink::WebServiceWorkerRequest&); |
| 119 static WTF::String client_id(const blink::WebServiceWorkerRequest&); | 120 static WTF::String client_id(const blink::WebServiceWorkerRequest&); |
| 120 | 121 |
| 121 static bool is_reload(const blink::WebServiceWorkerRequest& request) { | 122 static bool is_reload(const blink::WebServiceWorkerRequest& request) { |
| 122 return request.IsReload(); | 123 return request.IsReload(); |
| 123 } | 124 } |
| 124 | 125 |
| 125 // The |fetch_type| is not used by Blink yet. | 126 // The |fetch_type| is not used by Blink yet. |
| 126 static blink::mojom::blink::ServiceWorkerFetchType fetch_type( | 127 static blink::mojom::blink::ServiceWorkerFetchType fetch_type( |
| 127 const blink::WebServiceWorkerRequest& request) { | 128 const blink::WebServiceWorkerRequest& request) { |
| 128 return blink::mojom::blink::ServiceWorkerFetchType::FETCH; | 129 return blink::mojom::blink::ServiceWorkerFetchType::FETCH; |
| 129 } | 130 } |
| 130 | 131 |
| 131 static bool Read(blink::mojom::FetchAPIRequestDataView, | 132 static bool Read(blink::mojom::FetchAPIRequestDataView, |
| 132 blink::WebServiceWorkerRequest* output); | 133 blink::WebServiceWorkerRequest* output); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace mojo | 136 } // namespace mojo |
| 136 | 137 |
| 137 #endif // FetchAPIRequestStructTraits_h | 138 #endif // FetchAPIRequestStructTraits_h |
| OLD | NEW |