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