summaryrefslogtreecommitdiffstats
path: root/dom/events
diff options
context:
space:
mode:
Diffstat (limited to 'dom/events')
-rw-r--r--dom/events/SpeechRecognitionError.cpp51
-rw-r--r--dom/events/SpeechRecognitionError.h62
-rw-r--r--dom/events/moz.build6
3 files changed, 0 insertions, 119 deletions
diff --git a/dom/events/SpeechRecognitionError.cpp b/dom/events/SpeechRecognitionError.cpp
deleted file mode 100644
index 2d0c357e6..000000000
--- a/dom/events/SpeechRecognitionError.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "SpeechRecognitionError.h"
-
-namespace mozilla {
-namespace dom {
-
-SpeechRecognitionError::SpeechRecognitionError(
- mozilla::dom::EventTarget* aOwner,
- nsPresContext* aPresContext,
- WidgetEvent* aEvent)
- : Event(aOwner, aPresContext, aEvent)
- , mError()
-{
-}
-
-SpeechRecognitionError::~SpeechRecognitionError() {}
-
-already_AddRefed<SpeechRecognitionError>
-SpeechRecognitionError::Constructor(const GlobalObject& aGlobal,
- const nsAString& aType,
- const SpeechRecognitionErrorInit& aParam,
- ErrorResult& aRv)
-{
- nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
- RefPtr<SpeechRecognitionError> e = new SpeechRecognitionError(t, nullptr, nullptr);
- bool trusted = e->Init(t);
- e->InitSpeechRecognitionError(aType, aParam.mBubbles, aParam.mCancelable, aParam.mError, aParam.mMessage);
- e->SetTrusted(trusted);
- e->SetComposed(aParam.mComposed);
- return e.forget();
-}
-
-void
-SpeechRecognitionError::InitSpeechRecognitionError(const nsAString& aType,
- bool aCanBubble,
- bool aCancelable,
- SpeechRecognitionErrorCode aError,
- const nsAString& aMessage)
-{
- Event::InitEvent(aType, aCanBubble, aCancelable);
- mError = aError;
- mMessage = aMessage;
-}
-
-} // namespace dom
-} // namespace mozilla
diff --git a/dom/events/SpeechRecognitionError.h b/dom/events/SpeechRecognitionError.h
deleted file mode 100644
index ef43feffd..000000000
--- a/dom/events/SpeechRecognitionError.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef SpeechRecognitionError_h__
-#define SpeechRecognitionError_h__
-
-#include "mozilla/dom/Event.h"
-#include "mozilla/dom/SpeechRecognitionErrorBinding.h"
-
-namespace mozilla {
-namespace dom {
-
-class SpeechRecognitionError : public Event
-{
-public:
- SpeechRecognitionError(mozilla::dom::EventTarget* aOwner,
- nsPresContext* aPresContext,
- WidgetEvent* aEvent);
- virtual ~SpeechRecognitionError();
-
- static already_AddRefed<SpeechRecognitionError>
- Constructor(const GlobalObject& aGlobal,
- const nsAString& aType,
- const SpeechRecognitionErrorInit& aParam,
- ErrorResult& aRv);
-
- virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
- {
- return mozilla::dom::SpeechRecognitionErrorBinding::Wrap(aCx, this, aGivenProto);
- }
-
- void
- GetMessage(nsAString& aString)
- {
- aString = mMessage;
- }
-
- SpeechRecognitionErrorCode
- Error()
- {
- return mError;
- }
-
- void
- InitSpeechRecognitionError(const nsAString& aType,
- bool aCanBubble,
- bool aCancelable,
- SpeechRecognitionErrorCode aError,
- const nsAString& aMessage);
-
-protected:
- SpeechRecognitionErrorCode mError;
- nsString mMessage;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // SpeechRecognitionError_h__
diff --git a/dom/events/moz.build b/dom/events/moz.build
index 661f56c7e..2378b92be 100644
--- a/dom/events/moz.build
+++ b/dom/events/moz.build
@@ -73,9 +73,6 @@ EXPORTS.mozilla.dom += [
'XULCommandEvent.h',
]
-if CONFIG['MOZ_WEBSPEECH']:
- EXPORTS.mozilla.dom += ['SpeechRecognitionError.h']
-
SOURCES += [
'AnimationEvent.cpp',
'AsyncEventDispatcher.cpp',
@@ -127,9 +124,6 @@ SOURCES += [
'XULCommandEvent.cpp',
]
-if CONFIG['MOZ_WEBSPEECH']:
- SOURCES += ['SpeechRecognitionError.cpp']
-
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'