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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 SecurityOrigin* securityOrigin() const; | 238 SecurityOrigin* securityOrigin() const; |
239 | 239 |
240 protected: | 240 protected: |
241 explicit AbstractAudioContext(Document*); | 241 explicit AbstractAudioContext(Document*); |
242 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); | 242 AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFr
ames, float sampleRate); |
243 | 243 |
244 void setContextState(AudioContextState); | 244 void setContextState(AudioContextState); |
245 virtual void didClose() {} | 245 virtual void didClose() {} |
246 void uninitialize(); | 246 void uninitialize(); |
247 | 247 |
248 RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; | 248 Member<ScriptPromiseResolver> m_offlineResolver; |
249 | 249 |
250 // FIXME(dominicc): Move m_resumeResolvers to AudioContext, because only | 250 // FIXME(dominicc): Move m_resumeResolvers to AudioContext, because only |
251 // it creates these Promises. | 251 // it creates these Promises. |
252 // Vector of promises created by resume(). It takes time to handle them, so
we collect all of | 252 // Vector of promises created by resume(). It takes time to handle them, so
we collect all of |
253 // the promises here until they can be resolved or rejected. | 253 // the promises here until they can be resolved or rejected. |
254 WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_resumeResolver
s; | 254 HeapVector<Member<ScriptPromiseResolver>> m_resumeResolvers; |
255 private: | 255 private: |
256 void initialize(); | 256 void initialize(); |
257 | 257 |
258 bool m_isCleared; | 258 bool m_isCleared; |
259 void clear(); | 259 void clear(); |
260 | 260 |
261 void throwExceptionForClosedState(ExceptionState&); | 261 void throwExceptionForClosedState(ExceptionState&); |
262 | 262 |
263 // Set to true when the destination node has been initialized and is ready t
o process data. | 263 // Set to true when the destination node has been initialized and is ready t
o process data. |
264 bool m_isInitialized; | 264 bool m_isInitialized; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 void handleStoppableSourceNodes(); | 315 void handleStoppableSourceNodes(); |
316 | 316 |
317 // This is considering 32 is large enough for multiple channels audio. | 317 // This is considering 32 is large enough for multiple channels audio. |
318 // It is somewhat arbitrary and could be increased if necessary. | 318 // It is somewhat arbitrary and could be increased if necessary. |
319 enum { MaxNumberOfChannels = 32 }; | 319 enum { MaxNumberOfChannels = 32 }; |
320 }; | 320 }; |
321 | 321 |
322 } // namespace blink | 322 } // namespace blink |
323 | 323 |
324 #endif // AbstractAudioContext_h | 324 #endif // AbstractAudioContext_h |
OLD | NEW |