blob: f8518d64bffec8293a366b783da6f9320e266f0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// 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.
#include "third_party/blink/renderer/core/script/document_modulator_impl.h"
#include "third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
namespace blink {
ModulatorImplBase* DocumentModulatorImpl::Create(
ScriptState* script_state,
ResourceFetcher* resource_fetcher) {
return MakeGarbageCollected<DocumentModulatorImpl>(script_state,
resource_fetcher);
}
ModuleScriptFetcher* DocumentModulatorImpl::CreateModuleScriptFetcher(
ModuleScriptCustomFetchType custom_fetch_type) {
DCHECK_EQ(ModuleScriptCustomFetchType::kNone, custom_fetch_type);
return MakeGarbageCollected<DocumentModuleScriptFetcher>(fetcher_);
}
void DocumentModulatorImpl::Trace(blink::Visitor* visitor) {
visitor->Trace(fetcher_);
ModulatorImplBase::Trace(visitor);
}
DocumentModulatorImpl::DocumentModulatorImpl(ScriptState* script_state,
ResourceFetcher* resource_fetcher)
: ModulatorImplBase(script_state), fetcher_(resource_fetcher) {
DCHECK(fetcher_);
}
bool DocumentModulatorImpl::IsDynamicImportForbidden(String* reason) {
return false;
}
} // namespace blink
|