| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/csspaint/WindowPaintWorklet.h" | 5 #include "modules/csspaint/WindowPaintWorklet.h" |
| 6 | 6 |
| 7 #include "core/frame/LocalDOMWindow.h" | 7 #include "core/frame/LocalDOMWindow.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "modules/csspaint/PaintWorklet.h" | 9 #include "modules/csspaint/PaintWorklet.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 return *supplement; | 28 return *supplement; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // static | 31 // static |
| 32 Worklet* WindowPaintWorklet::paintWorklet(DOMWindow& window) { | 32 Worklet* WindowPaintWorklet::paintWorklet(DOMWindow& window) { |
| 33 return from(toLocalDOMWindow(window)).paintWorklet(); | 33 return from(toLocalDOMWindow(window)).paintWorklet(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 PaintWorklet* WindowPaintWorklet::paintWorklet() { | 36 PaintWorklet* WindowPaintWorklet::paintWorklet() { |
| 37 if (!m_paintWorklet && host()->frame()) | 37 if (!m_paintWorklet && supplementable()->frame()) |
| 38 m_paintWorklet = PaintWorklet::create(host()->frame()); | 38 m_paintWorklet = PaintWorklet::create(supplementable()->frame()); |
| 39 return m_paintWorklet.get(); | 39 return m_paintWorklet.get(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 DEFINE_TRACE(WindowPaintWorklet) { | 42 DEFINE_TRACE(WindowPaintWorklet) { |
| 43 visitor->trace(m_paintWorklet); | 43 visitor->trace(m_paintWorklet); |
| 44 Supplement<LocalDOMWindow>::trace(visitor); | 44 Supplement<LocalDOMWindow>::trace(visitor); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace blink | 47 } // namespace blink |
| OLD | NEW |