summaryrefslogtreecommitdiff
path: root/xpcom/system
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /xpcom/system
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloaduxp-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
Add m-esr52 at 52.6.0
Diffstat (limited to 'xpcom/system')
-rw-r--r--xpcom/system/moz.build26
-rw-r--r--xpcom/system/nsIBlocklistService.idl140
-rw-r--r--xpcom/system/nsICrashReporter.idl135
-rw-r--r--xpcom/system/nsIDeviceSensors.idl60
-rw-r--r--xpcom/system/nsIGConfService.idl50
-rw-r--r--xpcom/system/nsIGIOService.idl82
-rw-r--r--xpcom/system/nsIGSettingsService.idl30
-rw-r--r--xpcom/system/nsIGeolocationProvider.idl83
-rw-r--r--xpcom/system/nsIHapticFeedback.idl22
-rw-r--r--xpcom/system/nsIPackageKitService.idl46
-rw-r--r--xpcom/system/nsIPlatformInfo.idl19
-rw-r--r--xpcom/system/nsIXULAppInfo.idl53
-rw-r--r--xpcom/system/nsIXULRuntime.idl176
13 files changed, 922 insertions, 0 deletions
diff --git a/xpcom/system/moz.build b/xpcom/system/moz.build
new file mode 100644
index 0000000000..8a4f88efe5
--- /dev/null
+++ b/xpcom/system/moz.build
@@ -0,0 +1,26 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+XPIDL_SOURCES += [
+ 'nsIBlocklistService.idl',
+ 'nsIDeviceSensors.idl',
+ 'nsIGConfService.idl',
+ 'nsIGeolocationProvider.idl',
+ 'nsIGIOService.idl',
+ 'nsIGSettingsService.idl',
+ 'nsIHapticFeedback.idl',
+ 'nsIPackageKitService.idl',
+ 'nsIPlatformInfo.idl',
+ 'nsIXULAppInfo.idl',
+ 'nsIXULRuntime.idl',
+]
+
+if CONFIG['MOZ_CRASHREPORTER']:
+ XPIDL_SOURCES += [
+ 'nsICrashReporter.idl',
+ ]
+
+XPIDL_MODULE = 'xpcom_system'
diff --git a/xpcom/system/nsIBlocklistService.idl b/xpcom/system/nsIBlocklistService.idl
new file mode 100644
index 0000000000..b70038431d
--- /dev/null
+++ b/xpcom/system/nsIBlocklistService.idl
@@ -0,0 +1,140 @@
+/* -*- 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/. */
+
+
+#include "nsISupports.idl"
+
+interface nsIPluginTag;
+interface nsIVariant;
+
+[scriptable, uuid(a6dcc76e-9f62-4cc1-a470-b483a1a6f096)]
+interface nsIBlocklistService : nsISupports
+{
+ // Indicates that the item does not appear in the blocklist.
+ const unsigned long STATE_NOT_BLOCKED = 0;
+ // Indicates that the item is in the blocklist but the problem is not severe
+ // enough to warant forcibly blocking.
+ const unsigned long STATE_SOFTBLOCKED = 1;
+ // Indicates that the item should be blocked and never used.
+ const unsigned long STATE_BLOCKED = 2;
+ // Indicates that the item is considered outdated, and there is a known
+ // update available.
+ const unsigned long STATE_OUTDATED = 3;
+ // Indicates that the item is vulnerable and there is an update.
+ const unsigned long STATE_VULNERABLE_UPDATE_AVAILABLE = 4;
+ // Indicates that the item is vulnerable and there is no update.
+ const unsigned long STATE_VULNERABLE_NO_UPDATE = 5;
+
+ /**
+ * Determine if an item is blocklisted
+ * @param addon
+ * The addon item to be checked.
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns true if the item is compatible with this version of the
+ * application or this version of the toolkit, false, otherwise.
+ */
+ boolean isAddonBlocklisted(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist state of an add-on
+ * @param id
+ * The addon item to be checked.
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns The STATE constant.
+ */
+ unsigned long getAddonBlocklistState(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist state of a plugin
+ * @param plugin
+ * The plugin to get the state for
+ * @param appVersion
+ * The version of the application we are checking in the blocklist.
+ * If this parameter is null, the version of the running application
+ * is used.
+ * @param toolkitVersion
+ * The version of the toolkit we are checking in the blocklist.
+ * If this parameter is null, the version of the running toolkit
+ * is used.
+ * @returns The STATE constant.
+ */
+ unsigned long getPluginBlocklistState(in nsIPluginTag plugin,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist web page of an add-on.
+ * @param addon
+ * The addon item whose url is required.
+ * @returns The URL of the description page.
+ */
+ AString getAddonBlocklistURL(in jsval addon,
+ [optional] in AString appVersion,
+ [optional] in AString toolkitVersion);
+
+ /**
+ * Determine the blocklist web page of a plugin.
+ * @param plugin
+ * The blocked plugin that we are determining the web page for.
+ * @returns The URL of the description page.
+ */
+ AString getPluginBlocklistURL(in nsIPluginTag plugin);
+
+ /**
+ * Determine the blocklist infoURL of a plugin.
+ * @param plugin
+ * The blocked plugin that we are determining the infoURL for.
+ * @returns The preferred URL to present the user, or |null| if
+ * it is not available.
+ */
+ AString getPluginInfoURL(in nsIPluginTag plugin);
+};
+
+/**
+ * nsIBlocklistPrompt is used, if available, by the default implementation of
+ * nsIBlocklistService to display a confirmation UI to the user before blocking
+ * extensions/plugins.
+ */
+[scriptable, uuid(ba915921-b9c0-400d-8e4f-ca1b80c5699a)]
+interface nsIBlocklistPrompt : nsISupports
+{
+ /**
+ * Prompt the user about newly blocked addons. The prompt is then resposible
+ * for soft-blocking any addons that need to be afterwards
+ *
+ * @param aAddons
+ * An array of addons and plugins that are blocked. These are javascript
+ * objects with properties:
+ * name - the plugin or extension name,
+ * version - the version of the extension or plugin,
+ * icon - the plugin or extension icon,
+ * disable - can be used by the nsIBlocklistPrompt to allows users to decide
+ * whether a soft-blocked add-on should be disabled,
+ * blocked - true if the item is hard-blocked, false otherwise,
+ * item - the nsIPluginTag or Addon object
+ * @param aCount
+ * The number of addons
+ */
+ void prompt([array, size_is(aCount)] in nsIVariant aAddons,
+ [optional] in uint32_t aCount);
+};
diff --git a/xpcom/system/nsICrashReporter.idl b/xpcom/system/nsICrashReporter.idl
new file mode 100644
index 0000000000..c2f590098c
--- /dev/null
+++ b/xpcom/system/nsICrashReporter.idl
@@ -0,0 +1,135 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIFile;
+interface nsIURL;
+
+/**
+ * Provides access to crash reporting functionality.
+ *
+ * @status UNSTABLE - This interface is not frozen and will probably change in
+ * future releases.
+ */
+
+[scriptable, uuid(4b74c39a-cf69-4a8a-8e63-169d81ad1ecf)]
+interface nsICrashReporter : nsISupports
+{
+ /**
+ * Get the enabled status of the crash reporter.
+ */
+ readonly attribute boolean enabled;
+
+ /**
+ * Enable or disable crash reporting at runtime. Not available to script
+ * because the JS engine relies on proper exception handler chaining.
+ */
+ [noscript]
+ void setEnabled(in bool enabled);
+
+ /**
+ * Get or set the URL to which crash reports will be submitted.
+ * Only https and http URLs are allowed, as the submission is handled
+ * by OS-native networking libraries.
+ *
+ * @throw NS_ERROR_NOT_INITIALIZED if crash reporting is not initialized
+ * @throw NS_ERROR_INVALID_ARG on set if a non-http(s) URL is assigned
+ * @throw NS_ERROR_FAILURE on get if no URL is set
+ */
+ attribute nsIURL serverURL;
+
+ /**
+ * Get or set the path on the local system to which minidumps will be
+ * written when a crash happens.
+ *
+ * @throw NS_ERROR_NOT_INITIALIZED if crash reporting is not initialized
+ */
+ attribute nsIFile minidumpPath;
+
+ /**
+ * Add some extra data to be submitted with a crash report.
+ *
+ * @param key
+ * Name of the data to be added.
+ * @param data
+ * Data to be added.
+ *
+ * @throw NS_ERROR_NOT_INITIALIZED if crash reporting not initialized
+ * @throw NS_ERROR_INVALID_ARG if key or data contain invalid characters.
+ * Invalid characters for key are '=' and
+ * '\n'. Invalid character for data is '\0'.
+ */
+ void annotateCrashReport(in AUTF8String key, in AUTF8String data);
+
+ /**
+ * Append some data to the "Notes" field, to be submitted with a crash report.
+ * Unlike annotateCrashReport, this method will append to existing data.
+ *
+ * @param data
+ * Data to be added.
+ *
+ * @throw NS_ERROR_NOT_INITIALIZED if crash reporting not initialized
+ * @throw NS_ERROR_INVALID_ARG if data contains invalid characters.
+ * The only invalid character is '\0'.
+ */
+ void appendAppNotesToCrashReport(in ACString data);
+
+ /**
+ * Register a given memory range to be included in the crash report.
+ *
+ * @param ptr
+ * The starting address for the bytes.
+ * @param size
+ * The number of bytes to include.
+ *
+ * @throw NS_ERROR_NOT_INITIALIZED if crash reporting not initialized
+ * @throw NS_ERROR_NOT_IMPLEMENTED if unavailable on the current OS
+ */
+ void registerAppMemory(in unsigned long long ptr, in unsigned long long size);
+
+ /**
+ * Write a minidump immediately, with the user-supplied exception
+ * information. This is implemented on Windows only, because
+ * SEH (structured exception handling) exists on Windows only.
+ *
+ * @param aExceptionInfo EXCEPTION_INFO* provided by Window's SEH
+ */
+ [noscript] void writeMinidumpForException(in voidPtr aExceptionInfo);
+
+ /**
+ * Append note containing an Obj-C exception's info.
+ *
+ * @param aException NSException object to append note for
+ */
+ [noscript] void appendObjCExceptionInfoToAppNotes(in voidPtr aException);
+
+ /**
+ * User preference for submitting crash reports.
+ */
+ attribute boolean submitReports;
+
+ /**
+ * Cause the crash reporter to re-evaluate where crash events should go.
+ *
+ * This should be called during application startup and whenever profiles
+ * change.
+ */
+ void UpdateCrashEventsDir();
+
+ /**
+ * Save an anonymized memory report file for inclusion in a future crash
+ * report in this session.
+ *
+ * @throws NS_ERROR_NOT_INITIALIZED if crash reporting is disabled.
+ */
+ void saveMemoryReport();
+
+ /**
+ * Set the telemetry session ID which is recorded in crash metadata. This is
+ * saved in the crash manager and telemetry but is not submitted as a
+ * crash-stats annotation.
+ */
+ void setTelemetrySessionId(in AUTF8String id);
+};
diff --git a/xpcom/system/nsIDeviceSensors.idl b/xpcom/system/nsIDeviceSensors.idl
new file mode 100644
index 0000000000..dcb67cb925
--- /dev/null
+++ b/xpcom/system/nsIDeviceSensors.idl
@@ -0,0 +1,60 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIDOMWindow;
+
+[scriptable, uuid(0462247e-fe8c-4aa5-b675-3752547e485f)]
+interface nsIDeviceSensorData : nsISupports
+{
+ // Keep in sync with hal/HalSensor.h
+
+ // 1. TYPE_ORIENTATION: absolute device orientation, not spec-conform and
+ // deprecated on Android.
+ // 2. TYPE_ROTATION_VECTOR: absolute device orientation affected by drift.
+ // 3. TYPE_GAME_ROTATION_VECTOR: relative device orientation less affected by drift.
+ // Preferred fallback priorities on Android are [3, 2, 1] for the general case
+ // and [2, 1] if absolute orientation (compass heading) is required.
+ const unsigned long TYPE_ORIENTATION = 0;
+ const unsigned long TYPE_ACCELERATION = 1;
+ const unsigned long TYPE_PROXIMITY = 2;
+ const unsigned long TYPE_LINEAR_ACCELERATION = 3;
+ const unsigned long TYPE_GYROSCOPE = 4;
+ const unsigned long TYPE_LIGHT = 5;
+ const unsigned long TYPE_ROTATION_VECTOR = 6;
+ const unsigned long TYPE_GAME_ROTATION_VECTOR = 7;
+
+ readonly attribute unsigned long type;
+
+ readonly attribute double x;
+ readonly attribute double y;
+ readonly attribute double z;
+};
+
+[scriptable, uuid(e46e47c7-55ff-44c4-abce-21b14ba07f86)]
+interface nsIDeviceSensors : nsISupports
+{
+ /**
+ * Returns true if the given window has any listeners of the given type
+ */
+ bool hasWindowListener(in unsigned long aType, in nsIDOMWindow aWindow);
+
+ // Holds pointers, not AddRef objects -- it is up to the caller
+ // to call RemoveWindowListener before the window is deleted.
+
+ [noscript] void addWindowListener(in unsigned long aType, in nsIDOMWindow aWindow);
+ [noscript] void removeWindowListener(in unsigned long aType, in nsIDOMWindow aWindow);
+ [noscript] void removeWindowAsListener(in nsIDOMWindow aWindow);
+};
+
+%{C++
+
+#define NS_DEVICE_SENSORS_CID \
+{ 0xecba5203, 0x77da, 0x465a, \
+{ 0x86, 0x5e, 0x78, 0xb7, 0xaf, 0x10, 0xd8, 0xf7 } }
+
+#define NS_DEVICE_SENSORS_CONTRACTID "@mozilla.org/devicesensors;1"
+
+%}
diff --git a/xpcom/system/nsIGConfService.idl b/xpcom/system/nsIGConfService.idl
new file mode 100644
index 0000000000..ccc02610f2
--- /dev/null
+++ b/xpcom/system/nsIGConfService.idl
@@ -0,0 +1,50 @@
+/* -*- 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIArray;
+
+[scriptable, uuid(5009acae-6973-48c3-b6d6-52c692cc5d9d)]
+interface nsIGConfService : nsISupports
+{
+ /* Basic registry access */
+ boolean getBool(in AUTF8String key);
+ AUTF8String getString(in AUTF8String key);
+ long getInt(in AUTF8String key);
+ float getFloat(in AUTF8String key);
+
+ /*
+ * Use this to return any list items in GConf, this will return
+ * an array of UTF16 nsISupportsString's.
+ */
+ nsIArray getStringList(in AUTF8String key);
+
+ void setBool(in AUTF8String key, in boolean value);
+ void setString(in AUTF8String key, in AUTF8String value);
+ void setInt(in AUTF8String key, in long value);
+ void setFloat(in AUTF8String key, in float value);
+
+ /*
+ * Look up the handler for a protocol under the
+ * /desktop/gnome/url-handlers hierarchy.
+ */
+ AUTF8String getAppForProtocol(in AUTF8String scheme, out boolean enabled);
+
+ /*
+ * Check whether the handler for a scheme requires a terminal to run.
+ */
+ boolean handlerRequiresTerminal(in AUTF8String scheme);
+
+ /*
+ * Set the handler for a protocol, marking it as enabled.
+ * This removes any GnomeVFSMimeApp association for the protocol.
+ */
+ void setAppForProtocol(in AUTF8String scheme, in AUTF8String command);
+};
+
+%{C++
+#define NS_GCONFSERVICE_CONTRACTID "@mozilla.org/gnome-gconf-service;1"
+%}
diff --git a/xpcom/system/nsIGIOService.idl b/xpcom/system/nsIGIOService.idl
new file mode 100644
index 0000000000..cbbdabe7e2
--- /dev/null
+++ b/xpcom/system/nsIGIOService.idl
@@ -0,0 +1,82 @@
+/* -*- 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIUTF8StringEnumerator;
+interface nsIURI;
+
+/* nsIGIOMimeApp holds information about an application that is looked up
+ with nsIGIOService::GetAppForMimeType. */
+// 66009894-9877-405b-9321-bf30420e34e6 prev uuid
+
+[scriptable, uuid(ca6bad0c-8a48-48ac-82c7-27bb8f510fbe)]
+interface nsIGIOMimeApp : nsISupports
+{
+ const long EXPECTS_URIS = 0;
+ const long EXPECTS_PATHS = 1;
+ const long EXPECTS_URIS_FOR_NON_FILES = 2;
+
+ readonly attribute AUTF8String id;
+ readonly attribute AUTF8String name;
+ readonly attribute AUTF8String command;
+ readonly attribute long expectsURIs; // see constants above
+ readonly attribute nsIUTF8StringEnumerator supportedURISchemes;
+
+ void launch(in AUTF8String uri);
+ void setAsDefaultForMimeType(in AUTF8String mimeType);
+ void setAsDefaultForFileExtensions(in AUTF8String extensions);
+ void setAsDefaultForURIScheme(in AUTF8String uriScheme);
+};
+
+/*
+ * The VFS service makes use of two distinct registries.
+ *
+ * The application registry holds information about applications (uniquely
+ * identified by id), such as which MIME types and URI schemes they are
+ * capable of handling, whether they run in a terminal, etc.
+ *
+ * The MIME registry holds information about MIME types, such as which
+ * extensions map to a given MIME type. The MIME registry also stores the
+ * id of the application selected to handle each MIME type.
+ */
+
+// prev id dea20bf0-4e4d-48c5-b932-dc3e116dc64b
+[scriptable, uuid(eda22a30-84e1-4e16-9ca0-cd1553c2b34a)]
+interface nsIGIOService : nsISupports
+{
+
+ /*** MIME registry methods ***/
+
+ /* Obtain the MIME type registered for an extension. The extension
+ should not include a leading dot. */
+ AUTF8String getMimeTypeFromExtension(in AUTF8String extension);
+
+ /* Obtain the preferred application for opening a given URI scheme */
+ nsIGIOMimeApp getAppForURIScheme(in AUTF8String aURIScheme);
+
+ /* Obtain the preferred application for opening a given MIME type */
+ nsIGIOMimeApp getAppForMimeType(in AUTF8String mimeType);
+
+ /* Obtain the preferred application for opening a given MIME type */
+ nsIGIOMimeApp createAppFromCommand(in AUTF8String cmd,
+ in AUTF8String appName);
+
+ /* Obtain a description for the given MIME type */
+ AUTF8String getDescriptionForMimeType(in AUTF8String mimeType);
+
+ /*** Misc. methods ***/
+
+ /* Open the given URI in the default application */
+ void showURI(in nsIURI uri);
+ [noscript] void showURIForInput(in ACString uri);
+
+ /* Open path in file manager using org.freedesktop.FileManager1 interface */
+ [noscript] void orgFreedesktopFileManager1ShowItems(in ACString path);
+};
+
+%{C++
+#define NS_GIOSERVICE_CONTRACTID "@mozilla.org/gio-service;1"
+%}
diff --git a/xpcom/system/nsIGSettingsService.idl b/xpcom/system/nsIGSettingsService.idl
new file mode 100644
index 0000000000..26d86a77e0
--- /dev/null
+++ b/xpcom/system/nsIGSettingsService.idl
@@ -0,0 +1,30 @@
+/* -*- 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIArray;
+
+[scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)]
+interface nsIGSettingsCollection : nsISupports
+{
+ void setString(in AUTF8String key, in AUTF8String value);
+ void setBoolean(in AUTF8String key, in boolean value);
+ void setInt(in AUTF8String key, in long value);
+ AUTF8String getString(in AUTF8String key);
+ boolean getBoolean(in AUTF8String key);
+ long getInt(in AUTF8String key);
+ nsIArray getStringList(in AUTF8String key);
+};
+
+[scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)]
+interface nsIGSettingsService : nsISupports
+{
+ nsIGSettingsCollection getCollectionForSchema(in AUTF8String schema);
+};
+
+%{C++
+#define NS_GSETTINGSSERVICE_CONTRACTID "@mozilla.org/gsettings-service;1"
+%}
diff --git a/xpcom/system/nsIGeolocationProvider.idl b/xpcom/system/nsIGeolocationProvider.idl
new file mode 100644
index 0000000000..29044266da
--- /dev/null
+++ b/xpcom/system/nsIGeolocationProvider.idl
@@ -0,0 +1,83 @@
+/* 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/. */
+
+
+
+#include "nsISupports.idl"
+
+interface nsIURI;
+interface nsIDOMWindow;
+interface nsIDOMElement;
+interface nsIDOMGeoPosition;
+interface nsIGeolocationPrompt;
+
+/**
+
+ * Interface provides a way for a geolocation provider to
+ * notify the system that a new location is available.
+ */
+[scriptable, uuid(643dc5e9-b911-4b2c-8d44-603162696baf)]
+interface nsIGeolocationUpdate : nsISupports {
+
+ /**
+ * Notify the geolocation service that a new geolocation
+ * has been discovered.
+ * This must be called on the main thread
+ */
+ void update(in nsIDOMGeoPosition position);
+ /**
+ * Notify the geolocation service of an error.
+ * This must be called on the main thread.
+ * The parameter refers to one of the constants in the
+ * nsIDOMGeoPositionError interface.
+ * Use this to report spurious errors coming from the
+ * provider; for errors occurring inside the methods in
+ * the nsIGeolocationProvider interface, just use the return
+ * value.
+ */
+ void notifyError(in unsigned short error);
+};
+
+
+/**
+ * Interface provides location information to the nsGeolocator
+ * via the nsIDOMGeolocationCallback interface. After
+ * startup is called, any geo location change should call
+ * callback.update().
+ */
+[scriptable, uuid(AC4A133B-9F92-4F7C-B369-D40CB6B17650)]
+interface nsIGeolocationProvider : nsISupports {
+
+ /**
+ * Start up the provider. This is called before any other
+ * method. may be called multiple times.
+ */
+ void startup();
+
+ /**
+ * watch
+ * When a location change is observed, notify the callback.
+ */
+ void watch(in nsIGeolocationUpdate callback);
+
+ /**
+ * shutdown
+ * Shuts down the location device.
+ */
+ void shutdown();
+
+ /**
+ * hint to provide to use any amount of power to provide a better result
+ */
+ void setHighAccuracy(in boolean enable);
+
+};
+
+%{C++
+/*
+ This must be implemented by geolocation providers. It
+ must support nsIGeolocationProvider.
+*/
+#define NS_GEOLOCATION_PROVIDER_CONTRACTID "@mozilla.org/geolocation/provider;1"
+%}
diff --git a/xpcom/system/nsIHapticFeedback.idl b/xpcom/system/nsIHapticFeedback.idl
new file mode 100644
index 0000000000..25d0d8e7bb
--- /dev/null
+++ b/xpcom/system/nsIHapticFeedback.idl
@@ -0,0 +1,22 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* 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/. */
+
+#include "nsISupports.idl"
+
+
+[scriptable, uuid(91917c98-a8f3-4c98-8f10-4afb872f54c7)]
+interface nsIHapticFeedback : nsISupports {
+
+ const long ShortPress = 0;
+ const long LongPress = 1;
+
+ /**
+ * Perform haptic feedback
+ *
+ * @param isLongPress
+ * indicate whether feedback is for a long press (vs. short press)
+ */
+ void performSimpleAction(in long isLongPress);
+};
diff --git a/xpcom/system/nsIPackageKitService.idl b/xpcom/system/nsIPackageKitService.idl
new file mode 100644
index 0000000000..5cd3494a3b
--- /dev/null
+++ b/xpcom/system/nsIPackageKitService.idl
@@ -0,0 +1,46 @@
+/* -*- 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/. */
+
+#include "nsISupports.idl"
+
+interface nsIArray;
+interface nsIObserver;
+
+[scriptable, uuid(89bb04f6-ce2a-11e3-8f4f-60a44c717042)]
+interface nsIPackageKitService : nsISupports
+{
+
+ /* PackageKit installation methods */
+ /* See https://github.com/nekohayo/gnome-packagekit/blob/master/src/org.freedesktop.PackageKit.xml */
+ const unsigned long PK_INSTALL_PACKAGE_NAMES = 0;
+ const unsigned long PK_INSTALL_MIME_TYPES = 1;
+ const unsigned long PK_INSTALL_FONTCONFIG_RESOURCES = 2;
+ const unsigned long PK_INSTALL_GSTREAMER_RESOURCES = 3;
+ const unsigned long PK_INSTALL_METHOD_COUNT = 4;
+
+ /* Ask to install a list of packages via PackageKit
+ * @param packageKitMethod
+ * The PackageKit installation method
+ * @param packageArray
+ * A nonempty array of strings describing the list of packages to
+ * install.
+ * @param An object implementing nsIObserver that will be notified with
+ * a message of topic "packagekit-install". The message data
+ * contains the error returned by PackageKit if the installation
+ * fails and is null otherwise.
+ *
+ * This function may raise an NS_ERROR_INVALID_ARG, NS_ERROR_FAILURE or
+ * NS_ERROR_OUT_OF_MEMORY exception. Otherwise, the observer will be notified
+ * when the operation completes.
+ *
+ */
+ void installPackages(in unsigned long packageKitMethod,
+ in nsIArray packageArray,
+ in nsIObserver observer);
+};
+
+%{C++
+#define NS_PACKAGEKITSERVICE_CONTRACTID "@mozilla.org/packagekit-service;1"
+%}
diff --git a/xpcom/system/nsIPlatformInfo.idl b/xpcom/system/nsIPlatformInfo.idl
new file mode 100644
index 0000000000..fba78b6ecc
--- /dev/null
+++ b/xpcom/system/nsIPlatformInfo.idl
@@ -0,0 +1,19 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+[scriptable, uuid(ab6650cf-0806-4aea-b8f2-40fdae74f1cc)]
+interface nsIPlatformInfo : nsISupports
+{
+ /**
+ * The version of the XULRunner platform.
+ */
+ readonly attribute ACString platformVersion;
+
+ /**
+ * The build ID/date of gecko and the XULRunner platform.
+ */
+ readonly attribute ACString platformBuildID;
+};
diff --git a/xpcom/system/nsIXULAppInfo.idl b/xpcom/system/nsIXULAppInfo.idl
new file mode 100644
index 0000000000..1ea9208a34
--- /dev/null
+++ b/xpcom/system/nsIXULAppInfo.idl
@@ -0,0 +1,53 @@
+/* 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/. */
+
+#include "nsIPlatformInfo.idl"
+
+/**
+ * A scriptable interface to the nsXULAppAPI structure. See nsXULAppAPI.h for
+ * a detailed description of each attribute.
+ */
+
+[scriptable, uuid(ddea4f31-3c5e-4769-ac68-21ab4b3d7845)]
+interface nsIXULAppInfo : nsIPlatformInfo
+{
+ /**
+ * @see nsXREAppData.vendor
+ * @returns an empty string if nsXREAppData.vendor is not set.
+ */
+ readonly attribute ACString vendor;
+
+ /**
+ * @see nsXREAppData.name
+ */
+ readonly attribute ACString name;
+
+ /**
+ * @see nsXREAppData.ID
+ * @returns an empty string if nsXREAppData.ID is not set.
+ */
+ readonly attribute ACString ID;
+
+ /**
+ * The version of the XUL application. It is different than the
+ * version of the XULRunner platform. Be careful about which one you want.
+ *
+ * @see nsXREAppData.version
+ * @returns an empty string if nsXREAppData.version is not set.
+ */
+ readonly attribute ACString version;
+
+ /**
+ * The build ID/date of the application. For xulrunner applications,
+ * this will be different than the build ID of the platform. Be careful
+ * about which one you want.
+ */
+ readonly attribute ACString appBuildID;
+
+ /**
+ * @see nsXREAppData.UAName
+ * @returns an empty string if nsXREAppData.UAName is not set.
+ */
+ readonly attribute ACString UAName;
+};
diff --git a/xpcom/system/nsIXULRuntime.idl b/xpcom/system/nsIXULRuntime.idl
new file mode 100644
index 0000000000..fda0e696fe
--- /dev/null
+++ b/xpcom/system/nsIXULRuntime.idl
@@ -0,0 +1,176 @@
+/* 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/. */
+
+#include "nsISupports.idl"
+
+%{C++
+
+namespace mozilla {
+// Simple C++ getter for nsIXULRuntime::browserTabsRemoteAutostart
+// This getter is a temporary function that checks for special
+// conditions in which e10s support is not great yet, and should
+// therefore be disabled. Bug 1065561 tracks its removal.
+bool BrowserTabsRemoteAutostart();
+}
+
+%}
+
+/**
+ * Provides information about the XUL runtime.
+ * @status UNSTABLE - This interface is not frozen and will probably change in
+ * future releases. If you need this functionality to be
+ * stable/frozen, please contact Benjamin Smedberg.
+ */
+
+[scriptable, uuid(a1b2e167-b748-42bf-ba85-996ec39062b9)]
+interface nsIXULRuntime : nsISupports
+{
+ /**
+ * Whether the application was launched in safe mode.
+ */
+ readonly attribute boolean inSafeMode;
+
+ /**
+ * Whether to write console errors to a log file. If a component
+ * encounters startup errors that might prevent the app from showing
+ * proper UI, it should set this flag to "true".
+ */
+ attribute boolean logConsoleErrors;
+
+ /**
+ * A string tag identifying the current operating system. This is taken
+ * from the OS_TARGET configure variable. It will always be available.
+ */
+ readonly attribute AUTF8String OS;
+
+ /**
+ * A string tag identifying the binary ABI of the current processor and
+ * compiler vtable. This is taken from the TARGET_XPCOM_ABI configure
+ * variable. It may not be available on all platforms, especially
+ * unusual processor or compiler combinations.
+ *
+ * The result takes the form <processor>-<compilerABI>, for example:
+ * x86-msvc
+ * ppc-gcc3
+ *
+ * This value should almost always be used in combination with "OS".
+ *
+ * @throw NS_ERROR_NOT_AVAILABLE if not available.
+ */
+ readonly attribute AUTF8String XPCOMABI;
+
+ /**
+ * A string tag identifying the target widget toolkit in use.
+ * This is taken from the MOZ_WIDGET_TOOLKIT configure variable.
+ */
+ readonly attribute AUTF8String widgetToolkit;
+
+ /**
+ * The legal values of processType.
+ */
+ const unsigned long PROCESS_TYPE_DEFAULT = 0;
+ const unsigned long PROCESS_TYPE_PLUGIN = 1;
+ const unsigned long PROCESS_TYPE_CONTENT = 2;
+ const unsigned long PROCESS_TYPE_IPDLUNITTEST = 3;
+ const unsigned long PROCESS_TYPE_GMPLUGIN = 4;
+ const unsigned long PROCESS_TYPE_GPU = 5;
+
+ /**
+ * The type of the caller's process. Returns one of the values above.
+ */
+ readonly attribute unsigned long processType;
+
+ /**
+ * The system process ID of the caller's process.
+ */
+ readonly attribute unsigned long processID;
+
+ /**
+ * A globally unique and non-recycled ID of the caller's process.
+ */
+ readonly attribute uint64_t uniqueProcessID;
+
+ /**
+ * If true, browser tabs may be opened by default in a different process
+ * from the main browser UI.
+ */
+ readonly attribute boolean browserTabsRemoteAutostart;
+
+ /**
+ * A numeric value indicating whether multiprocess might be blocked.
+ * Possible values can be found at nsAppRunner.cpp. A value of 0
+ * represents not blocking.
+ */
+ readonly attribute unsigned long multiprocessBlockPolicy;
+
+ /**
+ * If true, the accessibility service is running.
+ */
+ readonly attribute boolean accessibilityEnabled;
+
+ /**
+ * Indicates whether the current Firefox build is 64-bit.
+ */
+ readonly attribute boolean is64Bit;
+
+ /**
+ * Signal the apprunner to invalidate caches on the next restart.
+ * This will cause components to be autoregistered and all
+ * fastload data to be re-created.
+ */
+ void invalidateCachesOnRestart();
+
+ /**
+ * Starts a child process. This method is intented to pre-start a
+ * content child process so that when it is actually needed, it is
+ * ready to go.
+ *
+ * @throw NS_ERROR_NOT_AVAILABLE if not available.
+ */
+ void ensureContentProcess();
+
+ /**
+ * Modification time of the profile lock before the profile was locked on
+ * this startup. Used to know the last time the profile was used and not
+ * closed cleanly. This is set to 0 if there was no existing profile lock.
+ */
+ readonly attribute PRTime replacedLockTime;
+
+ /**
+ * Local ID of the minidump generated when the process crashed
+ * on the previous run. Can be passed directly to CrashSubmit.submit.
+ */
+ readonly attribute DOMString lastRunCrashID;
+
+ /**
+ * True if this is RELEASE_OR_BETA.
+ */
+ readonly attribute boolean isReleaseOrBeta;
+
+ /**
+ * True if this build uses official branding (MOZ_OFFICIAL_BRANDING).
+ */
+ readonly attribute boolean isOfficialBranding;
+
+ /**
+ * The default update channel (MOZ_UPDATE_CHANNEL).
+ */
+ readonly attribute AUTF8String defaultUpdateChannel;
+
+ /**
+ * The distribution ID for this build (MOZ_DISTRIBUTION_ID).
+ */
+ readonly attribute AUTF8String distributionID;
+
+ /**
+ * True if this is an official build (MOZILLA_OFFICIAL).
+ */
+ readonly attribute boolean isOfficial;
+
+ /**
+ * True if Windows DLL blocklist initialized correctly. This is
+ * primarily for automated testing purposes.
+ */
+ readonly attribute boolean windowsDLLBlocklistStatus;
+};