Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 #include "SpeechGrammar.h"
9 #include "mozilla/Preferences.h"
10 #include "mozilla/dom/SpeechGrammarBinding.h"
12 namespace mozilla {
13 namespace dom {
15 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(SpeechGrammar, mParent)
16 NS_IMPL_CYCLE_COLLECTING_ADDREF(SpeechGrammar)
17 NS_IMPL_CYCLE_COLLECTING_RELEASE(SpeechGrammar)
18 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SpeechGrammar)
19 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
20 NS_INTERFACE_MAP_ENTRY(nsISupports)
21 NS_INTERFACE_MAP_END
23 SpeechGrammar::SpeechGrammar(nsISupports* aParent)
24 : mParent(aParent)
25 {
26 SetIsDOMBinding();
27 }
29 SpeechGrammar::~SpeechGrammar()
30 {
31 }
33 SpeechGrammar*
34 SpeechGrammar::Constructor(const GlobalObject& aGlobal,
35 ErrorResult& aRv)
36 {
37 return new SpeechGrammar(aGlobal.GetAsSupports());
38 }
40 nsISupports*
41 SpeechGrammar::GetParentObject() const
42 {
43 return mParent;
44 }
46 JSObject*
47 SpeechGrammar::WrapObject(JSContext* aCx)
48 {
49 return SpeechGrammarBinding::Wrap(aCx, this);
50 }
52 void
53 SpeechGrammar::GetSrc(nsString& aRetVal, ErrorResult& aRv) const
54 {
55 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
56 return;
57 }
59 void
60 SpeechGrammar::SetSrc(const nsAString& aArg, ErrorResult& aRv)
61 {
62 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
63 return;
64 }
66 float
67 SpeechGrammar::GetWeight(ErrorResult& aRv) const
68 {
69 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
70 return 0;
71 }
73 void
74 SpeechGrammar::SetWeight(float aArg, ErrorResult& aRv)
75 {
76 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
77 return;
78 }
80 } // namespace dom
81 } // namespace mozilla