dom/media/webspeech/synth/test/nsFakeSynthServices.h
author Jonathan Watt <jwatt@jwatt.org>
Tue, 07 Jun 2016 21:10:18 +0100
changeset 301499 232a786cf87fb0f68f9bda6e9316515524d2ac8a
parent 244001 4f320bb16ae4657356a2077bf2eed515806bbe50
child 395366 4f5d0c5f191b55fbc33bb3b41762cd60b8ed73d0
permissions -rw-r--r--
Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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 nsFakeSynthServices_h
#define nsFakeSynthServices_h

#include "nsTArray.h"
#include "nsIObserver.h"
#include "nsIThread.h"
#include "nsISpeechService.h"
#include "nsRefPtrHashtable.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/Monitor.h"

namespace mozilla {
namespace dom {

class nsFakeSynthServices : public nsIObserver
{

public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOBSERVER

  nsFakeSynthServices();

  static nsFakeSynthServices* GetInstance();

  static already_AddRefed<nsFakeSynthServices> GetInstanceForService();

  static void Shutdown();

private:

  virtual ~nsFakeSynthServices();

  void Init();

  nsCOMPtr<nsISpeechService> mDirectService;

  nsCOMPtr<nsISpeechService> mIndirectService;

  static StaticRefPtr<nsFakeSynthServices> sSingleton;
};

} // namespace dom
} // namespace mozilla

#endif