Skip to content

Commit 67038c0

Browse files
committed
Bug 1671641 - Make dom/gamepad buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D94939
1 parent ac330b4 commit 67038c0

12 files changed

+21
-3
lines changed

build/non-unified-compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dom/file/
2222
dom/filehandle/
2323
dom/filesystem/
2424
dom/flex/
25+
dom/gamepad/
2526
dom/indexedDB/
2627
dom/localstorage/
2728
dom/quota/

dom/gamepad/GamepadLightIndicator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define mozilla_dom_gamepad_GamepadLightIndicator_h
99

1010
#include "mozilla/dom/GamepadLightIndicatorBinding.h"
11+
#include "nsWrapperCache.h"
1112

1213
namespace mozilla {
1314
namespace dom {

dom/gamepad/GamepadManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
#define mozilla_dom_GamepadManager_h_
99

1010
#include "nsIObserver.h"
11+
#include "nsRefPtrHashtable.h"
1112
// Needed for GamepadMappingType
1213
#include "mozilla/dom/GamepadBinding.h"
1314
#include "mozilla/dom/GamepadServiceType.h"
1415

1516
class nsGlobalWindowInner;
17+
class nsIGlobalObject;
1618

1719
namespace mozilla {
1820
namespace gfx {

dom/gamepad/GamepadPlatformService.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "mozilla/dom/GamepadPlatformService.h"
88

99
#include "mozilla/dom/GamepadEventChannelParent.h"
10+
#include "mozilla/dom/GamepadMonitoring.h"
1011
#include "mozilla/dom/GamepadTestChannelParent.h"
1112
#include "mozilla/ipc/BackgroundParent.h"
1213
#include "mozilla/Mutex.h"

dom/gamepad/GamepadPlatformService.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
namespace mozilla {
1818
namespace dom {
1919

20+
class GamepadAdded;
2021
class GamepadEventChannelParent;
22+
enum class GamepadLightIndicatorType : uint8_t;
23+
struct GamepadPoseState;
2124
class GamepadTestChannelParent;
25+
struct GamepadTouchState;
2226

2327
// Platform Service for building and transmitting IPDL messages
2428
// through the HAL sandbox. Used by platform specific

dom/gamepad/GamepadRemapping.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// found in the LICENSE file.
1313

1414
#include "mozilla/dom/GamepadRemapping.h"
15+
#include "mozilla/dom/GamepadPlatformService.h"
1516

1617
namespace mozilla {
1718
namespace dom {

dom/gamepad/GamepadRemapping.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
#ifndef mozilla_dom_GamepadRemapping_h_
88
#define mozilla_dom_GamepadRemapping_h_
99

10+
#include "mozilla/dom/GamepadBinding.h"
1011
#include "mozilla/dom/GamepadLightIndicator.h"
12+
#include "mozilla/dom/GamepadPoseState.h"
13+
#include "mozilla/dom/GamepadTouchState.h"
1114

1215
namespace mozilla {
1316
namespace dom {

dom/gamepad/GamepadServiceTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ GamepadServiceTest::~GamepadServiceTest() = default;
6666
void GamepadServiceTest::InitPBackgroundActor() {
6767
MOZ_ASSERT(!mChild);
6868

69-
PBackgroundChild* actor = BackgroundChild::GetOrCreateForCurrentThread();
69+
::mozilla::ipc::PBackgroundChild* actor =
70+
::mozilla::ipc::BackgroundChild::GetOrCreateForCurrentThread();
7071
if (NS_WARN_IF(!actor)) {
7172
MOZ_CRASH("Failed to create a PBackgroundChild actor!");
7273
}

dom/gamepad/GamepadTouch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "mozilla/dom/GamepadTouchBinding.h"
1111
#include "mozilla/dom/GamepadTouchState.h"
12+
#include "nsWrapperCache.h"
1213

1314
namespace mozilla {
1415
namespace dom {

dom/gamepad/ipc/GamepadEventChannelChild.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* You can obtain one at http://mozilla.org/MPL/2.0/. */
66
#include "GamepadEventChannelChild.h"
77
#include "mozilla/dom/GamepadManager.h"
8+
#include "mozilla/dom/Promise.h"
89

910
namespace mozilla {
1011
namespace dom {

dom/gamepad/ipc/GamepadEventChannelParent.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "GamepadEventChannelParent.h"
77
#include "GamepadPlatformService.h"
88
#include "mozilla/dom/GamepadMonitoring.h"
9+
#include "mozilla/ipc/BackgroundParent.h"
910
#include "nsThreadUtils.h"
1011

1112
namespace mozilla {

dom/gamepad/ipc/GamepadTestChannelParent.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "GamepadTestChannelParent.h"
88

99
#include "mozilla/dom/GamepadPlatformService.h"
10+
#include "mozilla/ipc/BackgroundParent.h"
1011
#include "mozilla/Unused.h"
1112

1213
namespace mozilla {
@@ -18,7 +19,7 @@ already_AddRefed<GamepadTestChannelParent> GamepadTestChannelParent::Create() {
1819
}
1920

2021
GamepadTestChannelParent::GamepadTestChannelParent() {
21-
AssertIsOnBackgroundThread();
22+
::mozilla::ipc::AssertIsOnBackgroundThread();
2223
RefPtr<GamepadPlatformService> service =
2324
GamepadPlatformService::GetParentService();
2425
MOZ_ASSERT(service);
@@ -27,7 +28,7 @@ GamepadTestChannelParent::GamepadTestChannelParent() {
2728
}
2829

2930
GamepadTestChannelParent::~GamepadTestChannelParent() {
30-
AssertIsOnBackgroundThread();
31+
::mozilla::ipc::AssertIsOnBackgroundThread();
3132
RefPtr<GamepadPlatformService> service =
3233
GamepadPlatformService::GetParentService();
3334
MOZ_ASSERT(service);

0 commit comments

Comments
 (0)