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

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

Issue 27037002: Get rid of custom bindings for AudioContext's constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 class PeriodicWave; 70 class PeriodicWave;
71 class ScriptProcessorNode; 71 class ScriptProcessorNode;
72 class WaveShaperNode; 72 class WaveShaperNode;
73 73
74 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it. 74 // AudioContext is the cornerstone of the web audio API and all AudioNodes are c reated from it.
75 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism. 75 // For thread safety between the audio thread and the main thread, it has a rend ering graph locking mechanism.
76 76
77 class AudioContext : public ActiveDOMObject, public ScriptWrappable, public Thre adSafeRefCounted<AudioContext>, public EventTargetWithInlineData { 77 class AudioContext : public ActiveDOMObject, public ScriptWrappable, public Thre adSafeRefCounted<AudioContext>, public EventTargetWithInlineData {
78 public: 78 public:
79 // Create an AudioContext for rendering to the audio hardware. 79 // Create an AudioContext for rendering to the audio hardware.
80 static PassRefPtr<AudioContext> create(Document*); 80 static PassRefPtr<AudioContext> create(Document&, ExceptionState&);
81 81
82 // Create an AudioContext for offline (non-realtime) rendering. 82 // Deprecated: create an AudioContext for offline (non-realtime) rendering.
83 static PassRefPtr<AudioContext> createOfflineContext(Document*, unsigned num berOfChannels, size_t numberOfFrames, float sampleRate, ExceptionState&); 83 static PassRefPtr<AudioContext> create(Document&, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionState&);
84 84
85 virtual ~AudioContext(); 85 virtual ~AudioContext();
86 86
87 bool isInitialized() const; 87 bool isInitialized() const;
88 88
89 bool isOfflineContext() { return m_isOfflineContext; } 89 bool isOfflineContext() { return m_isOfflineContext; }
90 90
91 // Returns true when initialize() was called AND all asynchronous initializa tion has completed. 91 // Returns true when initialize() was called AND all asynchronous initializa tion has completed.
92 bool isRunnable() const; 92 bool isRunnable() const;
93 93
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // It is somewhat arbitrary and could be increased if necessary. 344 // It is somewhat arbitrary and could be increased if necessary.
345 enum { MaxNumberOfChannels = 32 }; 345 enum { MaxNumberOfChannels = 32 };
346 346
347 // Number of AudioBufferSourceNodes that are active (playing). 347 // Number of AudioBufferSourceNodes that are active (playing).
348 int m_activeSourceCount; 348 int m_activeSourceCount;
349 }; 349 };
350 350
351 } // WebCore 351 } // WebCore
352 352
353 #endif // AudioContext_h 353 #endif // AudioContext_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8AudioContextCustom.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698