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