Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/WindowAudioWorklet.cpp

Issue 2388693002: Make DOMWindowProperty a thin wrapper of ContextLifecycleObserver
Patch Set: temp Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/webaudio/WindowAudioWorklet.h" 5 #include "modules/webaudio/WindowAudioWorklet.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/webaudio/AudioWorklet.h" 9 #include "modules/webaudio/AudioWorklet.h"
10 10
(...skipping 19 matching lines...) Expand all
30 Worklet* WindowAudioWorklet::audioWorklet(DOMWindow& window) { 30 Worklet* WindowAudioWorklet::audioWorklet(DOMWindow& window) {
31 return from(toLocalDOMWindow(window)).audioWorklet(); 31 return from(toLocalDOMWindow(window)).audioWorklet();
32 } 32 }
33 33
34 AudioWorklet* WindowAudioWorklet::audioWorklet() { 34 AudioWorklet* WindowAudioWorklet::audioWorklet() {
35 if (!m_audioWorklet && frame()) 35 if (!m_audioWorklet && frame())
36 m_audioWorklet = AudioWorklet::create(frame()); 36 m_audioWorklet = AudioWorklet::create(frame());
37 return m_audioWorklet.get(); 37 return m_audioWorklet.get();
38 } 38 }
39 39
40 void WindowAudioWorklet::frameDestroyed() { 40 void WindowAudioWorklet::contextDestroyed() {
41 m_audioWorklet.clear(); 41 m_audioWorklet.clear();
42 DOMWindowProperty::frameDestroyed(); 42 DOMWindowProperty::contextDestroyed();
43 } 43 }
44 44
45 DEFINE_TRACE(WindowAudioWorklet) { 45 DEFINE_TRACE(WindowAudioWorklet) {
46 visitor->trace(m_audioWorklet); 46 visitor->trace(m_audioWorklet);
47 Supplement<LocalDOMWindow>::trace(visitor); 47 Supplement<LocalDOMWindow>::trace(visitor);
48 DOMWindowProperty::trace(visitor); 48 DOMWindowProperty::trace(visitor);
49 } 49 }
50 50
51 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698