2013-07-12 14:35:35 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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
|
|
|
|
* http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object
|
|
|
|
* http://www.w3.org/TR/tracking-dnt/
|
|
|
|
* http://www.w3.org/TR/geolocation-API/#geolocation_interface
|
|
|
|
* http://www.w3.org/TR/battery-status/#navigatorbattery-interface
|
|
|
|
* http://www.w3.org/TR/vibration/#vibration-interface
|
2013-07-12 14:35:44 +00:00
|
|
|
* http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1
|
2013-07-12 14:36:32 +00:00
|
|
|
* https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
|
2014-03-06 15:51:23 +00:00
|
|
|
* http://www.w3.org/TR/beacon/#sec-beacon-method
|
2013-07-12 14:35:35 +00:00
|
|
|
*
|
|
|
|
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
|
|
|
* Opera Software ASA. You are granted a license to use, reproduce
|
|
|
|
* and create derivative works of this document.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// http://www.whatwg.org/specs/web-apps/current-work/#the-navigator-object
|
2014-11-08 00:07:12 +00:00
|
|
|
[HeaderFile="Navigator.h", NeedResolve]
|
2013-07-12 14:35:35 +00:00
|
|
|
interface Navigator {
|
|
|
|
// objects implementing this interface also implement the interfaces given below
|
|
|
|
};
|
|
|
|
Navigator implements NavigatorID;
|
|
|
|
Navigator implements NavigatorLanguage;
|
|
|
|
Navigator implements NavigatorOnLine;
|
|
|
|
Navigator implements NavigatorContentUtils;
|
|
|
|
Navigator implements NavigatorStorageUtils;
|
2014-05-12 02:05:03 +00:00
|
|
|
Navigator implements NavigatorFeatures;
|
2013-07-12 14:35:35 +00:00
|
|
|
|
2014-08-05 02:20:34 +00:00
|
|
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
2013-07-12 14:35:35 +00:00
|
|
|
interface NavigatorID {
|
2013-11-20 14:29:01 +00:00
|
|
|
// WebKit/Blink/Trident/Presto support this (hardcoded "Mozilla").
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-11-20 14:29:01 +00:00
|
|
|
readonly attribute DOMString appCodeName; // constant "Mozilla"
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute DOMString appName;
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute DOMString appVersion;
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute DOMString platform;
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute DOMString userAgent;
|
2014-09-24 16:09:50 +00:00
|
|
|
[Constant, Cached]
|
2013-11-20 14:29:01 +00:00
|
|
|
readonly attribute DOMString product; // constant "Gecko"
|
2013-07-12 14:35:35 +00:00
|
|
|
|
2013-11-20 14:29:01 +00:00
|
|
|
// Everyone but WebKit/Blink supports this. See bug 679971.
|
|
|
|
boolean taintEnabled(); // constant false
|
2013-07-12 14:35:35 +00:00
|
|
|
};
|
|
|
|
|
2014-09-05 14:26:34 +00:00
|
|
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
2013-07-12 14:35:35 +00:00
|
|
|
interface NavigatorLanguage {
|
2014-09-24 16:09:50 +00:00
|
|
|
|
|
|
|
// These 2 values are cached. They are updated when pref
|
|
|
|
// intl.accept_languages is changed.
|
|
|
|
|
|
|
|
[Pure, Cached]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute DOMString? language;
|
2014-08-05 02:20:34 +00:00
|
|
|
[Pure, Cached, Frozen]
|
|
|
|
readonly attribute sequence<DOMString> languages;
|
2013-07-12 14:35:35 +00:00
|
|
|
};
|
|
|
|
|
2014-08-05 02:20:34 +00:00
|
|
|
[NoInterfaceObject, Exposed=(Window,Worker)]
|
2013-07-12 14:35:35 +00:00
|
|
|
interface NavigatorOnLine {
|
|
|
|
readonly attribute boolean onLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorContentUtils {
|
|
|
|
// content handler registration
|
|
|
|
[Throws]
|
|
|
|
void registerProtocolHandler(DOMString scheme, DOMString url, DOMString title);
|
|
|
|
[Throws]
|
|
|
|
void registerContentHandler(DOMString mimeType, DOMString url, DOMString title);
|
|
|
|
// NOT IMPLEMENTED
|
|
|
|
//DOMString isProtocolHandlerRegistered(DOMString scheme, DOMString url);
|
|
|
|
//DOMString isContentHandlerRegistered(DOMString mimeType, DOMString url);
|
|
|
|
//void unregisterProtocolHandler(DOMString scheme, DOMString url);
|
|
|
|
//void unregisterContentHandler(DOMString mimeType, DOMString url);
|
|
|
|
};
|
|
|
|
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorStorageUtils {
|
|
|
|
// NOT IMPLEMENTED
|
|
|
|
//void yieldForStorageUpdates();
|
|
|
|
};
|
|
|
|
|
2014-05-12 02:05:03 +00:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorFeatures {
|
2014-07-19 01:31:11 +00:00
|
|
|
[CheckPermissions="feature-detection", Throws]
|
2014-08-01 03:50:30 +00:00
|
|
|
Promise<any> getFeature(DOMString name);
|
2014-07-24 19:57:02 +00:00
|
|
|
|
|
|
|
[CheckPermissions="feature-detection", Throws]
|
|
|
|
Promise<any> hasFeature(DOMString name);
|
2014-05-12 02:05:03 +00:00
|
|
|
};
|
|
|
|
|
2013-07-12 14:35:35 +00:00
|
|
|
// Things that definitely need to be in the spec and and are not for some
|
|
|
|
// reason. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=22406
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws]
|
|
|
|
readonly attribute MimeTypeArray mimeTypes;
|
|
|
|
[Throws]
|
|
|
|
readonly attribute PluginArray plugins;
|
|
|
|
};
|
|
|
|
|
|
|
|
// http://www.w3.org/TR/tracking-dnt/ sort of
|
|
|
|
partial interface Navigator {
|
|
|
|
readonly attribute DOMString doNotTrack;
|
|
|
|
};
|
|
|
|
|
|
|
|
// http://www.w3.org/TR/geolocation-API/#geolocation_interface
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorGeolocation {
|
2013-07-26 20:12:12 +00:00
|
|
|
[Throws, Pref="geo.enabled"]
|
|
|
|
readonly attribute Geolocation geolocation;
|
2013-07-12 14:35:35 +00:00
|
|
|
};
|
|
|
|
Navigator implements NavigatorGeolocation;
|
|
|
|
|
|
|
|
// http://www.w3.org/TR/battery-status/#navigatorbattery-interface
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorBattery {
|
|
|
|
// XXXbz Per spec this should be non-nullable, but we return null in
|
|
|
|
// torn-down windows. See bug 884925.
|
2014-05-25 18:31:11 +00:00
|
|
|
[Throws, Pref="dom.battery.enabled"]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute BatteryManager? battery;
|
|
|
|
};
|
|
|
|
Navigator implements NavigatorBattery;
|
|
|
|
|
2013-10-02 17:27:07 +00:00
|
|
|
// https://wiki.mozilla.org/WebAPI/DataStore
|
2014-08-05 02:20:34 +00:00
|
|
|
[NoInterfaceObject,
|
|
|
|
Exposed=(Window,Worker)]
|
2013-10-02 17:27:07 +00:00
|
|
|
interface NavigatorDataStore {
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject, Func="Navigator::HasDataStoreSupport"]
|
2014-08-01 03:50:30 +00:00
|
|
|
Promise<sequence<DataStore>> getDataStores(DOMString name,
|
|
|
|
optional DOMString? owner = null);
|
2013-10-02 17:27:07 +00:00
|
|
|
};
|
|
|
|
Navigator implements NavigatorDataStore;
|
|
|
|
|
2013-07-12 14:35:35 +00:00
|
|
|
// http://www.w3.org/TR/vibration/#vibration-interface
|
|
|
|
partial interface Navigator {
|
|
|
|
// We don't support sequences in unions yet
|
|
|
|
//boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
|
2013-09-28 18:58:38 +00:00
|
|
|
boolean vibrate(unsigned long duration);
|
|
|
|
boolean vibrate(sequence<unsigned long> pattern);
|
2013-07-12 14:35:35 +00:00
|
|
|
};
|
|
|
|
|
2014-01-28 16:09:34 +00:00
|
|
|
// http://www.w3.org/TR/pointerevents/#extensions-to-the-navigator-interface
|
|
|
|
partial interface Navigator {
|
|
|
|
[Pref="dom.w3c_pointer_events.enabled"]
|
|
|
|
readonly attribute long maxTouchPoints;
|
|
|
|
};
|
|
|
|
|
2013-07-12 14:35:35 +00:00
|
|
|
// Mozilla-specific extensions
|
|
|
|
|
|
|
|
callback interface MozIdleObserver {
|
|
|
|
// Time is in seconds and is read only when idle observers are added
|
|
|
|
// and removed.
|
|
|
|
readonly attribute unsigned long time;
|
|
|
|
void onidle();
|
|
|
|
void onactive();
|
|
|
|
};
|
|
|
|
|
2014-06-07 17:30:17 +00:00
|
|
|
#ifdef MOZ_B2G
|
2014-06-26 23:18:20 +00:00
|
|
|
dictionary MobileIdOptions {
|
|
|
|
boolean forceSelection = false;
|
|
|
|
};
|
|
|
|
|
2014-06-07 17:30:17 +00:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface NavigatorMobileId {
|
2014-06-26 23:18:19 +00:00
|
|
|
// Ideally we would use [CheckPermissions] here, but the "mobileid"
|
|
|
|
// permission is set to PROMPT_ACTION and [CheckPermissions] only checks
|
|
|
|
// for ALLOW_ACTION.
|
2014-08-01 03:50:30 +00:00
|
|
|
// XXXbz what is this promise resolved with?
|
2015-01-12 16:52:25 +00:00
|
|
|
[NewObject, Func="Navigator::HasMobileIdSupport"]
|
2014-08-01 03:50:30 +00:00
|
|
|
Promise<any> getMobileIdAssertion(optional MobileIdOptions options);
|
2014-06-07 17:30:17 +00:00
|
|
|
};
|
|
|
|
Navigator implements NavigatorMobileId;
|
|
|
|
#endif // MOZ_B2G
|
|
|
|
|
2013-07-12 14:35:35 +00:00
|
|
|
// nsIDOMNavigator
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws]
|
|
|
|
readonly attribute DOMString oscpu;
|
|
|
|
// WebKit/Blink support this; Trident/Presto do not.
|
|
|
|
readonly attribute DOMString vendor;
|
|
|
|
// WebKit/Blink supports this (hardcoded ""); Trident/Presto do not.
|
|
|
|
readonly attribute DOMString vendorSub;
|
|
|
|
// WebKit/Blink supports this (hardcoded "20030107"); Trident/Presto don't
|
|
|
|
readonly attribute DOMString productSub;
|
|
|
|
// WebKit/Blink/Trident/Presto support this.
|
|
|
|
readonly attribute boolean cookieEnabled;
|
|
|
|
[Throws]
|
|
|
|
readonly attribute DOMString buildID;
|
2015-01-05 18:50:32 +00:00
|
|
|
[Throws, CheckPermissions="power", UnsafeInPrerendering]
|
2013-07-12 14:35:35 +00:00
|
|
|
readonly attribute MozPowerManager mozPower;
|
|
|
|
|
|
|
|
// WebKit/Blink/Trident/Presto support this.
|
|
|
|
[Throws]
|
|
|
|
boolean javaEnabled();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Navigator requests to add an idle observer to the existing window.
|
|
|
|
*/
|
2014-07-24 19:57:02 +00:00
|
|
|
[Throws, CheckPermissions="idle"]
|
2013-07-12 14:35:35 +00:00
|
|
|
void addIdleObserver(MozIdleObserver aIdleObserver);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Navigator requests to remove an idle observer from the existing window.
|
|
|
|
*/
|
2014-07-24 19:57:02 +00:00
|
|
|
[Throws, CheckPermissions="idle"]
|
2013-07-12 14:35:35 +00:00
|
|
|
void removeIdleObserver(MozIdleObserver aIdleObserver);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request a wake lock for a resource.
|
|
|
|
*
|
|
|
|
* A page holds a wake lock to request that a resource not be turned
|
|
|
|
* off (or otherwise made unavailable).
|
|
|
|
*
|
|
|
|
* The topic is the name of a resource that might be made unavailable for
|
|
|
|
* various reasons. For example, on a mobile device the power manager might
|
|
|
|
* decide to turn off the screen after a period of idle time to save power.
|
|
|
|
*
|
|
|
|
* The resource manager checks the lock state of a topic before turning off
|
|
|
|
* the associated resource. For example, a page could hold a lock on the
|
|
|
|
* "screen" topic to prevent the screensaver from appearing or the screen
|
|
|
|
* from turning off.
|
|
|
|
*
|
|
|
|
* The resource manager defines what each topic means and sets policy. For
|
|
|
|
* example, the resource manager might decide to ignore 'screen' wake locks
|
|
|
|
* held by pages which are not visible.
|
|
|
|
*
|
|
|
|
* One topic can be locked multiple times; it is considered released only when
|
|
|
|
* all locks on the topic have been released.
|
|
|
|
*
|
2014-01-07 12:16:07 +00:00
|
|
|
* The returned MozWakeLock object is a token of the lock. You can
|
2013-07-12 14:35:35 +00:00
|
|
|
* unlock the lock via the object's |unlock| method. The lock is released
|
|
|
|
* automatically when its associated window is unloaded.
|
|
|
|
*
|
|
|
|
* @param aTopic resource name
|
|
|
|
*/
|
2015-01-05 18:50:32 +00:00
|
|
|
[Throws, Pref="dom.wakelock.enabled", Func="Navigator::HasWakeLockSupport", UnsafeInPrerendering]
|
2013-07-12 14:35:35 +00:00
|
|
|
MozWakeLock requestWakeLock(DOMString aTopic);
|
|
|
|
};
|
2013-07-12 14:35:44 +00:00
|
|
|
|
|
|
|
// nsIDOMNavigatorDeviceStorage
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, Pref="device.storage.enabled"]
|
|
|
|
DeviceStorage? getDeviceStorage(DOMString type);
|
|
|
|
[Throws, Pref="device.storage.enabled"]
|
|
|
|
sequence<DeviceStorage> getDeviceStorages(DOMString type);
|
|
|
|
};
|
|
|
|
|
|
|
|
// nsIDOMNavigatorDesktopNotification
|
|
|
|
partial interface Navigator {
|
2014-12-21 16:54:06 +00:00
|
|
|
[Throws, Pref="notification.feature.enabled", UnsafeInPrerendering]
|
2013-07-12 14:35:44 +00:00
|
|
|
readonly attribute DesktopNotificationCenter mozNotification;
|
|
|
|
};
|
|
|
|
|
2014-07-10 23:20:49 +00:00
|
|
|
#ifdef MOZ_WEBSMS_BACKEND
|
2013-07-12 14:35:44 +00:00
|
|
|
partial interface Navigator {
|
2015-01-05 10:34:31 +00:00
|
|
|
[CheckPermissions="sms", Pref="dom.sms.enabled", AvailableIn="CertifiedApps"]
|
2013-07-12 14:35:44 +00:00
|
|
|
readonly attribute MozMobileMessageManager? mozMobileMessage;
|
|
|
|
};
|
2014-07-10 23:20:49 +00:00
|
|
|
#endif
|
2013-07-12 14:35:44 +00:00
|
|
|
|
2014-03-05 03:22:39 +00:00
|
|
|
// NetworkInformation
|
2013-07-12 14:35:44 +00:00
|
|
|
partial interface Navigator {
|
2014-03-05 03:22:39 +00:00
|
|
|
[Throws, Pref="dom.netinfo.enabled"]
|
|
|
|
readonly attribute NetworkInformation connection;
|
2013-07-12 14:35:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// nsIDOMNavigatorCamera
|
|
|
|
partial interface Navigator {
|
2014-12-21 16:56:52 +00:00
|
|
|
[Throws, Func="Navigator::HasCameraSupport", UnsafeInPrerendering]
|
2013-07-12 14:35:44 +00:00
|
|
|
readonly attribute CameraManager mozCameras;
|
|
|
|
};
|
|
|
|
|
|
|
|
// nsIDOMNavigatorSystemMessages and sort of maybe
|
|
|
|
// http://www.w3.org/2012/sysapps/runtime/#extension-to-the-navigator-interface-1
|
|
|
|
callback systemMessageCallback = void (optional object message);
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, Pref="dom.sysmsg.enabled"]
|
|
|
|
void mozSetMessageHandler (DOMString type, systemMessageCallback? callback);
|
|
|
|
[Throws, Pref="dom.sysmsg.enabled"]
|
|
|
|
boolean mozHasPendingMessage (DOMString type);
|
2015-01-13 09:53:22 +00:00
|
|
|
|
|
|
|
// This method can be called only from the systeMessageCallback function and
|
|
|
|
// it allows the page to set a promise to keep alive the app until the
|
|
|
|
// current operation is not fully completed.
|
|
|
|
[Throws, Pref="dom.sysmsg.enabled"]
|
|
|
|
void mozSetMessageHandlerPromise (Promise<any> promise);
|
2013-07-12 14:35:44 +00:00
|
|
|
};
|
2013-07-12 14:36:13 +00:00
|
|
|
|
|
|
|
#ifdef MOZ_B2G_RIL
|
2013-07-12 14:36:22 +00:00
|
|
|
partial interface Navigator {
|
2014-12-21 17:01:41 +00:00
|
|
|
[Throws, Pref="dom.mobileconnection.enabled", CheckPermissions="mobileconnection mobilenetwork", UnsafeInPrerendering]
|
2013-11-13 08:50:11 +00:00
|
|
|
readonly attribute MozMobileConnectionArray mozMobileConnections;
|
2013-07-12 14:36:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
partial interface Navigator {
|
2015-01-29 07:49:40 +00:00
|
|
|
[Throws, Pref="dom.cellbroadcast.enabled", CheckPermissions="cellbroadcast",
|
|
|
|
AvailableIn="CertifiedApps", UnsafeInPrerendering]
|
2013-07-12 14:36:22 +00:00
|
|
|
readonly attribute MozCellBroadcast mozCellBroadcast;
|
|
|
|
};
|
|
|
|
|
|
|
|
partial interface Navigator {
|
2015-01-29 07:32:33 +00:00
|
|
|
[Throws, Pref="dom.voicemail.enabled", CheckPermissions="voicemail",
|
|
|
|
AvailableIn="CertifiedApps", UnsafeInPrerendering]
|
2013-07-12 14:36:22 +00:00
|
|
|
readonly attribute MozVoicemail mozVoicemail;
|
|
|
|
};
|
|
|
|
|
|
|
|
partial interface Navigator {
|
2015-01-29 07:55:47 +00:00
|
|
|
[Throws, Pref="dom.icc.enabled", CheckPermissions="mobileconnection",
|
|
|
|
AvailableIn="CertifiedApps", UnsafeInPrerendering]
|
2013-07-12 14:36:22 +00:00
|
|
|
readonly attribute MozIccManager? mozIccManager;
|
|
|
|
};
|
2013-07-12 14:36:32 +00:00
|
|
|
|
2013-10-29 08:12:38 +00:00
|
|
|
partial interface Navigator {
|
2014-12-21 17:01:41 +00:00
|
|
|
[Throws, Pref="dom.telephony.enabled", CheckPermissions="telephony", UnsafeInPrerendering]
|
2013-10-29 08:12:38 +00:00
|
|
|
readonly attribute Telephony? mozTelephony;
|
|
|
|
};
|
2014-05-25 18:31:11 +00:00
|
|
|
#endif // MOZ_B2G_RIL
|
2013-10-29 08:12:38 +00:00
|
|
|
|
2013-07-12 14:36:32 +00:00
|
|
|
#ifdef MOZ_GAMEPAD
|
|
|
|
// https://dvcs.w3.org/hg/gamepad/raw-file/default/gamepad.html#navigator-interface-extension
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, Pref="dom.gamepad.enabled"]
|
|
|
|
sequence<Gamepad?> getGamepads();
|
|
|
|
};
|
|
|
|
#endif // MOZ_GAMEPAD
|
|
|
|
|
2014-07-09 19:24:49 +00:00
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, Pref="dom.vr.enabled"]
|
|
|
|
Promise<sequence<VRDevice>> getVRDevices();
|
|
|
|
};
|
|
|
|
|
2013-07-12 14:36:32 +00:00
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
partial interface Navigator {
|
2014-12-21 17:01:41 +00:00
|
|
|
[Throws, CheckPermissions="bluetooth", UnsafeInPrerendering]
|
2013-08-12 08:31:58 +00:00
|
|
|
readonly attribute BluetoothManager mozBluetooth;
|
2013-07-12 14:36:32 +00:00
|
|
|
};
|
|
|
|
#endif // MOZ_B2G_BT
|
|
|
|
|
2013-09-03 22:26:33 +00:00
|
|
|
#ifdef MOZ_B2G_FM
|
|
|
|
partial interface Navigator {
|
2014-12-21 17:01:41 +00:00
|
|
|
[Throws, CheckPermissions="fmradio", UnsafeInPrerendering]
|
2013-09-03 22:26:33 +00:00
|
|
|
readonly attribute FMRadio mozFMRadio;
|
|
|
|
};
|
|
|
|
#endif // MOZ_B2G_FM
|
|
|
|
|
2013-07-12 14:36:32 +00:00
|
|
|
#ifdef MOZ_TIME_MANAGER
|
|
|
|
// nsIDOMMozNavigatorTime
|
|
|
|
partial interface Navigator {
|
2015-01-05 18:50:32 +00:00
|
|
|
[Throws, CheckPermissions="time", UnsafeInPrerendering]
|
2013-07-12 14:36:32 +00:00
|
|
|
readonly attribute MozTimeManager mozTime;
|
|
|
|
};
|
|
|
|
#endif // MOZ_TIME_MANAGER
|
|
|
|
|
|
|
|
#ifdef MOZ_AUDIO_CHANNEL_MANAGER
|
|
|
|
// nsIMozNavigatorAudioChannelManager
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws]
|
|
|
|
readonly attribute AudioChannelManager mozAudioChannelManager;
|
|
|
|
};
|
|
|
|
#endif // MOZ_AUDIO_CHANNEL_MANAGER
|
2013-07-12 14:37:21 +00:00
|
|
|
|
|
|
|
#ifdef MOZ_MEDIA_NAVIGATOR
|
2013-09-16 06:34:57 +00:00
|
|
|
callback NavigatorUserMediaSuccessCallback = void (MediaStream stream);
|
2014-10-27 19:42:56 +00:00
|
|
|
callback NavigatorUserMediaErrorCallback = void (MediaStreamError error);
|
2013-09-16 06:34:57 +00:00
|
|
|
|
2013-07-12 14:37:21 +00:00
|
|
|
partial interface Navigator {
|
2014-09-20 06:20:41 +00:00
|
|
|
[Throws, Func="Navigator::HasUserMediaSupport"]
|
|
|
|
readonly attribute MediaDevices mediaDevices;
|
|
|
|
|
|
|
|
// Deprecated. Use mediaDevices.getUserMedia instead.
|
2014-12-21 17:06:08 +00:00
|
|
|
[Throws, Func="Navigator::HasUserMediaSupport", UnsafeInPrerendering]
|
2013-09-16 06:34:57 +00:00
|
|
|
void mozGetUserMedia(MediaStreamConstraints constraints,
|
|
|
|
NavigatorUserMediaSuccessCallback successCallback,
|
|
|
|
NavigatorUserMediaErrorCallback errorCallback);
|
2013-07-12 14:37:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// nsINavigatorUserMedia
|
|
|
|
callback MozGetUserMediaDevicesSuccessCallback = void (nsIVariant? devices);
|
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, ChromeOnly]
|
2014-04-18 18:00:16 +00:00
|
|
|
void mozGetUserMediaDevices(MediaStreamConstraints constraints,
|
2013-09-16 06:34:57 +00:00
|
|
|
MozGetUserMediaDevicesSuccessCallback onsuccess,
|
2014-02-14 19:32:58 +00:00
|
|
|
NavigatorUserMediaErrorCallback onerror,
|
|
|
|
// The originating innerWindowID is needed to
|
|
|
|
// avoid calling the callbacks if the window has
|
|
|
|
// navigated away. It is optional only as legacy.
|
|
|
|
optional unsigned long long innerWindowID = 0);
|
2013-07-12 14:37:21 +00:00
|
|
|
};
|
|
|
|
#endif // MOZ_MEDIA_NAVIGATOR
|
2014-03-06 15:51:23 +00:00
|
|
|
|
2013-11-19 23:14:07 +00:00
|
|
|
// Service Workers/Navigation Controllers
|
|
|
|
partial interface Navigator {
|
|
|
|
[Pref="dom.serviceWorkers.enabled"]
|
|
|
|
readonly attribute ServiceWorkerContainer serviceWorker;
|
|
|
|
};
|
|
|
|
|
2014-03-06 15:51:23 +00:00
|
|
|
partial interface Navigator {
|
|
|
|
[Throws, Pref="beacon.enabled"]
|
|
|
|
boolean sendBeacon(DOMString url,
|
|
|
|
optional (ArrayBufferView or Blob or DOMString or FormData)? data = null);
|
|
|
|
};
|
2014-08-21 09:15:18 +00:00
|
|
|
|
|
|
|
partial interface Navigator {
|
|
|
|
[Pref="dom.tv.enabled", CheckPermissions="tv", Func="Navigator::HasTVSupport"]
|
|
|
|
readonly attribute TVManager? tv;
|
|
|
|
};
|
2014-11-18 09:13:02 +00:00
|
|
|
|
|
|
|
#ifdef MOZ_EME
|
|
|
|
partial interface Navigator {
|
2015-02-11 22:27:25 +00:00
|
|
|
[Pref="media.eme.apiVisible", NewObject]
|
2014-11-18 09:13:02 +00:00
|
|
|
Promise<MediaKeySystemAccess>
|
|
|
|
requestMediaKeySystemAccess(DOMString keySystem,
|
|
|
|
optional sequence<MediaKeySystemOptions> supportedConfigurations);
|
|
|
|
};
|
|
|
|
#endif
|
2015-02-17 22:10:45 +00:00
|
|
|
|
|
|
|
#ifdef NIGHTLY_BUILD
|
|
|
|
partial interface Navigator {
|
|
|
|
[Func="Navigator::IsE10sEnabled"]
|
|
|
|
readonly attribute boolean mozE10sEnabled;
|
|
|
|
};
|
|
|
|
#endif
|