| 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 #include "core/dom/Modulator.h" | 5 #include "core/dom/Modulator.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8BindingForCore.h" | 7 #include "bindings/core/v8/V8BindingForCore.h" |
| 8 #include "bindings/core/v8/V8PerContextData.h" | |
| 9 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 10 #include "core/dom/ModulatorImpl.h" | 9 #include "core/dom/ModulatorImpl.h" |
| 11 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
| 12 #include "platform/bindings/ScriptState.h" | 11 #include "platform/bindings/ScriptState.h" |
| 12 #include "platform/bindings/V8PerContextData.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 const char kPerContextDataKey[] = "Modulator"; | 17 const char kPerContextDataKey[] = "Modulator"; |
| 18 } // namespace | 18 } // namespace |
| 19 | 19 |
| 20 Modulator* Modulator::From(ScriptState* script_state) { | 20 Modulator* Modulator::From(ScriptState* script_state) { |
| 21 if (!script_state) | 21 if (!script_state) |
| 22 return nullptr; | 22 return nullptr; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // script's base URL as the base URL. | 72 // script's base URL as the base URL. |
| 73 DCHECK(base_url.IsValid()); | 73 DCHECK(base_url.IsValid()); |
| 74 KURL absolute_url(base_url, module_request); | 74 KURL absolute_url(base_url, module_request); |
| 75 if (absolute_url.IsValid()) | 75 if (absolute_url.IsValid()) |
| 76 return absolute_url; | 76 return absolute_url; |
| 77 | 77 |
| 78 return KURL(); | 78 return KURL(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| OLD | NEW |