Bug 878875 - Import PannerNode tests from Blink. r=ehsan
[gecko.git] / content / media / webaudio / OfflineAudioCompletionEvent.h
blob669aa4de8677e090a00a0da7ff2322bcb0e925b3
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"
14 namespace mozilla {
15 namespace dom {
17 class OfflineAudioCompletionEvent : public nsDOMEvent,
18 public EnableWebAudioCheck
20 public:
21 OfflineAudioCompletionEvent(AudioContext* aOwner,
22 nsPresContext *aPresContext,
23 nsEvent *aEvent);
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;
43 private:
44 nsRefPtr<AudioBuffer> mRenderedBuffer;
50 #endif