| 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 Modulator_h | 5 #ifndef Modulator_h |
| 6 #define Modulator_h | 6 #define Modulator_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "platform/weborigin/KURL.h" |
| 10 | 11 |
| 11 namespace blink { | 12 namespace blink { |
| 12 | 13 |
| 13 class LocalFrame; | 14 class LocalFrame; |
| 14 | 15 |
| 15 // A Modulator is an interface for "environment settings object" concept for | 16 // A Modulator is an interface for "environment settings object" concept for |
| 16 // module scripts. | 17 // module scripts. |
| 17 // https://html.spec.whatwg.org/#environment-settings-object | 18 // https://html.spec.whatwg.org/#environment-settings-object |
| 18 // | 19 // |
| 19 // A Modulator also serves as an entry point for various module spec algorithms. | 20 // A Modulator also serves as an entry point for various module spec algorithms. |
| 20 class CORE_EXPORT Modulator : public GarbageCollectedMixin { | 21 class CORE_EXPORT Modulator : public GarbageCollectedMixin { |
| 21 public: | 22 public: |
| 22 static Modulator* from(LocalFrame*); | 23 static Modulator* from(LocalFrame*); |
| 24 |
| 25 // https://html.spec.whatwg.org/#resolve-a-module-specifier |
| 26 static KURL resolveModuleSpecifier(const String& moduleRequest, |
| 27 const KURL& baseURL); |
| 23 }; | 28 }; |
| 24 | 29 |
| 25 } // namespace blink | 30 } // namespace blink |
| 26 | 31 |
| 27 #endif | 32 #endif |
| OLD | NEW |