Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 "AudioBuffer.h"
11 #include "mozilla/dom/Event.h"
13 namespace mozilla {
14 namespace dom {
16 class AudioContext;
18 class OfflineAudioCompletionEvent : public Event
19 {
20 public:
21 OfflineAudioCompletionEvent(AudioContext* aOwner,
22 nsPresContext* aPresContext,
23 WidgetEvent* aEvent);
25 NS_DECL_ISUPPORTS_INHERITED
26 NS_FORWARD_TO_EVENT
27 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(OfflineAudioCompletionEvent, Event)
29 virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
31 void InitEvent(AudioBuffer* aRenderedBuffer)
32 {
33 InitEvent(NS_LITERAL_STRING("complete"), false, false);
34 mRenderedBuffer = aRenderedBuffer;
35 }
37 AudioBuffer* RenderedBuffer() const
38 {
39 return mRenderedBuffer;
40 }
42 private:
43 nsRefPtr<AudioBuffer> mRenderedBuffer;
44 };
46 }
47 }
49 #endif