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 ModuleScriptFetchRequest_h | 5 #ifndef ModuleScriptFetchRequest_h |
6 #define ModuleScriptFetchRequest_h | 6 #define ModuleScriptFetchRequest_h |
7 | 7 |
8 #include "platform/loader/fetch/ResourceLoaderOptions.h" | 8 #include "platform/loader/fetch/ResourceLoaderOptions.h" |
9 #include "platform/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "platform/weborigin/Referrer.h" | 10 #include "platform/weborigin/Referrer.h" |
11 #include "public/platform/WebURLRequest.h" | 11 #include "public/platform/WebURLRequest.h" |
12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 // A ModuleScriptFetchRequest is a "parameter object" for | |
17 // Modulator::fetch{,New}SingleModule to avoid the methods having too many | |
18 // arguments. | |
19 // In terms of spec, a ModuleScriptFetchRequest carries most of the arguments | 16 // In terms of spec, a ModuleScriptFetchRequest carries most of the arguments |
20 // for "fetch a single module script" algorithm: | 17 // for "fetch a single module script" algorithm: |
21 // https://html.spec.whatwg.org/#fetch-a-single-module-script | 18 // https://html.spec.whatwg.org/#fetch-a-single-module-script |
22 class ModuleScriptFetchRequest final { | 19 class ModuleScriptFetchRequest final { |
23 STACK_ALLOCATED(); | 20 STACK_ALLOCATED(); |
24 | 21 |
25 public: | 22 public: |
26 ModuleScriptFetchRequest(const KURL& url, | 23 ModuleScriptFetchRequest(const KURL& url, |
27 const String& nonce, | 24 const String& nonce, |
28 ParserDisposition parserState, | 25 ParserDisposition parserState, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const KURL m_url; | 57 const KURL m_url; |
61 const String m_nonce; | 58 const String m_nonce; |
62 const ParserDisposition m_parserState; | 59 const ParserDisposition m_parserState; |
63 const WebURLRequest::FetchCredentialsMode m_credentialsMode; | 60 const WebURLRequest::FetchCredentialsMode m_credentialsMode; |
64 const AtomicString m_referrer; | 61 const AtomicString m_referrer; |
65 }; | 62 }; |
66 | 63 |
67 } // namespace blink | 64 } // namespace blink |
68 | 65 |
69 #endif | 66 #endif |
OLD | NEW |