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

Side by Side Diff: Source/modules/webaudio/AudioContext.h

Issue 1163253003: Clean up macros around DEFINE_EVENT_TARGET_REFCOUNTING (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/speech/SpeechSynthesisUtterance.h ('k') | Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 class ScriptPromiseResolver; 71 class ScriptPromiseResolver;
72 class ScriptState; 72 class ScriptState;
73 class SecurityOrigin; 73 class SecurityOrigin;
74 class StereoPannerNode; 74 class StereoPannerNode;
75 class WaveShaperNode; 75 class WaveShaperNode;
76 76
77 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it. 77 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it.
78 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism. 78 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism.
79 79
80 class MODULES_EXPORT AudioContext : public RefCountedGarbageCollectedEventTarget WithInlineData<AudioContext>, public ActiveDOMObject { 80 class MODULES_EXPORT AudioContext : public RefCountedGarbageCollectedEventTarget WithInlineData<AudioContext>, public ActiveDOMObject {
81 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<A udioContext>); 81 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(AudioContext);
82 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext); 82 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AudioContext);
83 DEFINE_WRAPPERTYPEINFO(); 83 DEFINE_WRAPPERTYPEINFO();
84 public: 84 public:
85 // The state of an audio context. On creation, the state is Suspended. The state is Running if 85 // The state of an audio context. On creation, the state is Suspended. The state is Running if
86 // audio is being processed (audio graph is being pulled for data). The stat e is Closed if the 86 // audio is being processed (audio graph is being pulled for data). The stat e is Closed if the
87 // audio context has been closed. The valid transitions are from Suspended to either Running or 87 // audio context has been closed. The valid transitions are from Suspended to either Running or
88 // Closed; Running to Suspended or Closed. Once Closed, there are no valid t ransitions. 88 // Closed; Running to Suspended or Closed. Once Closed, there are no valid t ransitions.
89 enum AudioContextState { 89 enum AudioContextState {
90 Suspended, 90 Suspended,
91 Running, 91 Running,
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // This is considering 32 is large enough for multiple channels audio. 322 // This is considering 32 is large enough for multiple channels audio.
323 // It is somewhat arbitrary and could be increased if necessary. 323 // It is somewhat arbitrary and could be increased if necessary.
324 enum { MaxNumberOfChannels = 32 }; 324 enum { MaxNumberOfChannels = 32 };
325 325
326 unsigned m_contextId; 326 unsigned m_contextId;
327 }; 327 };
328 328
329 } // namespace blink 329 } // namespace blink
330 330
331 #endif // AudioContext_h 331 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « Source/modules/speech/SpeechSynthesisUtterance.h ('k') | Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698