Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ModuleController.h

Issue 2555653002: [WIP Prototype] ES6 https://html.spec.whatwg.org/#fetch-a-single-module-script implementation (Closed)
Patch Set: ModuleScriptLoaderTest Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ModuleController_h
6 #define ModuleController_h
7
8 #include "bindings/core/v8/ScriptModule.h"
9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/CoreExport.h"
11 #include "platform/heap/Handle.h"
12 #include "wtf/text/WTFString.h"
13 #include <memory>
14
15 namespace blink {
16
17 // ModuleController is responsible for setting up V8 state for various
18 // ScriptModule operations.
19 // ModuleController is analogus to ScriptController.
20 class CORE_EXPORT ModuleController final
21 : public GarbageCollectedFinalized<ModuleController> {
22 public:
23 static ModuleController* create(RefPtr<ScriptState> scriptState) {
24 return new ModuleController(std::move(scriptState));
25 }
26 ~ModuleController();
27 DEFINE_INLINE_TRACE() {}
28
29 // TODO(kouhei): script should be a ScriptSourceCode.
30 ScriptModule compileModule(const String& script, const String& urlStr);
31 bool instantiateModule(ScriptModule);
32 Vector<String> moduleRequestsFromScriptModule(ScriptModule);
33 // TODO(kouhei): move this to V8ScriptRunner.
34 void executeModule(ScriptModule);
35
36 private:
37 explicit ModuleController(RefPtr<ScriptState>);
38
39 RefPtr<ScriptState> m_scriptState;
40 };
41
42 } // namespace blink
43
44 #endif // ModuleController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698