mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 910568 - WebTelephony: move DOM classes to namespace mozilla::dom. r=khuey
This commit is contained in:
parent
2734959955
commit
43b8e10872
@ -54,7 +54,7 @@
|
||||
#include "MediaManager.h"
|
||||
#endif
|
||||
#ifdef MOZ_B2G_RIL
|
||||
#include "mozilla/dom/telephony/Telephony.h"
|
||||
#include "mozilla/dom/Telephony.h"
|
||||
#endif
|
||||
#ifdef MOZ_B2G_BT
|
||||
#include "BluetoothManager.h"
|
||||
@ -1168,7 +1168,7 @@ Navigator::GetMozCellBroadcast(ErrorResult& aRv)
|
||||
return mCellBroadcast;
|
||||
}
|
||||
|
||||
telephony::Telephony*
|
||||
Telephony*
|
||||
Navigator::GetMozTelephony(ErrorResult& aRv)
|
||||
{
|
||||
if (!mTelephony) {
|
||||
@ -1176,7 +1176,7 @@ Navigator::GetMozTelephony(ErrorResult& aRv)
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
mTelephony = telephony::Telephony::Create(mWindow, aRv);
|
||||
mTelephony = Telephony::Create(mWindow, aRv);
|
||||
}
|
||||
|
||||
return mTelephony;
|
||||
@ -1698,7 +1698,7 @@ bool
|
||||
Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
|
||||
return win && telephony::Telephony::CheckPermission(win);
|
||||
return win && Telephony::CheckPermission(win);
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -80,13 +80,6 @@ class MobileConnection;
|
||||
#endif
|
||||
} // namespace Connection;
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
namespace telephony {
|
||||
class Telephony;
|
||||
} // namespace Telephony;
|
||||
class CellBroadcast;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_B2G_BT
|
||||
namespace bluetooth {
|
||||
class BluetoothManager;
|
||||
@ -94,6 +87,8 @@ class BluetoothManager;
|
||||
#endif // MOZ_B2G_BT
|
||||
|
||||
#ifdef MOZ_B2G_RIL
|
||||
class CellBroadcast;
|
||||
class Telephony;
|
||||
class Voicemail;
|
||||
#endif
|
||||
|
||||
@ -225,7 +220,7 @@ public:
|
||||
ErrorResult& aRv);
|
||||
bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv);
|
||||
#ifdef MOZ_B2G_RIL
|
||||
telephony::Telephony* GetMozTelephony(ErrorResult& aRv);
|
||||
Telephony* GetMozTelephony(ErrorResult& aRv);
|
||||
nsIDOMMozMobileConnection* GetMozMobileConnection(ErrorResult& aRv);
|
||||
CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv);
|
||||
Voicemail* GetMozVoicemail(ErrorResult& aRv);
|
||||
@ -330,7 +325,7 @@ private:
|
||||
nsRefPtr<power::PowerManager> mPowerManager;
|
||||
nsRefPtr<MobileMessageManager> mMobileMessageManager;
|
||||
#ifdef MOZ_B2G_RIL
|
||||
nsRefPtr<telephony::Telephony> mTelephony;
|
||||
nsRefPtr<Telephony> mTelephony;
|
||||
nsRefPtr<Voicemail> mVoicemail;
|
||||
#endif
|
||||
nsRefPtr<network::Connection> mConnection;
|
||||
|
@ -164,15 +164,9 @@ DOMInterfaces = {
|
||||
'headerFile': 'BluetoothManager.h'
|
||||
},
|
||||
|
||||
'CallEvent': {
|
||||
'nativeType': 'mozilla::dom::telephony::CallEvent',
|
||||
'headerFile': 'mozilla/dom/telephony/CallEvent.h',
|
||||
},
|
||||
'CallEvent': {},
|
||||
|
||||
'CallsList': {
|
||||
'nativeType': 'mozilla::dom::telephony::CallsList',
|
||||
'headerFile': 'mozilla/dom/telephony/CallsList.h',
|
||||
},
|
||||
'CallsList': {},
|
||||
|
||||
'CameraControl': {
|
||||
'nativeType': 'mozilla::nsDOMCameraControl',
|
||||
@ -1177,20 +1171,11 @@ DOMInterfaces = {
|
||||
'concrete': False,
|
||||
},
|
||||
|
||||
'Telephony' : {
|
||||
'nativeType': 'mozilla::dom::telephony::Telephony',
|
||||
'headerFile': 'mozilla/dom/telephony/Telephony.h',
|
||||
},
|
||||
'Telephony' : {},
|
||||
|
||||
'TelephonyCall' : {
|
||||
'nativeType': 'mozilla::dom::telephony::TelephonyCall',
|
||||
'headerFile': 'mozilla/dom/telephony/TelephonyCall.h',
|
||||
},
|
||||
'TelephonyCall' : {},
|
||||
|
||||
'TelephonyCallGroup' : {
|
||||
'nativeType': 'mozilla::dom::telephony::TelephonyCallGroup',
|
||||
'headerFile': 'mozilla/dom/telephony/TelephonyCallGroup.h',
|
||||
},
|
||||
'TelephonyCallGroup' : {},
|
||||
|
||||
'Text': {
|
||||
# Total hack to allow binding code to realize that nsTextNode can
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "TelephonyCall.h"
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
using mozilla::ErrorResult;
|
||||
|
||||
|
@ -7,17 +7,14 @@
|
||||
#ifndef mozilla_dom_telephony_callevent_h
|
||||
#define mozilla_dom_telephony_callevent_h
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
#include "nsDOMEvent.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
struct CallEventInit;
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
struct CallEventInit;
|
||||
|
||||
class CallEvent MOZ_FINAL : public nsDOMEvent
|
||||
{
|
||||
@ -56,6 +53,7 @@ private:
|
||||
{ }
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_callevent_h
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "TelephonyCall.h"
|
||||
#include "TelephonyCallGroup.h"
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_2(CallsList,
|
||||
|
@ -7,11 +7,12 @@
|
||||
#ifndef mozilla_dom_telephony_CallsList_h__
|
||||
#define mozilla_dom_telephony_CallsList_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class CallsList MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache
|
||||
@ -46,6 +47,7 @@ private:
|
||||
~CallsList();
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_CallsList_h__
|
||||
|
@ -24,9 +24,9 @@
|
||||
#include "TelephonyCall.h"
|
||||
#include "TelephonyCallGroup.h"
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
using mozilla::ErrorResult;
|
||||
using mozilla::dom::telephony::kOutgoingPlaceholderCallIndex;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifndef mozilla_dom_telephony_telephony_h__
|
||||
#define mozilla_dom_telephony_telephony_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
#include "nsITelephonyProvider.h"
|
||||
|
||||
@ -19,11 +19,8 @@ class nsPIDOMWindow;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class TelephonyCallOrTelephonyCallGroupReturnValue;
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
class TelephonyCallOrTelephonyCallGroupReturnValue;
|
||||
|
||||
class Telephony MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
@ -181,6 +178,7 @@ private:
|
||||
Shutdown();
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_telephony_h__
|
||||
|
@ -13,9 +13,9 @@
|
||||
#include "Telephony.h"
|
||||
#include "TelephonyCallGroup.h"
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
using mozilla::ErrorResult;
|
||||
using mozilla::dom::telephony::kOutgoingPlaceholderCallIndex;
|
||||
|
||||
// static
|
||||
already_AddRefed<TelephonyCall>
|
||||
@ -161,7 +161,7 @@ TelephonyCall::NotifyError(const nsAString& aError)
|
||||
// Set the error string
|
||||
NS_ASSERTION(!mError, "Already have an error?");
|
||||
|
||||
mError = new mozilla::dom::DOMError(GetOwner(), aError);
|
||||
mError = new DOMError(GetOwner(), aError);
|
||||
|
||||
// Do the state transitions
|
||||
ChangeStateInternal(nsITelephonyProvider::CALL_STATE_DISCONNECTED, true);
|
||||
|
@ -7,13 +7,14 @@
|
||||
#ifndef mozilla_dom_telephony_telephonycall_h__
|
||||
#define mozilla_dom_telephony_telephonycall_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
#include "mozilla/dom/DOMError.h"
|
||||
|
||||
class nsPIDOMWindow;
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class TelephonyCall MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
@ -24,7 +25,7 @@ class TelephonyCall MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
nsString mSecondNumber;
|
||||
nsString mState;
|
||||
bool mEmergency;
|
||||
nsRefPtr<mozilla::dom::DOMError> mError;
|
||||
nsRefPtr<DOMError> mError;
|
||||
|
||||
uint32_t mCallIndex;
|
||||
uint16_t mCallState;
|
||||
@ -107,7 +108,7 @@ public:
|
||||
|
||||
static already_AddRefed<TelephonyCall>
|
||||
Create(Telephony* aTelephony, const nsAString& aNumber, uint16_t aCallState,
|
||||
uint32_t aCallIndex = kOutgoingPlaceholderCallIndex,
|
||||
uint32_t aCallIndex = telephony::kOutgoingPlaceholderCallIndex,
|
||||
bool aEmergency = false, bool aIsConference = false);
|
||||
|
||||
void
|
||||
@ -125,7 +126,7 @@ public:
|
||||
void
|
||||
UpdateCallIndex(uint32_t aCallIndex)
|
||||
{
|
||||
NS_ASSERTION(mCallIndex == kOutgoingPlaceholderCallIndex,
|
||||
NS_ASSERTION(mCallIndex == telephony::kOutgoingPlaceholderCallIndex,
|
||||
"Call index should not be set!");
|
||||
mCallIndex = aCallIndex;
|
||||
}
|
||||
@ -173,6 +174,7 @@ private:
|
||||
TelephonyCall* aCall);
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_telephonycall_h__
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "CallsList.h"
|
||||
#include "Telephony.h"
|
||||
|
||||
USING_TELEPHONY_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
using mozilla::ErrorResult;
|
||||
|
||||
|
@ -7,9 +7,10 @@
|
||||
#ifndef mozilla_dom_telephony_telephonycallgroup_h__
|
||||
#define mozilla_dom_telephony_telephonycallgroup_h__
|
||||
|
||||
#include "TelephonyCommon.h"
|
||||
#include "mozilla/dom/telephony/TelephonyCommon.h"
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class TelephonyCallGroup MOZ_FINAL : public nsDOMEventTargetHelper
|
||||
{
|
||||
@ -111,6 +112,7 @@ private:
|
||||
bool CanConference(const TelephonyCall& aCall, TelephonyCall* aSecondCall);
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_telephonycallgroup_h__
|
||||
|
@ -24,17 +24,23 @@
|
||||
#define USING_TELEPHONY_NAMESPACE \
|
||||
using namespace mozilla::dom::telephony;
|
||||
|
||||
BEGIN_TELEPHONY_NAMESPACE
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
namespace telephony {
|
||||
|
||||
enum {
|
||||
kOutgoingPlaceholderCallIndex = UINT32_MAX
|
||||
};
|
||||
|
||||
} // namespace telephony
|
||||
|
||||
class CallsList;
|
||||
class Telephony;
|
||||
class TelephonyCall;
|
||||
class TelephonyCallGroup;
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_telephony_telephonycommon_h__
|
||||
|
@ -12,12 +12,15 @@ XPIDL_MODULE = 'dom_telephony'
|
||||
|
||||
MODULE = 'dom'
|
||||
|
||||
EXPORTS.mozilla.dom.telephony += [
|
||||
EXPORTS.mozilla.dom += [
|
||||
'CallEvent.h',
|
||||
'CallsList.h',
|
||||
'Telephony.h',
|
||||
'TelephonyCall.h',
|
||||
'TelephonyCallGroup.h',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.dom.telephony += [
|
||||
'TelephonyCommon.h',
|
||||
'TelephonyFactory.h',
|
||||
'ipc/TelephonyChild.h',
|
||||
|
Loading…
Reference in New Issue
Block a user