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 ModuleScriptLoader_h | 5 #ifndef ModuleScriptLoader_h |
6 #define ModuleScriptLoader_h | 6 #define ModuleScriptLoader_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/loader/modulescript/ModuleScriptFetchRequest.h" | 9 #include "core/loader/modulescript/ModuleScriptFetchRequest.h" |
10 #include "core/loader/resource/ScriptResource.h" | 10 #include "core/loader/resource/ScriptResource.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 private: | 67 private: |
68 ModuleScriptLoader(Modulator*, | 68 ModuleScriptLoader(Modulator*, |
69 ModuleScriptLoaderRegistry*, | 69 ModuleScriptLoaderRegistry*, |
70 ModuleScriptLoaderClient*); | 70 ModuleScriptLoaderClient*); |
71 | 71 |
72 static ModuleScript* createModuleScript(const String& sourceText, | 72 static ModuleScript* createModuleScript(const String& sourceText, |
73 const KURL&, | 73 const KURL&, |
74 Modulator*, | 74 Modulator*, |
75 const String& nonce, | 75 const String& nonce, |
76 ParserDisposition, | 76 ParserDisposition, |
77 WebURLRequest::FetchCredentialsMode); | 77 WebURLRequest::FetchCredentialsMode, |
| 78 AccessControlStatus); |
78 | 79 |
79 void advanceState(State newState); | 80 void advanceState(State newState); |
80 #if DCHECK_IS_ON() | 81 #if DCHECK_IS_ON() |
81 static const char* stateToString(State); | 82 static const char* stateToString(State); |
82 #endif | 83 #endif |
83 | 84 |
84 // Implements ScriptResourceClient | 85 // Implements ScriptResourceClient |
85 void notifyFinished(Resource*) override; | 86 void notifyFinished(Resource*) override; |
86 String debugName() const override { return "ModuleScriptLoader"; } | 87 String debugName() const override { return "ModuleScriptLoader"; } |
87 | 88 |
88 static bool wasModuleLoadSuccessful(Resource*); | 89 static bool wasModuleLoadSuccessful(Resource*); |
89 | 90 |
90 Member<Modulator> m_modulator; | 91 Member<Modulator> m_modulator; |
91 State m_state = State::Initial; | 92 State m_state = State::Initial; |
92 String m_nonce; | 93 String m_nonce; |
93 ParserDisposition m_parserState; | 94 ParserDisposition m_parserState; |
94 Member<ModuleScript> m_moduleScript; | 95 Member<ModuleScript> m_moduleScript; |
95 Member<ModuleScriptLoaderRegistry> m_registry; | 96 Member<ModuleScriptLoaderRegistry> m_registry; |
96 Member<ModuleScriptLoaderClient> m_client; | 97 Member<ModuleScriptLoaderClient> m_client; |
97 #if DCHECK_IS_ON() | 98 #if DCHECK_IS_ON() |
98 KURL m_url; | 99 KURL m_url; |
99 #endif | 100 #endif |
100 }; | 101 }; |
101 | 102 |
102 } // namespace blink | 103 } // namespace blink |
103 | 104 |
104 #endif | 105 #endif |
OLD | NEW |