Issue #80 - De-unify dom/gamepad

This commit is contained in:
wolfbeast 2020-04-20 18:08:32 +02:00 committed by Roy Tam
commit 040477a3f3
12 changed files with 23 additions and 7 deletions

View file

@ -20,7 +20,6 @@
#include "mozilla/StaticPtr.h"
#include "nsAutoPtr.h"
#include "nsGlobalWindow.h"
#include "nsIDOMEvent.h"
#include "nsIDOMDocument.h"
#include "nsIDOMWindow.h"

View file

@ -7,11 +7,14 @@
#ifndef mozilla_dom_GamepadManager_h_
#define mozilla_dom_GamepadManager_h_
#include "nsGlobalWindow.h"
#include "nsIIPCBackgroundChildCreateCallback.h"
#include "nsIObserver.h"
// Needed for GamepadMappingType
#include "mozilla/dom/GamepadBinding.h"
#include "mozilla/dom/GamepadPoseState.h"
#include "mozilla/dom/GamepadServiceType.h"
#include "nsRefPtrHashtable.h"
class nsGlobalWindow;

View file

@ -15,6 +15,7 @@
namespace mozilla {
namespace dom {
class GamepadChangeEvent;
class GamepadEventChannelParent;
// Platform Service for building and transmitting IPDL messages

View file

@ -2,6 +2,8 @@
#ifndef mozilla_dom_gamepad_GamepadPoseState_h_
#define mozilla_dom_gamepad_GamepadPoseState_h_
#include "mozilla/TypedEnumBits.h"
namespace mozilla{
namespace dom{

View file

@ -22,6 +22,8 @@
#include "nsIObserver.h"
#include "nsIObserverService.h"
using namespace mozilla::ipc;
namespace mozilla {
namespace dom {

View file

@ -7,6 +7,7 @@
#include "GeneratedJNIWrappers.h"
#include "GeneratedJNINatives.h"
#include "nsThreadUtils.h"
#include "mozilla/dom/Gamepad.h"
namespace mozilla {
namespace dom {

View file

@ -7,6 +7,7 @@
// mostly derived from the Allegro source code at:
// http://alleg.svn.sourceforge.net/viewvc/alleg/allegro/branches/4.9/src/macosx/hidjoy.m?revision=13760&view=markup
#include "mozilla/dom/Gamepad.h"
#include "mozilla/dom/GamepadPlatformService.h"
#include "mozilla/ArrayUtils.h"
#include "nsThreadUtils.h"

View file

@ -1,9 +1,13 @@
/* 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/. */
#include "GamepadEventChannelParent.h"
#include "GamepadPlatformService.h"
#include "mozilla/Unused.h"
#include "mozilla/dom/GamepadMonitoring.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "nsThreadUtils.h"
namespace mozilla {

View file

@ -5,6 +5,7 @@
#include "GamepadTestChannelParent.h"
#include "mozilla/dom/GamepadPlatformService.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "mozilla/Unused.h"
namespace mozilla {

View file

@ -19,6 +19,7 @@
#include <sys/ioctl.h>
#include <unistd.h>
#include "nscore.h"
#include "mozilla/dom/Gamepad.h"
#include "mozilla/dom/GamepadPlatformService.h"
#include "udev.h"

View file

@ -31,7 +31,7 @@ if CONFIG['MOZ_GAMEPAD']:
'ipc/GamepadTestChannelParent.h'
]
UNIFIED_SOURCES = [
SOURCES = [
'Gamepad.cpp',
'GamepadButton.cpp',
'GamepadManager.cpp',
@ -46,23 +46,23 @@ if CONFIG['MOZ_GAMEPAD']:
]
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
UNIFIED_SOURCES += [
SOURCES += [
'fallback/FallbackGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
UNIFIED_SOURCES += [
SOURCES += [
'cocoa/CocoaGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
UNIFIED_SOURCES += [
SOURCES += [
'windows/WindowsGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
UNIFIED_SOURCES += [
SOURCES += [
'linux/LinuxGamepad.cpp'
]
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android':
UNIFIED_SOURCES += [
SOURCES += [
'android/AndroidGamepad.cpp'
]

View file

@ -24,6 +24,7 @@
#include "mozilla/Services.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "mozilla/dom/Gamepad.h"
#include "mozilla/dom/GamepadPlatformService.h"
namespace {