| 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 ModuleScript_h | 5 #ifndef ModuleScript_h |
| 6 #define ModuleScript_h | 6 #define ModuleScript_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptModule.h" | 8 #include "bindings/core/v8/ScriptModule.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/CoreExport.h" | 10 #include "core/CoreExport.h" |
| 10 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 11 #include "platform/loader/fetch/ResourceLoaderOptions.h" | 12 #include "platform/loader/fetch/ResourceLoaderOptions.h" |
| 12 #include "platform/weborigin/KURL.h" | 13 #include "platform/weborigin/KURL.h" |
| 13 #include "public/platform/WebURLRequest.h" | 14 #include "public/platform/WebURLRequest.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-
instantiation-state | 18 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-
instantiation-state |
| 18 enum class ModuleInstantiationState { | 19 enum class ModuleInstantiationState { |
| 19 Uninstantiated, | 20 Uninstantiated, |
| 20 Errored, | 21 Errored, |
| 21 Instantiated, | 22 Instantiated, |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 // ModuleScript is a model object for the "module script" spec concept. | 25 // ModuleScript is a model object for the "module script" spec concept. |
| 25 // https://html.spec.whatwg.org/multipage/webappapis.html#module-script | 26 // https://html.spec.whatwg.org/multipage/webappapis.html#module-script |
| 26 class CORE_EXPORT ModuleScript final | 27 class CORE_EXPORT ModuleScript final |
| 27 : public GarbageCollectedFinalized<ModuleScript> { | 28 : public GarbageCollectedFinalized<ModuleScript>, |
| 29 public TraceWrapperBase { |
| 28 public: | 30 public: |
| 29 static ModuleScript* create( | 31 static ModuleScript* create( |
| 30 ScriptModule record, | 32 ScriptModule record, |
| 31 const KURL& baseURL, | 33 const KURL& baseURL, |
| 32 const String& nonce, | 34 const String& nonce, |
| 33 ParserDisposition parserState, | 35 ParserDisposition parserState, |
| 34 WebURLRequest::FetchCredentialsMode credentialsMode) { | 36 WebURLRequest::FetchCredentialsMode credentialsMode) { |
| 35 return new ModuleScript(record, baseURL, nonce, parserState, | 37 return new ModuleScript(record, baseURL, nonce, parserState, |
| 36 credentialsMode); | 38 credentialsMode); |
| 37 } | 39 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-parser | 91 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-parser |
| 90 const ParserDisposition m_parserState; | 92 const ParserDisposition m_parserState; |
| 91 | 93 |
| 92 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-credentials-mode | 94 // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-scrip
t-credentials-mode |
| 93 const WebURLRequest::FetchCredentialsMode m_credentialsMode; | 95 const WebURLRequest::FetchCredentialsMode m_credentialsMode; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 } // namespace blink | 98 } // namespace blink |
| 97 | 99 |
| 98 #endif | 100 #endif |
| OLD | NEW |