content/media/webspeech/recognition/test/FakeSpeechRecognitionService.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

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 #ifndef mozilla_dom_FakeSpeechRecognitionService_h
     8 #define mozilla_dom_FakeSpeechRecognitionService_h
    10 #include "nsCOMPtr.h"
    11 #include "nsIObserver.h"
    13 // nsISpeechRecognitionService needs these declarations
    14 namespace mozilla {
    15   class AudioSegment;
    17   namespace dom {
    18     class SpeechRecognition;
    19     class SpeechRecognitionResultList;
    20   }
    21 }
    23 #include "nsISpeechRecognitionService.h"
    25 #define NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID \
    26   {0x48c345e7, 0x9929, 0x4f9a, {0xa5, 0x63, 0xf4, 0x78, 0x22, 0x2d, 0xab, 0xcd}};
    28 namespace mozilla {
    30 class FakeSpeechRecognitionService : public nsISpeechRecognitionService,
    31                                      public nsIObserver
    32 {
    33 public:
    34   NS_DECL_ISUPPORTS
    35   NS_DECL_NSISPEECHRECOGNITIONSERVICE
    36   NS_DECL_NSIOBSERVER
    38   FakeSpeechRecognitionService();
    40 private:
    41   virtual ~FakeSpeechRecognitionService();
    43   WeakPtr<dom::SpeechRecognition> mRecognition;
    44   dom::SpeechRecognitionResultList* BuildMockResultList();
    45 };
    47 } // namespace mozilla
    49 #endif

mercurial