зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1282993 - Fix build error in Platform which don't support gamepad API. r=baku
--HG-- extra : amend_source : e53f5bcb7815716d5fa585b53b0dca00665a5718
This commit is contained in:
Родитель
f1eca98b04
Коммит
04356f1b32
|
@ -4,71 +4,72 @@
|
|||
# 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/.
|
||||
|
||||
EXPORTS.mozilla.dom += [
|
||||
'Gamepad.h',
|
||||
'GamepadButton.h',
|
||||
'GamepadManager.h',
|
||||
'GamepadMonitoring.h',
|
||||
'GamepadPlatformService.h',
|
||||
'GamepadServiceTest.h',
|
||||
'ipc/GamepadEventChannelChild.h',
|
||||
'ipc/GamepadEventChannelParent.h',
|
||||
'ipc/GamepadTestChannelChild.h',
|
||||
'ipc/GamepadTestChannelParent.h'
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES = [
|
||||
'Gamepad.cpp',
|
||||
'GamepadButton.cpp',
|
||||
'GamepadManager.cpp',
|
||||
'GamepadMonitoring.cpp',
|
||||
'GamepadPlatformService.cpp',
|
||||
'GamepadServiceTest.cpp',
|
||||
'ipc/GamepadEventChannelChild.cpp',
|
||||
'ipc/GamepadEventChannelParent.cpp',
|
||||
'ipc/GamepadTestChannelChild.cpp',
|
||||
'ipc/GamepadTestChannelParent.cpp'
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
|
||||
UNIFIED_SOURCES += [
|
||||
'fallback/FallbackGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
|
||||
UNIFIED_SOURCES += [
|
||||
'cocoa/CocoaGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
|
||||
UNIFIED_SOURCES += [
|
||||
'windows/WindowsGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
|
||||
UNIFIED_SOURCES += [
|
||||
'linux/LinuxGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android':
|
||||
UNIFIED_SOURCES += [
|
||||
'android/AndroidGamepad.cpp'
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'ipc',
|
||||
]
|
||||
|
||||
IPDL_SOURCES += [
|
||||
'ipc/GamepadEventTypes.ipdlh',
|
||||
'ipc/PGamepadEventChannel.ipdl',
|
||||
'ipc/PGamepadTestChannel.ipdl'
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
if CONFIG['MOZ_GAMEPAD']:
|
||||
EXPORTS.mozilla.dom += [
|
||||
'Gamepad.h',
|
||||
'GamepadButton.h',
|
||||
'GamepadManager.h',
|
||||
'GamepadMonitoring.h',
|
||||
'GamepadPlatformService.h',
|
||||
'GamepadServiceTest.h',
|
||||
'ipc/GamepadEventChannelChild.h',
|
||||
'ipc/GamepadEventChannelParent.h',
|
||||
'ipc/GamepadTestChannelChild.h',
|
||||
'ipc/GamepadTestChannelParent.h'
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
]
|
||||
UNIFIED_SOURCES = [
|
||||
'Gamepad.cpp',
|
||||
'GamepadButton.cpp',
|
||||
'GamepadManager.cpp',
|
||||
'GamepadMonitoring.cpp',
|
||||
'GamepadPlatformService.cpp',
|
||||
'GamepadServiceTest.cpp',
|
||||
'ipc/GamepadEventChannelChild.cpp',
|
||||
'ipc/GamepadEventChannelParent.cpp',
|
||||
'ipc/GamepadTestChannelChild.cpp',
|
||||
'ipc/GamepadTestChannelParent.cpp'
|
||||
]
|
||||
|
||||
CFLAGS += CONFIG['GLIB_CFLAGS']
|
||||
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
||||
CXXFLAGS += CONFIG['GLIB_CFLAGS']
|
||||
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
||||
if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
|
||||
UNIFIED_SOURCES += [
|
||||
'fallback/FallbackGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
|
||||
UNIFIED_SOURCES += [
|
||||
'cocoa/CocoaGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
|
||||
UNIFIED_SOURCES += [
|
||||
'windows/WindowsGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
|
||||
UNIFIED_SOURCES += [
|
||||
'linux/LinuxGamepad.cpp'
|
||||
]
|
||||
elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android':
|
||||
UNIFIED_SOURCES += [
|
||||
'android/AndroidGamepad.cpp'
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'ipc',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
]
|
||||
|
||||
CFLAGS += CONFIG['GLIB_CFLAGS']
|
||||
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
||||
CXXFLAGS += CONFIG['GLIB_CFLAGS']
|
||||
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
||||
|
|
|
@ -61,6 +61,7 @@ DIRS += [
|
|||
'filesystem',
|
||||
'flyweb',
|
||||
'fmradio',
|
||||
'gamepad',
|
||||
'geolocation',
|
||||
'html',
|
||||
'icc',
|
||||
|
@ -135,9 +136,6 @@ if CONFIG['MOZ_B2G_RIL']:
|
|||
if CONFIG['MOZ_PAY']:
|
||||
DIRS += ['payment']
|
||||
|
||||
if CONFIG['MOZ_GAMEPAD']:
|
||||
DIRS += ['gamepad']
|
||||
|
||||
if CONFIG['MOZ_NFC']:
|
||||
DIRS += ['nfc']
|
||||
|
||||
|
|
|
@ -172,7 +172,6 @@ WEBIDL_FILES = [
|
|||
'FormData.webidl',
|
||||
'Function.webidl',
|
||||
'GainNode.webidl',
|
||||
'GamepadServiceTest.webidl',
|
||||
'Geolocation.webidl',
|
||||
'GeometryUtils.webidl',
|
||||
'GetUserMediaRequest.webidl',
|
||||
|
@ -660,6 +659,7 @@ if CONFIG['MOZ_WEBSPEECH']:
|
|||
if CONFIG['MOZ_GAMEPAD']:
|
||||
WEBIDL_FILES += [
|
||||
'Gamepad.webidl',
|
||||
'GamepadServiceTest.webidl'
|
||||
]
|
||||
|
||||
WEBIDL_FILES += [
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
|
||||
#include "mozilla/dom/ipc/BlobChild.h"
|
||||
#include "mozilla/dom/quota/PQuotaChild.h"
|
||||
#ifdef MOZ_GAMEPAD
|
||||
#include "mozilla/dom/GamepadEventChannelChild.h"
|
||||
#include "mozilla/dom/GamepadTestChannelChild.h"
|
||||
#endif
|
||||
#include "mozilla/dom/MessagePortChild.h"
|
||||
#include "mozilla/dom/NuwaChild.h"
|
||||
#include "mozilla/ipc/PBackgroundTestChild.h"
|
||||
|
@ -496,23 +498,29 @@ BackgroundChildImpl::AllocPGamepadEventChannelChild()
|
|||
bool
|
||||
BackgroundChildImpl::DeallocPGamepadEventChannelChild(PGamepadEventChannelChild* aActor)
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
MOZ_ASSERT(aActor);
|
||||
delete static_cast<dom::GamepadEventChannelChild*>(aActor);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
dom::PGamepadTestChannelChild*
|
||||
BackgroundChildImpl::AllocPGamepadTestChannelChild()
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
MOZ_CRASH("PGamepadTestChannelChild actor should be manually constructed!");
|
||||
#endif
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
BackgroundChildImpl::DeallocPGamepadTestChannelChild(PGamepadTestChannelChild* aActor)
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
MOZ_ASSERT(aActor);
|
||||
delete static_cast<dom::GamepadTestChannelChild*>(aActor);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
#include "mozilla/dom/DOMTypes.h"
|
||||
#include "mozilla/dom/FileSystemBase.h"
|
||||
#include "mozilla/dom/FileSystemRequestParent.h"
|
||||
#ifdef MOZ_GAMEPAD
|
||||
#include "mozilla/dom/GamepadEventChannelParent.h"
|
||||
#include "mozilla/dom/GamepadTestChannelParent.h"
|
||||
#endif
|
||||
#include "mozilla/dom/NuwaParent.h"
|
||||
#include "mozilla/dom/PBlobParent.h"
|
||||
#include "mozilla/dom/PGamepadEventChannelParent.h"
|
||||
|
@ -924,36 +926,48 @@ BackgroundParentImpl::DeallocPFileSystemRequestParent(
|
|||
dom::PGamepadEventChannelParent*
|
||||
BackgroundParentImpl::AllocPGamepadEventChannelParent()
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
RefPtr<dom::GamepadEventChannelParent> parent =
|
||||
new dom::GamepadEventChannelParent();
|
||||
|
||||
return parent.forget().take();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
BackgroundParentImpl::DeallocPGamepadEventChannelParent(dom::PGamepadEventChannelParent *aActor)
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
MOZ_ASSERT(aActor);
|
||||
RefPtr<dom::GamepadEventChannelParent> parent =
|
||||
dont_AddRef(static_cast<dom::GamepadEventChannelParent*>(aActor));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
dom::PGamepadTestChannelParent*
|
||||
BackgroundParentImpl::AllocPGamepadTestChannelParent()
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
RefPtr<dom::GamepadTestChannelParent> parent =
|
||||
new dom::GamepadTestChannelParent();
|
||||
|
||||
return parent.forget().take();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
BackgroundParentImpl::DeallocPGamepadTestChannelParent(dom::PGamepadTestChannelParent *aActor)
|
||||
{
|
||||
#ifdef MOZ_GAMEPAD
|
||||
MOZ_ASSERT(aActor);
|
||||
RefPtr<dom::GamepadTestChannelParent> parent =
|
||||
dont_AddRef(static_cast<dom::GamepadTestChannelParent*>(aActor));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче