OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 */ | 23 */ |
24 | 24 |
25 #ifndef AudioNode_h | 25 #ifndef AudioNode_h |
26 #define AudioNode_h | 26 #define AudioNode_h |
27 | 27 |
28 #include "modules/EventTargetModules.h" | 28 #include "modules/EventTargetModules.h" |
29 #include "modules/ModulesExport.h" | 29 #include "modules/ModulesExport.h" |
30 #include "platform/audio/AudioBus.h" | 30 #include "platform/audio/AudioBus.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
| 32 #include "wtf/OwnPtr.h" |
| 33 #include "wtf/PassOwnPtr.h" |
32 #include "wtf/RefPtr.h" | 34 #include "wtf/RefPtr.h" |
33 #include "wtf/ThreadSafeRefCounted.h" | 35 #include "wtf/ThreadSafeRefCounted.h" |
34 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
35 #include "wtf/build_config.h" | 37 #include "wtf/build_config.h" |
36 #include <memory> | |
37 | 38 |
38 #define DEBUG_AUDIONODE_REFERENCES 0 | 39 #define DEBUG_AUDIONODE_REFERENCES 0 |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class AbstractAudioContext; | 43 class AbstractAudioContext; |
43 class AudioNode; | 44 class AudioNode; |
44 class AudioNodeInput; | 45 class AudioNodeInput; |
45 class AudioNodeOutput; | 46 class AudioNodeOutput; |
46 class AudioParam; | 47 class AudioParam; |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // See http://crbug.com/404527 for the detail. | 245 // See http://crbug.com/404527 for the detail. |
245 UntracedMember<AudioNode> m_node; | 246 UntracedMember<AudioNode> m_node; |
246 | 247 |
247 // This untraced member is safe because this is cleared for all of live | 248 // This untraced member is safe because this is cleared for all of live |
248 // AudioHandlers when the AbstractAudioContext dies. Do not access m_contex
t | 249 // AudioHandlers when the AbstractAudioContext dies. Do not access m_contex
t |
249 // directly, use context() instead. | 250 // directly, use context() instead. |
250 // See http://crbug.com/404527 for the detail. | 251 // See http://crbug.com/404527 for the detail. |
251 UntracedMember<AbstractAudioContext> m_context; | 252 UntracedMember<AbstractAudioContext> m_context; |
252 | 253 |
253 float m_sampleRate; | 254 float m_sampleRate; |
254 Vector<std::unique_ptr<AudioNodeInput>> m_inputs; | 255 Vector<OwnPtr<AudioNodeInput>> m_inputs; |
255 Vector<std::unique_ptr<AudioNodeOutput>> m_outputs; | 256 Vector<OwnPtr<AudioNodeOutput>> m_outputs; |
256 | 257 |
257 double m_lastProcessingTime; | 258 double m_lastProcessingTime; |
258 double m_lastNonSilentTime; | 259 double m_lastNonSilentTime; |
259 | 260 |
260 volatile int m_connectionRefCount; | 261 volatile int m_connectionRefCount; |
261 | 262 |
262 bool m_isDisabled; | 263 bool m_isDisabled; |
263 | 264 |
264 #if DEBUG_AUDIONODE_REFERENCES | 265 #if DEBUG_AUDIONODE_REFERENCES |
265 static bool s_isNodeCountInitialized; | 266 static bool s_isNodeCountInitialized; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; | 337 HeapVector<Member<HeapHashSet<Member<AudioNode>>>> m_connectedNodes; |
337 // Represents audio node graph with Oilpan references. N-th HeapHashSet | 338 // Represents audio node graph with Oilpan references. N-th HeapHashSet |
338 // represents a set of AudioParam objects connected to this AudioNode's N-th | 339 // represents a set of AudioParam objects connected to this AudioNode's N-th |
339 // output. | 340 // output. |
340 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; | 341 HeapVector<Member<HeapHashSet<Member<AudioParam>>>> m_connectedParams; |
341 }; | 342 }; |
342 | 343 |
343 } // namespace blink | 344 } // namespace blink |
344 | 345 |
345 #endif // AudioNode_h | 346 #endif // AudioNode_h |
OLD | NEW |