Line data Source code
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/. */
6 :
7 : /* THIS FILE IS AUTOGENERATED FROM SpeechSynthesisErrorEvent.webidl BY Codegen.py - DO NOT EDIT */
8 :
9 : #include "SpeechSynthesisErrorEvent.h"
10 : #include "SpeechSynthesisErrorEventBinding.h"
11 : #include "SpeechSynthesisEventBinding.h"
12 : #include "js/GCAPI.h"
13 : #include "mozilla/dom/Nullable.h"
14 : #include "mozilla/dom/PrimitiveConversions.h"
15 : #include "mozilla/dom/SpeechSynthesisErrorEvent.h"
16 :
17 : namespace mozilla {
18 : namespace dom {
19 :
20 :
21 : NS_IMPL_CYCLE_COLLECTION_CLASS(SpeechSynthesisErrorEvent)
22 :
23 0 : NS_IMPL_ADDREF_INHERITED(SpeechSynthesisErrorEvent, SpeechSynthesisEvent)
24 0 : NS_IMPL_RELEASE_INHERITED(SpeechSynthesisErrorEvent, SpeechSynthesisEvent)
25 :
26 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(SpeechSynthesisErrorEvent, SpeechSynthesisEvent)
27 0 : NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
28 :
29 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(SpeechSynthesisErrorEvent, SpeechSynthesisEvent)
30 0 : NS_IMPL_CYCLE_COLLECTION_TRACE_END
31 :
32 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SpeechSynthesisErrorEvent, SpeechSynthesisEvent)
33 0 : NS_IMPL_CYCLE_COLLECTION_UNLINK_END
34 :
35 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SpeechSynthesisErrorEvent)
36 0 : NS_INTERFACE_MAP_END_INHERITING(SpeechSynthesisEvent)
37 :
38 0 : SpeechSynthesisErrorEvent::SpeechSynthesisErrorEvent(mozilla::dom::EventTarget* aOwner)
39 0 : : SpeechSynthesisEvent(aOwner)
40 : {
41 0 : }
42 :
43 0 : SpeechSynthesisErrorEvent::~SpeechSynthesisErrorEvent()
44 : {
45 0 : }
46 :
47 : SpeechSynthesisErrorEvent*
48 0 : SpeechSynthesisErrorEvent::AsSpeechSynthesisErrorEvent()
49 : {
50 0 : return this;
51 : }
52 :
53 : JSObject*
54 0 : SpeechSynthesisErrorEvent::WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
55 : {
56 0 : return SpeechSynthesisErrorEventBinding::Wrap(aCx, this, aGivenProto);
57 : }
58 :
59 : already_AddRefed<SpeechSynthesisErrorEvent>
60 0 : SpeechSynthesisErrorEvent::Constructor(mozilla::dom::EventTarget* aOwner, const nsAString& aType, const SpeechSynthesisErrorEventInit& aEventInitDict)
61 : {
62 0 : RefPtr<SpeechSynthesisErrorEvent> e = new SpeechSynthesisErrorEvent(aOwner);
63 0 : bool trusted = e->Init(aOwner);
64 0 : e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
65 0 : e->mError = aEventInitDict.mError;
66 0 : e->mUtterance = aEventInitDict.mUtterance;
67 0 : e->mCharIndex = aEventInitDict.mCharIndex;
68 0 : e->mCharLength = aEventInitDict.mCharLength;
69 0 : e->mElapsedTime = aEventInitDict.mElapsedTime;
70 0 : e->mName = aEventInitDict.mName;
71 0 : e->SetTrusted(trusted);
72 0 : e->SetComposed(aEventInitDict.mComposed);
73 0 : return e.forget();
74 : }
75 :
76 : already_AddRefed<SpeechSynthesisErrorEvent>
77 0 : SpeechSynthesisErrorEvent::Constructor(const GlobalObject& aGlobal, const nsAString& aType, const SpeechSynthesisErrorEventInit& aEventInitDict, ErrorResult& aRv)
78 : {
79 0 : nsCOMPtr<mozilla::dom::EventTarget> owner = do_QueryInterface(aGlobal.GetAsSupports());
80 0 : return Constructor(owner, aType, aEventInitDict);
81 : }
82 :
83 : SpeechSynthesisErrorCode
84 0 : SpeechSynthesisErrorEvent::Error() const
85 : {
86 0 : return mError;
87 : }
88 :
89 :
90 : } // namespace dom
91 : } // namespace mozilla
|