Bug 1482753 - Move network/Types.h into hal/ and NetworkObserver into hal namespace. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D3179

--HG--
rename : dom/network/Types.h => hal/HalNetworkInformation.h
This commit is contained in:
Hiroyuki Ikezoe 2018-08-13 10:57:50 +09:00
Родитель 0381486a5f
Коммит ce58f0c053
8 изменённых файлов: 13 добавлений и 19 удалений

Просмотреть файл

@ -8,15 +8,15 @@
#define mozilla_dom_network_ConnectionMainThread_h
#include "Connection.h"
#include "mozilla/Hal.h"
#include "mozilla/Observer.h"
#include "Types.h"
namespace mozilla {
namespace dom {
namespace network {
class ConnectionMainThread final : public Connection
, public NetworkObserver
, public hal::NetworkObserver
{
public:
explicit ConnectionMainThread(nsPIDOMWindowInner* aWindow);

Просмотреть файл

@ -14,7 +14,7 @@ namespace mozilla {
namespace dom {
namespace network {
class ConnectionProxy final : public NetworkObserver
class ConnectionProxy final : public hal::NetworkObserver
{
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ConnectionProxy)

Просмотреть файл

@ -8,8 +8,6 @@
#define mozilla_dom_network_ConnectionWorker_h
#include "Connection.h"
#include "mozilla/Observer.h"
#include "Types.h"
namespace mozilla {
namespace dom {

Просмотреть файл

@ -25,7 +25,6 @@ EXPORTS.mozilla.dom.network += [
'TCPServerSocketParent.h',
'TCPSocketChild.h',
'TCPSocketParent.h',
'Types.h',
'UDPSocketChild.h',
'UDPSocketParent.h',
]

Просмотреть файл

@ -11,10 +11,10 @@
#include "base/platform_thread.h"
#include "nsTArray.h"
#include "mozilla/dom/battery/Types.h"
#include "mozilla/dom/network/Types.h"
#include "mozilla/dom/power/Types.h"
#include "mozilla/dom/ScreenOrientation.h"
#include "mozilla/hal_sandbox/PHal.h"
#include "mozilla/HalNetworkInformation.h"
#include "mozilla/HalScreenConfiguration.h"
#include "mozilla/HalTypes.h"
#include "mozilla/Types.h"
@ -147,13 +147,13 @@ void DisableSensorNotifications(hal::SensorType aSensor);
* Inform the network backend there is a new network observer.
* @param aNetworkObserver The observer that should be added.
*/
void RegisterNetworkObserver(NetworkObserver* aNetworkObserver);
void RegisterNetworkObserver(hal::NetworkObserver* aNetworkObserver);
/**
* Inform the network backend a network observer unregistered.
* @param aNetworkObserver The observer that should be removed.
*/
void UnregisterNetworkObserver(NetworkObserver* aNetworkObserver);
void UnregisterNetworkObserver(hal::NetworkObserver* aNetworkObserver);
/**
* Returns the current network information.

Просмотреть файл

@ -4,19 +4,16 @@
* 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/. */
#ifndef mozilla_dom_network_Types_h
#define mozilla_dom_network_Types_h
#ifndef mozilla_HalNetworkInformation_h
#define mozilla_HalNetworkInformation_h
#include "mozilla/Observer.h"
namespace mozilla {
namespace hal {
class NetworkInformation;
} // namespace hal
template <class T>
class Observer;
typedef Observer<hal::NetworkInformation> NetworkObserver;
} // namespace hal
} // namespace mozilla
#endif // mozilla_dom_network_Types_h
#endif // mozilla_HalNetworkInformation_h

Просмотреть файл

@ -10,6 +10,7 @@ with Files('**'):
EXPORTS.mozilla += [
'Hal.h',
'HalImpl.h',
'HalNetworkInformation.h',
'HalSandbox.h',
'HalScreenConfiguration.h',
'HalSensor.h',

Просмотреть файл

@ -13,7 +13,6 @@
#include "mozilla/dom/TabParent.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/battery/Types.h"
#include "mozilla/dom/network/Types.h"
#include "mozilla/dom/ScreenOrientation.h"
#include "mozilla/fallback/FallbackScreenConfiguration.h"
#include "mozilla/EnumeratedRange.h"