Backed out changeset 9d8b4c0b99ed (bug 1945683) for causing btime failures. CLOSED...
[gecko.git] / dom / media / webspeech / recognition / test / FakeSpeechRecognitionService.h
blob69e2786b76d1a866ece32e3ed0decd52e5f28dd1
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 mozilla_dom_FakeSpeechRecognitionService_h
8 #define mozilla_dom_FakeSpeechRecognitionService_h
10 #include "nsCOMPtr.h"
11 #include "nsIObserver.h"
12 #include "nsISpeechRecognitionService.h"
14 #define NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID \
15 {0x48c345e7, \
16 0x9929, \
17 0x4f9a, \
18 {0xa5, 0x63, 0xf4, 0x78, 0x22, 0x2d, 0xab, 0xcd}};
20 namespace mozilla {
22 class FakeSpeechRecognitionService : public nsISpeechRecognitionService,
23 public nsIObserver {
24 public:
25 NS_DECL_THREADSAFE_ISUPPORTS
26 NS_DECL_NSISPEECHRECOGNITIONSERVICE
27 NS_DECL_NSIOBSERVER
29 FakeSpeechRecognitionService();
31 private:
32 virtual ~FakeSpeechRecognitionService();
34 WeakPtr<dom::SpeechRecognition> mRecognition;
35 dom::SpeechRecognitionResultList* BuildMockResultList();
38 } // namespace mozilla
40 #endif