dom/gamepad/GamepadServiceTest.h
author Jan Horak <jhorak@redhat.com>
Mon, 08 Jun 2015 04:41:00 -0400
changeset 247615 e68096bfbf3962aa8ed5d7e87942d70d896a2efb
parent 242172 2ecdda58c6734296eaf0f4deb8de4228b53d473a
child 252629 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 1129873 - [GTK3] Implement wrapper to GtkAppChooserDialog to allow using native application chooser. r=karlt

/* -*- 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 mozilla_dom_GamepadServiceTest_h_
#define mozilla_dom_GamepadServiceTest_h_

#include "nsIGamepadServiceTest.h"

namespace mozilla {
namespace dom {

class GamepadService;

// Service for testing purposes
class GamepadServiceTest : public nsIGamepadServiceTest
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIGAMEPADSERVICETEST

  GamepadServiceTest();

  static already_AddRefed<GamepadServiceTest> CreateService();

private:
  static GamepadServiceTest* sSingleton;
  // Hold a reference to the gamepad service so we don't have to worry about
  // execution order in tests.
  nsRefPtr<GamepadService> mService;
  virtual ~GamepadServiceTest();
};

}  // namespace dom
}  // namespace mozilla

#define NS_GAMEPAD_TEST_CID \
{ 0xfb1fcb57, 0xebab, 0x4cf4, \
{ 0x96, 0x3b, 0x1e, 0x4d, 0xb8, 0x52, 0x16, 0x96 } }
#define NS_GAMEPAD_TEST_CONTRACTID "@mozilla.org/gamepad-test;1"

#endif