Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 #include "core/dom/Modulator.h" | |
| 6 | |
| 7 #include "bindings/core/v8/ScriptState.h" | |
| 8 | |
| 9 namespace blink { | |
| 10 | |
| 11 Modulator* Modulator::from(LocalFrame* frame) { | |
| 12 ScriptState* scriptState = ScriptState::forMainWorld(frame); | |
| 13 if (!scriptState) | |
| 14 return nullptr; | |
| 15 // TODO(kouhei): setModulator in V8PerContextData when we land ModulatorImpl. | |
| 16 return scriptState->perContextData()->modulator(); | |
| 17 } | |
| 18 | |
| 19 } // namespace blink | |
| OLD | NEW |