1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef OfflineAudioCompletionEvent_h_
8 #define OfflineAudioCompletionEvent_h_
10 #include "nsDOMEvent.h"
11 #include "AudioBuffer.h"
12 #include "AudioContext.h"
17 class OfflineAudioCompletionEvent
: public nsDOMEvent
,
18 public EnableWebAudioCheck
21 OfflineAudioCompletionEvent(AudioContext
* aOwner
,
22 nsPresContext
*aPresContext
,
25 NS_DECL_ISUPPORTS_INHERITED
26 NS_FORWARD_TO_NSDOMEVENT
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(OfflineAudioCompletionEvent
, nsDOMEvent
)
29 virtual JSObject
* WrapObject(JSContext
* aCx
,
30 JS::Handle
<JSObject
*> aScope
) MOZ_OVERRIDE
;
32 void InitEvent(AudioBuffer
* aRenderedBuffer
)
34 InitEvent(NS_LITERAL_STRING("complete"), false, false);
35 mRenderedBuffer
= aRenderedBuffer
;
38 AudioBuffer
* RenderedBuffer() const
40 return mRenderedBuffer
;
44 nsRefPtr
<AudioBuffer
> mRenderedBuffer
;