| 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 #ifndef WindowAudioWorklet_h | 5 #ifndef WindowAudioWorklet_h |
| 6 #define WindowAudioWorklet_h | 6 #define WindowAudioWorklet_h |
| 7 | 7 |
| 8 #include "core/frame/DOMWindowProperty.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class AudioWorklet; | 15 class AudioWorklet; |
| 16 class DOMWindow; | 16 class DOMWindow; |
| 17 class LocalDOMWindow; | 17 class LocalDOMWindow; |
| 18 class Worklet; | 18 class Worklet; |
| 19 | 19 |
| 20 class MODULES_EXPORT WindowAudioWorklet final | 20 class MODULES_EXPORT WindowAudioWorklet final |
| 21 : public GarbageCollected<WindowAudioWorklet>, | 21 : public GarbageCollected<WindowAudioWorklet>, |
| 22 public Supplement<LocalDOMWindow>, | 22 public Supplement<LocalDOMWindow>, |
| 23 public DOMWindowProperty { | 23 public ContextLifecycleObserver { |
| 24 USING_GARBAGE_COLLECTED_MIXIN(WindowAudioWorklet); | 24 USING_GARBAGE_COLLECTED_MIXIN(WindowAudioWorklet); |
| 25 | 25 |
| 26 public: | 26 public: |
| 27 static WindowAudioWorklet& from(LocalDOMWindow&); | 27 static WindowAudioWorklet& from(LocalDOMWindow&); |
| 28 static Worklet* audioWorklet(DOMWindow&); | 28 static Worklet* audioWorklet(DOMWindow&); |
| 29 AudioWorklet* audioWorklet(); | 29 AudioWorklet* audioWorklet(LocalDOMWindow&); |
| 30 | 30 |
| 31 void frameDestroyed() override; | 31 void contextDestroyed() override; |
| 32 | 32 |
| 33 DECLARE_TRACE(); | 33 DECLARE_TRACE(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 explicit WindowAudioWorklet(LocalDOMWindow&); | 36 explicit WindowAudioWorklet(LocalDOMWindow&); |
| 37 static const char* supplementName(); | 37 static const char* supplementName(); |
| 38 | 38 |
| 39 Member<AudioWorklet> m_audioWorklet; | 39 Member<AudioWorklet> m_audioWorklet; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace blink | 42 } // namespace blink |
| 43 | 43 |
| 44 #endif // WindowAudioWorklet_h | 44 #endif // WindowAudioWorklet_h |
| OLD | NEW |