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