зеркало из https://github.com/mozilla/gecko-dev.git
Bug 960426 - Part 1: WebIDL changes for NetInfo API. r=sicking, r=marcosc
--HG-- rename : dom/webidl/MozConnection.webidl => dom/webidl/NetworkInformation.webidl
This commit is contained in:
Родитель
6deadb4ec1
Коммит
02bd1b138b
|
@ -1,13 +0,0 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
[Pref="dom.network.enabled", NoInterfaceObject]
|
||||
interface MozConnection : EventTarget {
|
||||
readonly attribute unrestricted double bandwidth;
|
||||
readonly attribute boolean metered;
|
||||
|
||||
attribute EventHandler onchange;
|
||||
};
|
||||
|
|
@ -235,10 +235,10 @@ partial interface Navigator {
|
|||
readonly attribute MozMobileMessageManager? mozMobileMessage;
|
||||
};
|
||||
|
||||
// nsIDOMMozNavigatorNetwork
|
||||
// NetworkInformation
|
||||
partial interface Navigator {
|
||||
[Pref="dom.network.enabled"]
|
||||
readonly attribute MozConnection? mozConnection;
|
||||
[Throws, Pref="dom.netinfo.enabled"]
|
||||
readonly attribute NetworkInformation connection;
|
||||
};
|
||||
|
||||
// nsIDOMNavigatorCamera
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/* 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/.
|
||||
*
|
||||
* The origin of this IDL file is https://w3c.github.io/netinfo/
|
||||
*
|
||||
* Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
enum ConnectionType {
|
||||
"cellular",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"wifi",
|
||||
"other",
|
||||
"none"
|
||||
};
|
||||
|
||||
[Pref="dom.netinfo.enabled"]
|
||||
interface NetworkInformation : EventTarget {
|
||||
readonly attribute ConnectionType type;
|
||||
attribute EventHandler ontypechange;
|
||||
};
|
|
@ -4185,9 +4185,8 @@ pref("profiler.enabled", false);
|
|||
pref("profiler.interval", 10);
|
||||
pref("profiler.entries", 100000);
|
||||
|
||||
// Network API
|
||||
pref("dom.network.enabled", true);
|
||||
pref("dom.network.metered", false);
|
||||
// Network Information API
|
||||
pref("dom.netinfo.enabled", true);
|
||||
|
||||
#ifdef XP_WIN
|
||||
// On 32-bit Windows, fire a low-memory notification if we have less than this
|
||||
|
|
Загрузка…
Ссылка в новой задаче