GamepadEventChannelParent::GamepadEventChannelParent()
  : mHasGamepadListener(false)
{
  RefPtr<GamepadPlatformService> service =
    GamepadPlatformService::GetParentService();
  MOZ_ASSERT(service);
  mBackgroundThread = NS_GetCurrentThread();
  service->AddChannelParent(this);
}