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

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

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 class DynamicsCompressorNode; 66 class DynamicsCompressorNode;
67 class AnalyserNode; 67 class AnalyserNode;
68 class WaveShaperNode; 68 class WaveShaperNode;
69 class ScriptProcessorNode; 69 class ScriptProcessorNode;
70 class OscillatorNode; 70 class OscillatorNode;
71 class PeriodicWave; 71 class PeriodicWave;
72 72
73 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it. 73 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it.
74 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism. 74 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism.
75 75
76 class AudioContext : public ActiveDOMObject, public ScriptWrappable, public Thre adSafeRefCounted<AudioContext>, public EventTarget { 76 class AudioContext : public EventTarget, public ActiveDOMObject, public ScriptWr appable, public ThreadSafeRefCounted<AudioContext> {
77 public: 77 public:
78 // Create an AudioContext for rendering to the audio hardware. 78 // Create an AudioContext for rendering to the audio hardware.
79 static PassRefPtr<AudioContext> create(Document*); 79 static PassRefPtr<AudioContext> create(Document*);
80 80
81 // Create an AudioContext for offline (non-realtime) rendering. 81 // Create an AudioContext for offline (non-realtime) rendering.
82 static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned num berOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&); 82 static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned num berOfChannels, size_t numberOfFrames, float sampleRate, ExceptionCode&);
83 83
84 virtual ~AudioContext(); 84 virtual ~AudioContext();
85 85
86 bool isInitialized() const; 86 bool isInitialized() const;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // It is somewhat arbitrary and could be increased if necessary. 347 // It is somewhat arbitrary and could be increased if necessary.
348 enum { MaxNumberOfChannels = 32 }; 348 enum { MaxNumberOfChannels = 32 };
349 349
350 // Number of AudioBufferSourceNodes that are active (playing). 350 // Number of AudioBufferSourceNodes that are active (playing).
351 int m_activeSourceCount; 351 int m_activeSourceCount;
352 }; 352 };
353 353
354 } // WebCore 354 } // WebCore
355 355
356 #endif // AudioContext_h 356 #endif // AudioContext_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698