tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsFakeSynthServices.h (1052B)


      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 #ifndef nsFakeSynthServices_h
      8 #define nsFakeSynthServices_h
      9 
     10 #include "mozilla/Monitor.h"
     11 #include "mozilla/StaticPtr.h"
     12 #include "nsIObserver.h"
     13 #include "nsISpeechService.h"
     14 #include "nsRefPtrHashtable.h"
     15 #include "nsTArray.h"
     16 
     17 namespace mozilla::dom {
     18 
     19 class nsFakeSynthServices : public nsIObserver {
     20 public:
     21  NS_DECL_ISUPPORTS
     22  NS_DECL_NSIOBSERVER
     23 
     24  nsFakeSynthServices() = default;
     25 
     26  static nsFakeSynthServices* GetInstance();
     27 
     28  static already_AddRefed<nsFakeSynthServices> GetInstanceForService();
     29 
     30 private:
     31  virtual ~nsFakeSynthServices() = default;
     32 
     33  void Init();
     34 
     35  nsCOMPtr<nsISpeechService> mSynthService;
     36 
     37  static StaticRefPtr<nsFakeSynthServices> sSingleton;
     38 };
     39 
     40 }  // namespace mozilla::dom
     41 
     42 #endif