summaryrefslogtreecommitdiffstats
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/modules/moz.build3
-rw-r--r--toolkit/modules/secondscreen/PresentationApp.jsm190
-rw-r--r--toolkit/modules/secondscreen/RokuApp.jsm230
-rw-r--r--toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm432
-rw-r--r--toolkit/themes/shared/mozapps.inc.mn9
-rw-r--r--toolkit/themes/shared/webextensions/alerticon-error.svg6
-rw-r--r--toolkit/themes/shared/webextensions/alerticon-info-negative.svg6
-rw-r--r--toolkit/themes/shared/webextensions/alerticon-info-positive.svg6
-rw-r--r--toolkit/themes/shared/webextensions/alerticon-warning.svg6
-rw-r--r--toolkit/themes/shared/webextensions/extensionGeneric.svg12
-rw-r--r--toolkit/themes/shared/webextensions/extensions.inc.css1082
-rw-r--r--toolkit/themes/shared/webextensions/navigation.pngbin663 -> 0 bytes
-rw-r--r--toolkit/themes/shared/webextensions/newaddon.inc.css114
-rw-r--r--toolkit/themes/shared/webextensions/utilities.svg30
14 files changed, 0 insertions, 2126 deletions
diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build
index 90546267e..a6423913d 100644
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -75,9 +75,6 @@ EXTRA_JS_MODULES += [
'RemoteSecurityUI.jsm',
'RemoteWebProgress.jsm',
'ResponsivenessMonitor.jsm',
- 'secondscreen/PresentationApp.jsm',
- 'secondscreen/RokuApp.jsm',
- 'secondscreen/SimpleServiceDiscovery.jsm',
'SelectContentHelper.jsm',
'SelectParentHelper.jsm',
'ServiceRequest.jsm',
diff --git a/toolkit/modules/secondscreen/PresentationApp.jsm b/toolkit/modules/secondscreen/PresentationApp.jsm
deleted file mode 100644
index b7d8e05a8..000000000
--- a/toolkit/modules/secondscreen/PresentationApp.jsm
+++ /dev/null
@@ -1,190 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 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/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["PresentationApp"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyGetter(this, "sysInfo", () => {
- return Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
-});
-
-const DEBUG = false;
-
-const STATE_UNINIT = "uninitialized" // RemoteMedia status
-const STATE_STARTED = "started"; // RemoteMedia status
-const STATE_PAUSED = "paused"; // RemoteMedia status
-const STATE_SHUTDOWN = "shutdown"; // RemoteMedia status
-
-function debug(msg) {
- Services.console.logStringMessage("PresentationApp: " + msg);
-}
-
-// PresentationApp is a wrapper for interacting with a Presentation Receiver Device.
-function PresentationApp(service, request) {
- this.service = service;
- this.request = request;
-}
-
-PresentationApp.prototype = {
- start: function start(callback) {
- this.request.startWithDevice(this.service.uuid)
- .then((session) => {
- this._session = session;
- if (callback) {
- session.addEventListener('connect', () => {
- callback(true);
- });
- }
- }, () => {
- if (callback) {
- callback(false);
- }
- });
- },
-
- stop: function stop(callback) {
- if (this._session && this._session.state === "connected") {
- this._session.terminate();
- }
-
- delete this._session;
-
- if (callback) {
- callback(true);
- }
- },
-
- remoteMedia: function remoteMedia(callback, listener) {
- if (callback) {
- if (!this._session) {
- callback();
- return;
- }
-
- callback(new RemoteMedia(this._session, listener));
- }
- }
-}
-
-/* RemoteMedia provides a wrapper for using Presentation API to control Firefox TV app.
- * The server implementation must be built into the Firefox TV receiver app.
- * see https://github.com/mozilla-b2g/gaia/tree/master/tv_apps/fling-player
- */
-function RemoteMedia(session, listener) {
- this._session = session ;
- this._listener = listener;
- this._status = STATE_UNINIT;
-
- this._session.addEventListener("message", this);
- this._session.addEventListener("terminate", this);
-
- if (this._listener && "onRemoteMediaStart" in this._listener) {
- Services.tm.mainThread.dispatch((function() {
- this._listener.onRemoteMediaStart(this);
- }).bind(this), Ci.nsIThread.DISPATCH_NORMAL);
- }
-}
-
-RemoteMedia.prototype = {
- _seq: 0,
-
- handleEvent: function(e) {
- switch (e.type) {
- case "message":
- this._onmessage(e);
- break;
- case "terminate":
- this._onterminate(e);
- break;
- }
- },
-
- _onmessage: function(e) {
- DEBUG && debug("onmessage: " + e.data);
- if (this.status === STATE_SHUTDOWN) {
- return;
- }
-
- if (e.data.indexOf("stopped") > -1) {
- if (this.status !== STATE_PAUSED) {
- this._status = STATE_PAUSED;
- if (this._listener && "onRemoteMediaStatus" in this._listener) {
- this._listener.onRemoteMediaStatus(this);
- }
- }
- } else if (e.data.indexOf("playing") > -1) {
- if (this.status !== STATE_STARTED) {
- this._status = STATE_STARTED;
- if (this._listener && "onRemoteMediaStatus" in this._listener) {
- this._listener.onRemoteMediaStatus(this);
- }
- }
- }
- },
-
- _onterminate: function(e) {
- DEBUG && debug("onterminate: " + this._session.state);
- this._status = STATE_SHUTDOWN;
- if (this._listener && "onRemoteMediaStop" in this._listener) {
- this._listener.onRemoteMediaStop(this);
- }
- },
-
- _sendCommand: function(command, data) {
- let msg = {
- 'type': command,
- 'seq': ++this._seq
- };
-
- if (data) {
- for (var k in data) {
- msg[k] = data[k];
- }
- }
-
- let raw = JSON.stringify(msg);
- DEBUG && debug("send command: " + raw);
-
- this._session.send(raw);
- },
-
- shutdown: function shutdown() {
- DEBUG && debug("RemoteMedia - shutdown");
- this._sendCommand("close");
- },
-
- play: function play() {
- DEBUG && debug("RemoteMedia - play");
- this._sendCommand("play");
- },
-
- pause: function pause() {
- DEBUG && debug("RemoteMedia - pause");
- this._sendCommand("pause");
- },
-
- load: function load(data) {
- DEBUG && debug("RemoteMedia - load: " + data);
- this._sendCommand("load", { "url": data.source });
-
- let deviceName;
- if (Services.appinfo.widgetToolkit == "android") {
- deviceName = sysInfo.get("device");
- } else {
- deviceName = sysInfo.get("host");
- }
- this._sendCommand("device-info", { "displayName": deviceName });
- },
-
- get status() {
- return this._status;
- }
-}
diff --git a/toolkit/modules/secondscreen/RokuApp.jsm b/toolkit/modules/secondscreen/RokuApp.jsm
deleted file mode 100644
index b37a688cd..000000000
--- a/toolkit/modules/secondscreen/RokuApp.jsm
+++ /dev/null
@@ -1,230 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 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/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["RokuApp"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/AppConstants.jsm");
-
-function log(msg) {
- // Services.console.logStringMessage(msg);
-}
-
-const PROTOCOL_VERSION = 1;
-
-/* RokuApp is a wrapper for interacting with a Roku channel.
- * The basic interactions all use a REST API.
- * spec: http://sdkdocs.roku.com/display/sdkdoc/External+Control+Guide
- */
-function RokuApp(service) {
- this.service = service;
- this.resourceURL = this.service.location;
- this.app = AppConstants.RELEASE_OR_BETA ? "Firefox" : "Firefox Nightly";
- this.mediaAppID = -1;
-}
-
-RokuApp.prototype = {
- status: function status(callback) {
- // We have no way to know if the app is running, so just return "unknown"
- // but we use this call to fetch the mediaAppID for the given app name
- let url = this.resourceURL + "query/apps";
- let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
- xhr.open("GET", url, true);
- xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
- xhr.overrideMimeType("text/xml");
-
- xhr.addEventListener("load", (function() {
- if (xhr.status == 200) {
- let doc = xhr.responseXML;
- let apps = doc.querySelectorAll("app");
- for (let app of apps) {
- if (app.textContent == this.app) {
- this.mediaAppID = app.id;
- }
- }
- }
-
- // Since ECP has no way of telling us if an app is running, we always return "unknown"
- if (callback) {
- callback({ state: "unknown" });
- }
- }).bind(this), false);
-
- xhr.addEventListener("error", (function() {
- if (callback) {
- callback({ state: "unknown" });
- }
- }).bind(this), false);
-
- xhr.send(null);
- },
-
- start: function start(callback) {
- // We need to make sure we have cached the mediaAppID
- if (this.mediaAppID == -1) {
- this.status(function() {
- // If we found the mediaAppID, use it to make a new start call
- if (this.mediaAppID != -1) {
- this.start(callback);
- } else {
- // We failed to start the app, so let the caller know
- callback(false);
- }
- }.bind(this));
- return;
- }
-
- // Start a given app with any extra query data. Each app uses it's own data scheme.
- // NOTE: Roku will also pass "source=external-control" as a param
- let url = this.resourceURL + "launch/" + this.mediaAppID + "?version=" + parseInt(PROTOCOL_VERSION);
- let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
- xhr.open("POST", url, true);
- xhr.overrideMimeType("text/plain");
-
- xhr.addEventListener("load", (function() {
- if (callback) {
- callback(xhr.status === 200);
- }
- }).bind(this), false);
-
- xhr.addEventListener("error", (function() {
- if (callback) {
- callback(false);
- }
- }).bind(this), false);
-
- xhr.send(null);
- },
-
- stop: function stop(callback) {
- // Roku doesn't seem to support stopping an app, so let's just go back to
- // the Home screen
- let url = this.resourceURL + "keypress/Home";
- let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
- xhr.open("POST", url, true);
- xhr.overrideMimeType("text/plain");
-
- xhr.addEventListener("load", (function() {
- if (callback) {
- callback(xhr.status === 200);
- }
- }).bind(this), false);
-
- xhr.addEventListener("error", (function() {
- if (callback) {
- callback(false);
- }
- }).bind(this), false);
-
- xhr.send(null);
- },
-
- remoteMedia: function remoteMedia(callback, listener) {
- if (this.mediaAppID != -1) {
- if (callback) {
- callback(new RemoteMedia(this.resourceURL, listener));
- }
- } else if (callback) {
- callback();
- }
- }
-}
-
-/* RemoteMedia provides a wrapper for using TCP socket to control Roku apps.
- * The server implementation must be built into the Roku receiver app.
- */
-function RemoteMedia(url, listener) {
- this._url = url;
- this._listener = listener;
- this._status = "uninitialized";
-
- let serverURI = Services.io.newURI(this._url, null, null);
- this._socket = Cc["@mozilla.org/network/socket-transport-service;1"].getService(Ci.nsISocketTransportService).createTransport(null, 0, serverURI.host, 9191, null);
- this._outputStream = this._socket.openOutputStream(0, 0, 0);
-
- this._scriptableStream = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(Ci.nsIScriptableInputStream);
-
- this._inputStream = this._socket.openInputStream(0, 0, 0);
- this._pump = Cc["@mozilla.org/network/input-stream-pump;1"].createInstance(Ci.nsIInputStreamPump);
- this._pump.init(this._inputStream, -1, -1, 0, 0, true);
- this._pump.asyncRead(this, null);
-}
-
-RemoteMedia.prototype = {
- onStartRequest: function(request, context) {
- },
-
- onDataAvailable: function(request, context, stream, offset, count) {
- this._scriptableStream.init(stream);
- let data = this._scriptableStream.read(count);
- if (!data) {
- return;
- }
-
- let msg = JSON.parse(data);
- if (this._status === msg._s) {
- return;
- }
-
- this._status = msg._s;
-
- if (this._listener) {
- // Check to see if we are getting the initial "connected" message
- if (this._status == "connected" && "onRemoteMediaStart" in this._listener) {
- this._listener.onRemoteMediaStart(this);
- }
-
- if ("onRemoteMediaStatus" in this._listener) {
- this._listener.onRemoteMediaStatus(this);
- }
- }
- },
-
- onStopRequest: function(request, context, result) {
- if (this._listener && "onRemoteMediaStop" in this._listener)
- this._listener.onRemoteMediaStop(this);
- },
-
- _sendMsg: function _sendMsg(data) {
- if (!data)
- return;
-
- // Add the protocol version
- data["_v"] = PROTOCOL_VERSION;
-
- let raw = JSON.stringify(data);
- this._outputStream.write(raw, raw.length);
- },
-
- shutdown: function shutdown() {
- this._outputStream.close();
- this._inputStream.close();
- },
-
- get active() {
- return (this._socket && this._socket.isAlive());
- },
-
- play: function play() {
- // TODO: add position support
- this._sendMsg({ type: "PLAY" });
- },
-
- pause: function pause() {
- this._sendMsg({ type: "STOP" });
- },
-
- load: function load(data) {
- this._sendMsg({ type: "LOAD", title: data.title, source: data.source, poster: data.poster });
- },
-
- get status() {
- return this._status;
- }
-}
diff --git a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm b/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
deleted file mode 100644
index 4abc93ad1..000000000
--- a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
+++ /dev/null
@@ -1,432 +0,0 @@
-// -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
-/* 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/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["SimpleServiceDiscovery"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Timer.jsm");
-
-var log = Cu.reportError;
-
-XPCOMUtils.defineLazyGetter(this, "converter", function () {
- let conv = Cc["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Ci.nsIScriptableUnicodeConverter);
- conv.charset = "utf8";
- return conv;
-});
-
-// Spec information:
-// https://tools.ietf.org/html/draft-cai-ssdp-v1-03
-// http://www.dial-multiscreen.org/dial-protocol-specification
-const SSDP_PORT = 1900;
-const SSDP_ADDRESS = "239.255.255.250";
-
-const SSDP_DISCOVER_PACKET =
- "M-SEARCH * HTTP/1.1\r\n" +
- "HOST: " + SSDP_ADDRESS + ":" + SSDP_PORT + "\r\n" +
- "MAN: \"ssdp:discover\"\r\n" +
- "MX: 2\r\n" +
- "ST: %SEARCH_TARGET%\r\n\r\n";
-
-const SSDP_DISCOVER_ATTEMPTS = 3;
-const SSDP_DISCOVER_DELAY = 500;
-const SSDP_DISCOVER_TIMEOUT_MULTIPLIER = 2;
-const SSDP_TRANSMISSION_INTERVAL = 1000;
-
-const EVENT_SERVICE_FOUND = "ssdp-service-found";
-const EVENT_SERVICE_LOST = "ssdp-service-lost";
-
-/*
- * SimpleServiceDiscovery manages any discovered SSDP services. It uses a UDP
- * broadcast to locate available services on the local network.
- */
-var SimpleServiceDiscovery = {
- get EVENT_SERVICE_FOUND() { return EVENT_SERVICE_FOUND; },
- get EVENT_SERVICE_LOST() { return EVENT_SERVICE_LOST; },
-
- _devices: new Map(),
- _services: new Map(),
- _searchSocket: null,
- _searchInterval: 0,
- _searchTimestamp: 0,
- _searchTimeout: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
- _searchRepeat: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
- _discoveryMethods: [],
-
- _forceTrailingSlash: function(aURL) {
- // Cleanup the URL to make it consistent across devices
- try {
- aURL = Services.io.newURI(aURL, null, null).spec;
- } catch (e) {}
- return aURL;
- },
-
- // nsIUDPSocketListener implementation
- onPacketReceived: function(aSocket, aMessage) {
- // Listen for responses from specific devices. There could be more than one
- // available.
- let response = aMessage.data.split("\n");
- let service = {};
- response.forEach(function(row) {
- let name = row.toUpperCase();
- if (name.startsWith("LOCATION")) {
- service.location = row.substr(10).trim();
- } else if (name.startsWith("ST")) {
- service.target = row.substr(4).trim();
- }
- }.bind(this));
-
- if (service.location && service.target) {
- service.location = this._forceTrailingSlash(service.location);
-
- // When we find a valid response, package up the service information
- // and pass it on.
- try {
- this._processService(service);
- } catch (e) {}
- }
- },
-
- onStopListening: function(aSocket, aStatus) {
- // This is fired when the socket is closed expectedly or unexpectedly.
- // nsITimer.cancel() is a no-op if the timer is not active.
- this._searchTimeout.cancel();
- this._searchSocket = null;
- },
-
- // Start a search. Make it continuous by passing an interval (in milliseconds).
- // This will stop a current search loop because the timer resets itself.
- // Returns the existing search interval.
- search: function search(aInterval) {
- let existingSearchInterval = this._searchInterval;
- if (aInterval > 0) {
- this._searchInterval = aInterval || 0;
- this._searchRepeat.initWithCallback(this._search.bind(this), this._searchInterval, Ci.nsITimer.TYPE_REPEATING_SLACK);
- }
- this._search();
- return existingSearchInterval;
- },
-
- // Stop the current continuous search
- stopSearch: function stopSearch() {
- this._searchRepeat.cancel();
- },
-
- _usingLAN: function() {
- let network = Cc["@mozilla.org/network/network-link-service;1"].getService(Ci.nsINetworkLinkService);
- return (network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_WIFI ||
- network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_ETHERNET ||
- network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_UNKNOWN);
- },
-
- _search: function _search() {
- // If a search is already active, shut it down.
- this._searchShutdown();
-
- // We only search if on local network
- if (!this._usingLAN()) {
- return;
- }
-
- // Update the timestamp so we can use it to clean out stale services the
- // next time we search.
- this._searchTimestamp = Date.now();
-
- // Look for any fixed IP devices. Some routers might be configured to block
- // UDP broadcasts, so this is a way to skip discovery.
- this._searchFixedDevices();
-
- // Look for any devices via registered external discovery mechanism.
- this._startExternalDiscovery();
-
- // Perform a UDP broadcast to search for SSDP devices
- let socket = Cc["@mozilla.org/network/udp-socket;1"].createInstance(Ci.nsIUDPSocket);
- try {
- socket.init(SSDP_PORT, false, Services.scriptSecurityManager.getSystemPrincipal());
- socket.joinMulticast(SSDP_ADDRESS);
- socket.asyncListen(this);
- } catch (e) {
- // We were unable to create the broadcast socket. Just return, but don't
- // kill the interval timer. This might work next time.
- log("failed to start socket: " + e);
- return;
- }
-
- // Make the timeout SSDP_DISCOVER_TIMEOUT_MULTIPLIER times as long as the time needed to send out the discovery packets.
- const SSDP_DISCOVER_TIMEOUT = this._devices.size * SSDP_DISCOVER_ATTEMPTS * SSDP_TRANSMISSION_INTERVAL * SSDP_DISCOVER_TIMEOUT_MULTIPLIER;
- this._searchSocket = socket;
- this._searchTimeout.initWithCallback(this._searchShutdown.bind(this), SSDP_DISCOVER_TIMEOUT, Ci.nsITimer.TYPE_ONE_SHOT);
-
- let data = SSDP_DISCOVER_PACKET;
-
- // Send discovery packets out at 1 per SSDP_TRANSMISSION_INTERVAL and send each SSDP_DISCOVER_ATTEMPTS times
- // to allow for packet loss on noisy networks.
- let timeout = SSDP_DISCOVER_DELAY;
- for (let attempts = 0; attempts < SSDP_DISCOVER_ATTEMPTS; attempts++) {
- for (let [key, device] of this._devices) {
- let target = device.target;
- setTimeout(function() {
- let msgData = data.replace("%SEARCH_TARGET%", target);
- try {
- let msgRaw = converter.convertToByteArray(msgData);
- socket.send(SSDP_ADDRESS, SSDP_PORT, msgRaw, msgRaw.length);
- } catch (e) {
- log("failed to convert to byte array: " + e);
- }
- }, timeout);
- timeout += SSDP_TRANSMISSION_INTERVAL;
- }
- }
- },
-
- _searchFixedDevices: function _searchFixedDevices() {
- let fixedDevices = Services.prefs.getCharPref("browser.casting.fixedDevices", "");
-
- if (!fixedDevices) {
- return;
- }
-
- fixedDevices = JSON.parse(fixedDevices);
- for (let fixedDevice of fixedDevices) {
- // Verify we have the right data
- if (!("location" in fixedDevice) || !("target" in fixedDevice)) {
- continue;
- }
-
- fixedDevice.location = this._forceTrailingSlash(fixedDevice.location);
-
- let service = {
- location: fixedDevice.location,
- target: fixedDevice.target
- };
-
- // We don't assume the fixed target is ready. We still need to ping it.
- try {
- this._processService(service);
- } catch (e) {}
- }
- },
-
- // Called when the search timeout is hit. We use it to cleanup the socket and
- // perform some post-processing on the services list.
- _searchShutdown: function _searchShutdown() {
- if (this._searchSocket) {
- // This will call onStopListening.
- this._searchSocket.close();
-
- // Clean out any stale services
- for (let [key, service] of this._services) {
- if (service.lastPing != this._searchTimestamp) {
- this.removeService(service.uuid);
- }
- }
- }
-
- this._stopExternalDiscovery();
- },
-
- getSupportedExtensions: function() {
- let extensions = [];
- this.services.forEach(function(service) {
- extensions = extensions.concat(service.extensions);
- }, this);
- return extensions.filter(function(extension, pos) {
- return extensions.indexOf(extension) == pos;
- });
- },
-
- getSupportedMimeTypes: function() {
- let types = [];
- this.services.forEach(function(service) {
- types = types.concat(service.types);
- }, this);
- return types.filter(function(type, pos) {
- return types.indexOf(type) == pos;
- });
- },
-
- registerDevice: function registerDevice(aDevice) {
- // We must have "id", "target" and "factory" defined
- if (!("id" in aDevice) || !("target" in aDevice) || !("factory" in aDevice)) {
- // Fatal for registration
- throw "Registration requires an id, a target and a location";
- }
-
- // Only add if we don't already know about this device
- if (!this._devices.has(aDevice.id)) {
- this._devices.set(aDevice.id, aDevice);
- } else {
- log("device was already registered: " + aDevice.id);
- }
- },
-
- unregisterDevice: function unregisterDevice(aDevice) {
- // We must have "id", "target" and "factory" defined
- if (!("id" in aDevice) || !("target" in aDevice) || !("factory" in aDevice)) {
- return;
- }
-
- // Only remove if we know about this device
- if (this._devices.has(aDevice.id)) {
- this._devices.delete(aDevice.id);
- } else {
- log("device was not registered: " + aDevice.id);
- }
- },
-
- findAppForService: function findAppForService(aService) {
- if (!aService || !aService.deviceID) {
- return null;
- }
-
- // Find the registration for the device
- if (this._devices.has(aService.deviceID)) {
- return this._devices.get(aService.deviceID).factory(aService);
- }
- return null;
- },
-
- findServiceForID: function findServiceForID(aUUID) {
- if (this._services.has(aUUID)) {
- return this._services.get(aUUID);
- }
- return null;
- },
-
- // Returns an array copy of the active services
- get services() {
- let array = [];
- for (let [key, service] of this._services) {
- let target = this._devices.get(service.deviceID);
- service.extensions = target.extensions;
- service.types = target.types;
- array.push(service);
- }
- return array;
- },
-
- // Returns false if the service does not match the device's filters
- _filterService: function _filterService(aService) {
- // Loop over all the devices, looking for one that matches the service
- for (let [key, device] of this._devices) {
- // First level of match is on the target itself
- if (device.target != aService.target) {
- continue;
- }
-
- // If we have no filter, everything passes
- if (!("filters" in device)) {
- aService.deviceID = device.id;
- return true;
- }
-
- // If all the filters pass, we have a match
- let failed = false;
- let filters = device.filters;
- for (let filter in filters) {
- if (filter in aService && aService[filter] != filters[filter]) {
- failed = true;
- }
- }
-
- // We found a match, so link the service to the device
- if (!failed) {
- aService.deviceID = device.id;
- return true;
- }
- }
-
- // We didn't find any matches
- return false;
- },
-
- _processService: function _processService(aService) {
- // Use the REST api to request more information about this service
- let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
- xhr.open("GET", aService.location, true);
- xhr.channel.loadFlags |= Ci.nsIRequest.INHIBIT_CACHING;
- xhr.overrideMimeType("text/xml");
-
- xhr.addEventListener("load", (function() {
- if (xhr.status == 200) {
- let doc = xhr.responseXML;
- aService.appsURL = xhr.getResponseHeader("Application-URL");
- if (aService.appsURL && !aService.appsURL.endsWith("/"))
- aService.appsURL += "/";
- aService.friendlyName = doc.querySelector("friendlyName").textContent;
- aService.uuid = doc.querySelector("UDN").textContent;
- aService.manufacturer = doc.querySelector("manufacturer").textContent;
- aService.modelName = doc.querySelector("modelName").textContent;
-
- this.addService(aService);
- }
- }).bind(this), false);
-
- xhr.send(null);
- },
-
- // Add a service to the WeakMap, even if one already exists with this id.
- // Returns true if this succeeded or false if it failed
- _addService: function(service) {
- // Filter out services that do not match the device filter
- if (!this._filterService(service)) {
- return false;
- }
-
- let device = this._devices.get(service.target);
- if (device && device.mirror) {
- service.mirror = true;
- }
- this._services.set(service.uuid, service);
- return true;
- },
-
- addService: function(service) {
- // Only add and notify if we don't already know about this service
- if (!this._services.has(service.uuid)) {
- if (!this._addService(service)) {
- return;
- }
- Services.obs.notifyObservers(null, EVENT_SERVICE_FOUND, service.uuid);
- }
-
- // Make sure we remember this service is not stale
- this._services.get(service.uuid).lastPing = this._searchTimestamp;
- },
-
- removeService: function(uuid) {
- Services.obs.notifyObservers(null, EVENT_SERVICE_LOST, uuid);
- this._services.delete(uuid);
- },
-
- updateService: function(service) {
- if (!this._addService(service)) {
- return;
- }
-
- // Make sure we remember this service is not stale
- this._services.get(service.uuid).lastPing = this._searchTimestamp;
- },
-
- addExternalDiscovery: function(discovery) {
- this._discoveryMethods.push(discovery);
- },
-
- _startExternalDiscovery: function() {
- for (let discovery of this._discoveryMethods) {
- discovery.startDiscovery();
- }
- },
-
- _stopExternalDiscovery: function() {
- for (let discovery of this._discoveryMethods) {
- discovery.stopDiscovery();
- }
- },
-}
diff --git a/toolkit/themes/shared/mozapps.inc.mn b/toolkit/themes/shared/mozapps.inc.mn
index fadd203b0..4a6b87cc8 100644
--- a/toolkit/themes/shared/mozapps.inc.mn
+++ b/toolkit/themes/shared/mozapps.inc.mn
@@ -7,15 +7,6 @@
# be specified once. As a result, the source file paths are relative
# to the location of the actual manifest.
-#ifdef MOZ_WEBEXTENSIONS
- skin/classic/mozapps/extensions/extensionGeneric.svg (../../shared/webextensions/extensionGeneric.svg)
- skin/classic/mozapps/extensions/utilities.svg (../../shared/webextensions/utilities.svg)
- skin/classic/mozapps/extensions/navigation.png (../../shared/webextensions/navigation.png)
- skin/classic/mozapps/extensions/alerticon-warning.svg (../../shared/webextensions/alerticon-warning.svg)
- skin/classic/mozapps/extensions/alerticon-error.svg (../../shared/webextensions/alerticon-error.svg)
- skin/classic/mozapps/extensions/alerticon-info-positive.svg (../../shared/webextensions/alerticon-info-positive.svg)
- skin/classic/mozapps/extensions/alerticon-info-negative.svg (../../shared/webextensions/alerticon-info-negative.svg)
-#endif
skin/classic/mozapps/formautofill/requestAutocomplete.css (../../shared/formautofill/requestAutocomplete.css)
skin/classic/mozapps/plugins/pluginProblem.css (../../shared/plugins/pluginProblem.css)
skin/classic/mozapps/aboutNetworking.css (../../shared/aboutNetworking.css)
diff --git a/toolkit/themes/shared/webextensions/alerticon-error.svg b/toolkit/themes/shared/webextensions/alerticon-error.svg
deleted file mode 100644
index cb883e16e..000000000
--- a/toolkit/themes/shared/webextensions/alerticon-error.svg
+++ /dev/null
@@ -1,6 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
- <path fill="#e62117" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
-</svg>
diff --git a/toolkit/themes/shared/webextensions/alerticon-info-negative.svg b/toolkit/themes/shared/webextensions/alerticon-info-negative.svg
deleted file mode 100644
index 733f8571a..000000000
--- a/toolkit/themes/shared/webextensions/alerticon-info-negative.svg
+++ /dev/null
@@ -1,6 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
- <path fill="#828282" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
-</svg>
diff --git a/toolkit/themes/shared/webextensions/alerticon-info-positive.svg b/toolkit/themes/shared/webextensions/alerticon-info-positive.svg
deleted file mode 100644
index 031190bce..000000000
--- a/toolkit/themes/shared/webextensions/alerticon-info-positive.svg
+++ /dev/null
@@ -1,6 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
- <path fill="#62c44e" d="M18,4.796c0,0.31-0.109,0.573-0.325,0.79l-8.408,8.406l-1.579,1.58c-0.217,0.217-0.48,0.325-0.789,0.325c-0.31,0-0.573-0.108-0.79-0.325l-1.579-1.58L0.325,9.79C0.108,9.573,0,9.31,0,9s0.108-0.573,0.325-0.79l1.58-1.579c0.216-0.217,0.479-0.325,0.789-0.325s0.573,0.108,0.79,0.325l3.414,3.426l7.617-7.63c0.217-0.216,0.48-0.325,0.79-0.325c0.309,0,0.572,0.109,0.789,0.325l1.58,1.58C17.891,4.224,18,4.487,18,4.796z"/>
-</svg>
diff --git a/toolkit/themes/shared/webextensions/alerticon-warning.svg b/toolkit/themes/shared/webextensions/alerticon-warning.svg
deleted file mode 100644
index 2b403220e..000000000
--- a/toolkit/themes/shared/webextensions/alerticon-warning.svg
+++ /dev/null
@@ -1,6 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 18 18">
- <path fill="#f0cd2f" d="M10.124,1.324l7.705,14.127c0.234,0.421,0.228,0.843-0.019,1.264c-0.114,0.193-0.271,0.347-0.467,0.461c-0.198,0.114-0.41,0.171-0.638,0.171H1.294c-0.228,0-0.44-0.057-0.636-0.171c-0.198-0.114-0.353-0.268-0.467-0.461c-0.247-0.421-0.254-0.843-0.02-1.264L7.876,1.324C7.99,1.117,8.147,0.953,8.348,0.833C8.548,0.712,8.766,0.652,9,0.652c0.234,0,0.451,0.06,0.652,0.181C9.853,0.953,10.009,1.117,10.124,1.324z M10.264,10.695l0.181-4.605c0-0.08-0.034-0.143-0.1-0.191c-0.087-0.073-0.168-0.11-0.241-0.11H7.896c-0.073,0-0.154,0.037-0.241,0.11c-0.067,0.048-0.1,0.118-0.1,0.211l0.17,4.586c0,0.067,0.034,0.122,0.1,0.165c0.067,0.044,0.147,0.065,0.241,0.065h1.856c0.094,0,0.172-0.021,0.236-0.065C10.222,10.818,10.258,10.762,10.264,10.695z M10.284,14.448v-1.907c0-0.094-0.031-0.172-0.095-0.236c-0.064-0.064-0.139-0.095-0.225-0.095H8.036c-0.087,0-0.162,0.031-0.225,0.095c-0.064,0.064-0.095,0.142-0.095,0.236v1.907c0,0.094,0.031,0.173,0.095,0.236c0.064,0.064,0.138,0.095,0.225,0.095h1.927c0.086,0,0.162-0.031,0.225-0.095C10.252,14.621,10.284,14.542,10.284,14.448z"/>
-</svg>
diff --git a/toolkit/themes/shared/webextensions/extensionGeneric.svg b/toolkit/themes/shared/webextensions/extensionGeneric.svg
deleted file mode 100644
index 28c2f7ba3..000000000
--- a/toolkit/themes/shared/webextensions/extensionGeneric.svg
+++ /dev/null
@@ -1,12 +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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 64 64">
- <defs>
- <linearGradient id="gradient-linear-puzzle-piece" x1="0%" y1="0%" x2="0%" y2="100%">
- <stop offset="0%" stop-color="#66cc52" stop-opacity="1"/>
- <stop offset="100%" stop-color="#60bf4c" stop-opacity="1"/>
- </linearGradient>
- </defs>
- <path fill="url('#gradient-linear-puzzle-piece')" d="M42,62c2.2,0,4-1.8,4-4l0-14.2c0,0,0.4-3.7,2.8-3.7c2.4,0,2.2,3.9,6.7,3.9c2.3,0,6.2-1.2,6.2-8.2 c0-7-3.9-7.9-6.2-7.9c-4.5,0-4.3,3.7-6.7,3.7c-2.4,0-2.8-3.8-2.8-3.8V22c0-2.2-1.8-4-4-4H31.5c0,0-3.4-0.6-3.4-3 c0-2.4,3.8-2.6,3.8-7.1c0-2.3-1.3-5.9-8.3-5.9s-8,3.6-8,5.9c0,4.5,3.4,4.7,3.4,7.1c0,2.4-3.4,3-3.4,3H6c-2.2,0-4,1.8-4,4l0,7.8 c0,0-0.4,6,4.4,6c3.1,0,3.2-4.1,7.3-4.1c2,0,4,1.9,4,6c0,4.2-2,6.3-4,6.3c-4,0-4.2-4.1-7.3-4.1c-4.8,0-4.4,5.8-4.4,5.8L2,58 c0,2.2,1.8,4,4,4H19c0,0,6.3,0.4,6.3-4.4c0-3.1-4-3.6-4-7.7c0-2,2.2-4.5,6.4-4.5c4.2,0,6.6,2.5,6.6,4.5c0,4-3.9,4.6-3.9,7.7 c0,4.9,6.3,4.4,6.3,4.4H42z"/>
-</svg>
diff --git a/toolkit/themes/shared/webextensions/extensions.inc.css b/toolkit/themes/shared/webextensions/extensions.inc.css
deleted file mode 100644
index c4523bbe6..000000000
--- a/toolkit/themes/shared/webextensions/extensions.inc.css
+++ /dev/null
@@ -1,1082 +0,0 @@
-%if 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/. */
-%endif
-@import url("chrome://global/skin/in-content/common.css");
-
-.main-content {
- padding: 0;
-}
-
-#nav-header {
- min-height: 39px;
- background-color: #424f5a;
-}
-
-.view-pane > .list > scrollbox {
- padding-right: 48px;
- padding-left: 48px;
-}
-
-
-/*** global warnings ***/
-
-.global-warning-container {
- overflow-x: hidden;
-}
-
-.global-warning {
- -moz-box-align: center;
- padding: 0 8px;
- color: #c8a91e;
- font-weight: bold;
-}
-
-#addons-page[warning] .global-warning-container {
- background-image: linear-gradient(transparent, rgba(255, 255, 0, 0.1));
-}
-
-#detail-view .global-warning {
- padding: 4px 12px;
- border-bottom: 1px solid #c1c1c1;
-}
-
-@media (max-width: 600px) {
- .global-warning-text {
- display: none;
- }
-
- .global-warning .warning-icon {
- background-color: #fff;
- box-shadow: 0 0 2px 5px #fff;
- border-radius: 10px;
- }
-}
-
-/*** global informations ***/
-
-/* Plugins aren't yet disabled by safemode (bug 342333),
- so don't show that warning when viewing plugins. */
-#addons-page[warning="safemode"] .view-pane[type="plugin"] .global-warning-container,
-#addons-page[warning="safemode"] #detail-view[loading="true"] .global-warning-container {
- background-color: inherit;
- background-image: none;
-}
-
-
-/*** notification icons ***/
-
-.warning-icon,
-.error-icon,
-.pending-icon,
-.info-icon {
- width: 16px;
- height: 16px;
- margin: 3px 0;
-}
-
-.warning-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-warning.svg");
-}
-
-.error-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-error.svg");
-}
-
-.pending-icon,
-.info-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-info-positive.svg");
-}
-
-.addon-view[pending="disable"] .pending-icon,
-.addon-view[pending="uninstall"] .pending-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-info-negative.svg");
-}
-
-/*** view alert boxes ***/
-
-.alert-container {
- -moz-box-align: center;
- margin-right: 48px;
- margin-left: 48px;
-}
-
-.alert-spacer-before {
- -moz-box-flex: 1;
-}
-
-.alert-spacer-after {
- -moz-box-flex: 3;
-}
-
-.alert {
- -moz-box-align: center;
- padding: 10px;
- color: #333;
- border: 1px solid #c1c1c1;
- border-radius: 2px;
- background-color: #ebebeb;
-}
-
-.alert .alert-title {
- font-weight: bold;
- font-size: 200%;
- margin-bottom: 15px;
-}
-
-.alert button {
- margin: 1em 2em;
-}
-
-.loading {
- list-style-image: url("chrome://global/skin/icons/loading.png");
- padding-left: 20px;
- padding-right: 20px;
-}
-
-@media (min-resolution: 1.1dppx) {
- .loading > image {
- width: 16px;
- list-style-image: url("chrome://global/skin/icons/loading@2x.png");
- }
-}
-
-button.warning {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-warning.svg");
-}
-
-
-/*** category selector ***/
-
-#categories {
- padding-top: 0;
-}
-
-.category[selected="true"]:hover {
- background-color:#1A2533;
-}
-
-.category[disabled] {
- overflow: hidden;
- height: 0;
- min-height: 0;
- opacity: 0;
- transition-property: min-height, opacity;
- transition-duration: 1s, 0.8s;
-}
-
-.category:not([disabled]) {
- min-height: 40px;
- transition-property: min-height, opacity;
- transition-duration: 1s, 0.8s;
-}
-
-/* Maximize the size of the viewport when the window is small */
-@media (max-width: 800px) {
- .category-name {
- display: none;
- }
-}
-
-.category-badge {
- background-color: #55D4FF;
- padding: 2px 8px;
- margin: 6px 0;
- margin-inline-start: 6px;
- border-radius: 100%;
- color: #FFF;
- font-weight: bold;
- text-align: center;
-}
-
-.category-badge[value="0"] {
- display: none;
-}
-
-#category-search > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-search.png");
-}
-#category-discover > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-discover.png");
-}
-#category-locale > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-languages.png");
-}
-#category-extension > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-extensions.svg");
-}
-#category-service > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-service.png");
-}
-#category-theme > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-themes.png");
-}
-#category-plugin > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-plugins.png");
-}
-#category-dictionary > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-dictionaries.png");
-}
-#category-experiment > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-experiments.png");
-}
-#category-availableUpdates > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-available.png");
-}
-#category-recentUpdates > .category-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/category-recent.png");
-}
-
-
-/*** header ***/
-
-#header {
- margin-top: 20px;
- margin-bottom: 20px;
- margin-right: 48px;
- margin-left: 48px;
-}
-
-@media (max-width: 600px) {
- #header-search {
- width: 12em;
- }
-}
-
-.view-header {
- margin: 0 48px;
- border-bottom: 1px solid #c1c1c1;
-}
-
-#header-utils-btn {
- height: 30px;
- line-height: 20px;
- border-color: #c1c1c1;
- background-color: #fbfbfb;
- padding-right: 10px;
- padding-left: 10px;
-}
-
-#header-utils-btn:not([disabled="true"]):active:hover,
-#header-utils-btn[open="true"] {
- background-color: #dadada;
-}
-
-.header-button {
- -moz-appearance: none;
- border: 1px solid;
- border-radius: 2px;
-}
-
-.header-button[disabled="true"] > .toolbarbutton-icon {
- opacity: 0.4;
-}
-
-.header-button:not([disabled="true"]):hover,
-#header-utils-btn:not([disabled="true"]):hover {
- background-color: #ebebeb;
- cursor: pointer;
-}
-
-.header-button > .toolbarbutton-text {
- display: none;
-}
-
-.nav-button {
- list-style-image: url(chrome://mozapps/skin/extensions/navigation.png);
- margin-top: 15px;
- margin-bottom: 15px;
- border-color: transparent;
-}
-
-.nav-button:not([disabled="true"]):hover {
- border-color: #ebebeb;
-}
-
-#back-btn:-moz-locale-dir(ltr),
-#forward-btn:-moz-locale-dir(rtl) {
- -moz-image-region: rect(0, 18px, 18px, 0);
-}
-
-#back-btn:-moz-locale-dir(rtl),
-#forward-btn:-moz-locale-dir(ltr) {
- -moz-image-region: rect(0, 36px, 18px, 18px);
-}
-
-
-/*** sorters ***/
-
-.sort-controls {
- -moz-appearance: none;
-}
-
-.sorter {
- height: 35px;
- border: none;
- border-radius: 0;
- background-color: transparent;
- color: #536680;
- margin: 0;
- min-width: 12px !important;
- -moz-box-direction: reverse;
-}
-
-.sorter .button-box {
- padding-top: 0;
- padding-bottom: 0;
-}
-
-.sorter[checkState="1"],
-.sorter[checkState="2"] {
- background-color: #ebebeb;
- box-shadow: 0 -4px 0 0 #ff9500 inset;
-}
-
-.sorter .button-icon {
- margin-inline-start: 6px;
-}
-
-
-/*** discover view ***/
-
-.discover-spacer-before,
-.discover-spacer-after {
- -moz-box-flex: 1;
-}
-
-#discover-error .alert {
- max-width: 45em;
- -moz-box-flex: 1;
-}
-
-.discover-logo {
- list-style-image: url("chrome://mozapps/skin/extensions/discover-logo.png");
- margin-inline-end: 15px;
-}
-
-.discover-title {
- font-weight: bold;
- font-size: 24px;
- font-family: MetaWebPro-Book, "Trebuchet MS", sans-serif;
- margin: 0 0 15px 0;
-}
-
-.discover-description {
- text-align: justify;
- margin: 0 0 15px 0;
-}
-
-.discover-footer {
- text-align: justify;
-}
-
-
-/*** list ***/
-
-.list {
- -moz-appearance: none;
- margin: 0;
- border-width: 0 !important;
- background-color: transparent;
-}
-
-.list > scrollbox > .scrollbox-innerbox {
- border: 1px dotted transparent;
-}
-
-.list:-moz-focusring > scrollbox > .scrollbox-innerbox {
- border-color: #0095dd;
-}
-
-.addon {
- color: #444;
- border-bottom: 1px solid #c1c1c1;
- padding: 5px;
- background-origin: border-box;
-}
-
-.addon:not(:only-child):last-child {
- border-bottom-width: 0;
-}
-
-.details {
- cursor: pointer;
- margin: 0;
- margin-inline-start: 10px;
-}
-
-.icon-container {
- width: 48px;
- height: 48px;
- margin: 3px 7px;
- -moz-box-align: center;
- -moz-box-pack: center;
-}
-
-.icon {
- list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
- max-width: 32px;
- max-height: 32px;
-}
-
-.content-inner-container {
- margin-inline-end: 5px;
-}
-
-.addon[active="false"] .icon {
- filter: grayscale(1);
-}
-
-.addon-view[type="theme"] .icon {
- list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
-}
-
-.addon-view[type="locale"] .icon {
- list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
-}
-
-.addon-view[type="plugin"] .icon {
- list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
-}
-
-.addon-view[type="dictionary"] .icon {
- list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.png");
-}
-
-.addon-view[type="experiment"] .icon {
- list-style-image: url("chrome://mozapps/skin/extensions/experimentGeneric.png");
-}
-
-.name-container {
- font-size: 1.3rem;
- font-weight: bold;
- -moz-box-align: end;
- -moz-box-flex: 1;
-}
-
-.creator {
- font-weight: bold;
-}
-
-.description-container {
- margin-inline-start: 6px;
- -moz-box-align: center;
- font-size: 1.25rem;
-}
-
-.description {
- margin: 0;
-}
-
-.warning,
-.pending,
-.error {
- margin-inline-start: 48px;
- font-weight: bold;
- -moz-box-align: center;
-}
-
-.content-container,
-.basicinfo-container {
- -moz-box-align: start;
-}
-
-.addon[status="installing"] > .content-container {
- -moz-box-align: stretch;
-}
-
-.update-info-container {
- -moz-box-align: center;
-}
-
-.update-available {
- -moz-box-align: end;
-}
-
-.install-status-container {
- -moz-box-pack: end;
- -moz-box-align: end;
-}
-
-.name-outer-container {
- -moz-box-pack: center;
-}
-
-.relnotes-toggle-container,
-.icon-outer-container {
- -moz-box-pack: start;
-}
-
-.status-container,
-.control-container {
- -moz-box-pack: end;
-}
-
-.addon-view .warning {
- color: #d8b826;
-}
-
-.addon-view .error {
- color: #e62117;
-}
-
-.addon-view .pending {
- color: #62c44e;
-}
-
-.addon-view[pending="disable"] .pending,
-.addon-view[pending="uninstall"] .pending {
- color: #898989;
-}
-
-.addon .relnotes-container {
- -moz-box-align: start;
- margin-inline-start: 6px;
- height: 0;
- overflow: hidden;
- opacity: 0;
- transition-property: height, opacity;
- transition-duration: 0.5s, 0.5s;
-}
-
-.addon[show-relnotes] .relnotes-container {
- opacity: 1;
- transition-property: height, opacity;
- transition-duration: 0.5s, 0.5s;
-}
-
-.addon .relnotes-header {
- font-weight: bold;
- margin: 10px 0;
-}
-
-.addon .relnotes-toggle {
- -moz-appearance: none;
- border: none;
- background: transparent;
- font-weight: bold;
- cursor: pointer;
-}
-
-.addon .relnotes-toggle > .button-box > .button-icon {
- padding-inline-start: 4px;
-}
-
-.addon-view[notification],
-.addon-view[pending] {
- --view-highlight-color: transparent;
- background-image: radial-gradient(at 50% 0%,
- var(--view-highlight-color) 0%,
- transparent 75%);
-}
-.addon-view[notification="warning"] {
- --view-highlight-color: #F9F5E5;
-}
-
-.addon-view[notification="error"] {
- --view-highlight-color: #FFE8E9;
-}
-
-.addon-view[pending="enable"],
-.addon-view[pending="upgrade"],
-.addon-view[pending="install"] {
- --view-highlight-color: #EFFAF2;
-}
-
-.addon-view[pending="disable"],
-.addon-view[pending="uninstall"] {
- --view-highlight-color: #F2F2F2;
-}
-
-.addon[selected] {
- background-color: #fafafa;
- color: #333;
- padding-inline-start: 1px; /* compensate the 4px border */
- border-inline-start: solid 4px #ff9500;
-}
-
-.addon[active="false"] > .content-container > .content-inner-container {
- color: #999;
-}
-
-.addon[active="false"][selected] > .content-container > .content-inner-container {
- color: #777;
-}
-
-
-/*** item - uninstalled ***/
-
-.addon[status="uninstalled"] {
- border: none;
-}
-
-.addon[status="uninstalled"] > .container {
- -moz-box-align: center;
- padding: 4px 20px;
- background-color: #FDFFA8;
- border-radius: 8px;
- font-size: 120%;
-}
-
-.addon[status="uninstalled"][selected] {
- background-color: transparent;
-}
-
-
-/*** search view ***/
-
-#search-filter {
- padding: 5px 20px;
- margin-right: 48px;
- margin-left: 48px;
- font-size: 120%;
- border-bottom: 1px solid #c1c1c1;
- overflow-x: hidden;
-}
-
-#search-filter-label {
- font-weight: bold;
- color: grey;
- margin-inline-end: 10px;
-}
-
-#search-allresults-link {
- margin-top: 1em;
- margin-bottom: 2em;
-}
-
-
-/*** detail view ***/
-
-#detail-view > .box-inherit {
- margin-right: 48px;
- margin-left: 48px;
-}
-
-#detail-view .loading {
- opacity: 0;
-}
-
-#detail-view[loading-extended] .loading {
- opacity: 1;
- transition-property: opacity;
- transition-duration: 1s;
-}
-
-.detail-view-container {
- padding-inline-end: 2em;
- padding-bottom: 2em;
- font-size: 1.25rem;
- color: #333;
-}
-
-#detail-notifications {
- margin-top: 1em;
- margin-bottom: 2em;
-}
-
-#detail-notifications .warning,
-#detail-notifications .pending,
-#detail-notifications .error {
- margin-inline-start: 0;
-}
-
-#detail-icon-container {
- width: 64px;
- margin-inline-end: 10px;
- margin-top: 6px;
-}
-
-#detail-icon {
- max-width: 64px;
- max-height: 64px;
-}
-
-#detail-summary {
- margin-bottom: 2em;
-}
-
-#detail-name-container {
- font-size: 2.5rem;
- font-weight: normal;
-}
-
-#detail-screenshot-box {
- margin-inline-end: 2em;
- background-image: linear-gradient(rgba(255,255,255,.5), transparent);
- background-color: white;
- box-shadow: 0 1px 2px #666;
- border-radius: 2px;
-}
-
-#detail-screenshot {
- max-width: 300px;
- max-height: 300px;
-}
-
-#detail-screenshot[loading] {
- background-image: url("chrome://global/skin/icons/loading.png");
- background-position: 50% 50%;
- background-repeat: no-repeat;
-}
-
-@media (min-resolution: 1.1dppx) {
- #detail-screenshot[loading] {
- background-image: url("chrome://global/skin/icons/loading@2x.png");
- background-size: 16px;
- }
-}
-
-#detail-screenshot[loading="error"] {
- background-image: url("chrome://global/skin/media/error.png");
-}
-
-#detail-desc-container {
- margin-bottom: 2em;
-}
-
-#detail-desc, #detail-fulldesc {
- margin-inline-start: 6px;
- /* This is necessary to fix layout issues with multi-line descriptions, see
- bug 592712*/
- outline: solid transparent;
- white-space: pre-wrap;
- min-width: 10em;
-}
-
-#detail-fulldesc {
- margin-top: 1em;
-}
-
-#detail-contributions {
- border-radius: 2px;
- border: 1px solid #D2DBE8;
- margin-bottom: 2em;
- padding: 1em;
- background-color: #F3F7FB;
-}
-
-#detail-contrib-description {
- font-style: italic;
- margin-bottom: 1em;
- color: #373D48;
-}
-
-#detail-contrib-suggested {
- color: grey;
- font-weight: bold;
-}
-
-#detail-contrib-btn {
- color: #FFF;
- text-shadow: none;
- border: 1px solid #0095dd;
- list-style-image: url("chrome://mozapps/skin/extensions/heart.png");
- background-color: #0095dd;
-}
-
-#detail-contrib-btn .button-icon {
- margin-inline-end: 5px;
-}
-
-#detail-contrib-btn:not(:active):hover {
- border-color: #008acb;
- background-color: #008acb;
-}
-
-#detail-contrib-btn:active:hover {
- background-color: #006b9d;
- border-color: #006b9d;
-}
-
-#detail-grid {
- margin-bottom: 2em;
-}
-
-#detail-grid > columns > column:first-child {
- min-width: 15em;
- max-width: 25em;
-}
-
-.detail-row[first-row="true"],
-.detail-row-complex[first-row="true"],
-setting[first-row="true"] {
- border-top: none;
-}
-
-.detail-row,
-.detail-row-complex,
-setting {
- border-top: 1px solid #c1c1c1;
- -moz-box-align: center;
- min-height: 35px;
- line-height: 20px;
- text-shadow: 0 1px 1px #fefffe;
-}
-
-#detail-controls {
- margin-bottom: 1em;
-}
-
-.inline-options-browser,
-setting[first-row="true"] {
- margin-top: 2em;
-}
-
-setting {
- -moz-box-align: start;
-}
-
-.preferences-alignment {
- min-height: 30px;
- -moz-box-align: center;
-}
-
-.preferences-description {
- font-size: 90.9%;
- color: graytext;
- margin-top: -2px;
- margin-inline-start: 2em;
- white-space: pre-wrap;
-}
-
-.preferences-description:empty {
- display: none;
-}
-
-setting[type="radio"] > radiogroup {
- -moz-box-orient: horizontal;
-}
-
-
-/*** creator ***/
-
-.creator > label {
- margin-inline-start: 0;
- margin-inline-end: 0;
-}
-
-.creator > .text-link {
- margin-top: 1px;
- margin-bottom: 1px;
-}
-
-
-/*** rating ***/
-
-.meta-rating {
- margin-inline-end: 0;
- padding-top: 2px;
-}
-
-
-/*** download progress ***/
-
-.download-progress {
- border: 1px solid #c1c1c1;
- border-radius: 2px;
- background-color: #fbfbfb;
- width: 200px;
- height: 30px;
- margin: 2px 4px;
-}
-
-.download-progress[mode="undetermined"] {
- border-color: #0095dd;
-}
-
-.download-progress .start-cap,
-.download-progress[complete] .end-cap,
-.download-progress[mode="undetermined"] .end-cap,
-.download-progress .progress .progress-bar {
- -moz-appearance: none;
- background-color: #0095dd;
-}
-
-.download-progress .progress .progress-bar {
- min-height: 28px;
-}
-
-.download-progress .progress {
- -moz-appearance: none;
- background-color: transparent;
- padding: 0;
- margin: 0;
- border: none;
-}
-
-.download-progress .start-cap,
-.download-progress .end-cap {
- width: 4px;
-}
-
-.download-progress .start-cap:-moz-locale-dir(ltr),
-.download-progress .end-cap:-moz-locale-dir(rtl) {
- border-radius: 1px 0 0 1px;
-}
-
-.download-progress .end-cap:-moz-locale-dir(ltr),
-.download-progress .start-cap:-moz-locale-dir(rtl) {
- border-radius: 0 1px 1px 0;
-}
-
-.download-progress .cancel {
- -moz-appearance: none;
- padding: 3px;
- min-width: 0;
- width: 20px;
- height: 20px;
- margin: 3px;
-}
-
-.download-progress .cancel .button-box {
- /* override in-content/common.css !important rule */
- padding: 0 !important;
- border: none;
-}
-
-.download-progress .cancel .button-text {
- display: none;
-}
-
-.download-progress .cancel .button-icon {
- margin: 0;
-}
-
-.download-progress .cancel {
- list-style-image: url('chrome://mozapps/skin/extensions/cancel.png');
-}
-
-.download-progress .status-container {
- -moz-box-align: center;
-}
-
-.download-progress .status {
- color: #333;
- text-shadow: #fff 0 0 2px;
-}
-
-
-/*** install status ***/
-
-.install-status {
- -moz-box-align: center;
-}
-
-
-/*** check for updates ***/
-
-#updates-container {
- -moz-box-align: center;
-}
-
-#updates-container .button-link {
- font-weight: bold;
-}
-
-#updates-installed,
-#updates-downloaded {
- color: #00BB00;
- font-weight: bold;
-}
-
-#update-selected {
- margin: 12px;
-}
-
-
-/*** buttons ***/
-
-.addon-control[disabled="true"]:not(.no-auto-hide) {
- display: none;
-}
-
-.no-auto-hide .addon-control {
- display: block !important;
-}
-
-button.button-link {
- -moz-appearance: none;
- background: transparent;
- border: none;
- box-shadow: none;
- color: #0095dd;
- cursor: pointer;
- min-width: 0;
- min-height: 20px;
- margin: 0 6px;
-}
-
-button.button-link:not(:-moz-focusring) > .button-box {
- border-width: 0;
- margin: 1px;
-}
-
-button.button-link:hover {
- background-color: transparent;
- color: #178ce5;
- text-decoration: underline;
-}
-
-/* Needed to override normal button style from inContent.css */
-button.button-link:not([disabled="true"]):active:hover {
- background-color: transparent;
- color: #ff9500;
- text-decoration: none;
-}
-
-
-/*** telemetry experiments ***/
-
-#detail-experiment-container {
- font-size: 80%;
- margin-bottom: 1em;
-}
-
-#detail-experiment-bullet-container,
-#detail-experiment-state,
-#detail-experiment-time,
-.experiment-bullet-container,
-.experiment-state,
-.experiment-time {
- vertical-align: middle;
- display: inline-block;
-}
-
-.addon .experiment-bullet,
-#detail-experiment-bullet {
- fill: rgb(158, 158, 158);
-}
-
-.addon[active="true"] .experiment-bullet,
-#detail-view[active="true"] #detail-experiment-bullet {
- fill: rgb(106, 201, 20);
-}
-
-/*** info UI for add-ons that have been disabled for being unsigned ***/
-
-#show-disabled-unsigned-extensions:not(:hover) {
- background-color: #fcf8ed;
-}
-
-#disabled-unsigned-addons-info {
- margin-bottom: 2em;
- margin-right: 48px;
- margin-left: 48px;
-}
-
-#disabled-unsigned-addons-heading {
- font-size: 1.4em;
- font-weight: bold;
- margin-bottom: .5em;
-}
-
-#signing-dev-info {
- font-style: italic;
-}
-
-#detail-findUpdates-btn[hidden] {
- display: -moz-box;
- visibility: hidden;
-}
diff --git a/toolkit/themes/shared/webextensions/navigation.png b/toolkit/themes/shared/webextensions/navigation.png
deleted file mode 100644
index 67ff3d9a7..000000000
--- a/toolkit/themes/shared/webextensions/navigation.png
+++ /dev/null
Binary files differ
diff --git a/toolkit/themes/shared/webextensions/newaddon.inc.css b/toolkit/themes/shared/webextensions/newaddon.inc.css
deleted file mode 100644
index 52352ccd2..000000000
--- a/toolkit/themes/shared/webextensions/newaddon.inc.css
+++ /dev/null
@@ -1,114 +0,0 @@
-%if 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/. */
-%endif
-@import url("chrome://global/skin/in-content/common.css");
-
-#addon-page {
- font-size: 1.1em;
-}
-
-#addon-scrollbox {
- overflow: auto;
- -moz-box-orient: vertical;
- -moz-box-flex: 1;
-}
-
-#spacer-start {
- -moz-box-flex: 1;
-}
-
-#spacer-end {
- -moz-box-flex: 3;
-}
-
-#addon-container {
- overflow: visible;
- max-width: 800px;
- margin: 20px;
- padding: 30px 90px;
-}
-
-#addon-info {
- -moz-box-align: start;
- margin: 25px 10px;
-}
-
-#icon {
- margin-top: 8px;
- margin-inline-end: 10px;
- max-width: 64px;
- max-height: 64px;
- list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric.svg");
-}
-
-.addon-info[type="theme"] #icon {
- list-style-image: url("chrome://mozapps/skin/extensions/themeGeneric.png");
-}
-
-.addon-info[type="locale"] #icon {
- list-style-image: url("chrome://mozapps/skin/extensions/localeGeneric.png");
-}
-
-.addon-info[type="plugin"] #icon {
- list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
-}
-
-.addon-info[type="dictionary"] #icon {
- list-style-image: url("chrome://mozapps/skin/extensions/dictionaryGeneric.png");
-}
-
-#name {
- font-size: 130%;
-}
-
-#author {
- color: GrayText;
-}
-
-#location {
- color: GrayText;
-}
-
-#warning {
- margin-bottom: 25px;
- -moz-box-align: start;
-}
-
-#warning-icon {
- list-style-image: url("chrome://mozapps/skin/extensions/alerticon-warning.svg");
- width: 16px;
- height: 16px;
- margin-top: 5px;
- margin-inline-end: 5px;
-}
-
-#allow {
- margin-inline-start: 84px;
- margin-bottom: 20px;
-}
-
-#buttonDeck {
- margin-top: 25px;
- -moz-box-align: stretch;
-}
-
-#continuePanel {
- -moz-box-pack: end;
- -moz-box-align: end;
-}
-
-#restartPanel {
- -moz-box-pack: end;
- -moz-box-align: stretch;
-}
-
-#restartPanelButtons {
- margin-top: 25px;
- -moz-box-pack: end;
-}
-
-#later {
- color: GrayText;
-}
diff --git a/toolkit/themes/shared/webextensions/utilities.svg b/toolkit/themes/shared/webextensions/utilities.svg
deleted file mode 100644
index 8bf24458c..000000000
--- a/toolkit/themes/shared/webextensions/utilities.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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/. -->
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
- <style>
- use:not(:target) {
- display: none;
- }
- use {
- fill: #424f5a;
- }
- use[id$="-native"] {
- fill: GrayText;
- }
- use[id$="-grayscale"] {
- fill: #4d4d4d;
- }
- use[id$="-inverted"] {
- fill: #ddd;
- }
- </style>
- <defs>
- <path id="utilities-shape" d="m11.5,13.9l-.6-1.5c.3-.2 .5-.4 .8-.6 .2-.2 .4-.5 .6-.7l1.5,.6c.3,.1 .6,0 .7-.3l.4-1c.1-.3 0-.6-.3-.7l-1.5-.6c.1-.6 .1-1.3 0-2l1.5-.6c.3-.1 .4-.4 .3-.7l-.4-1c-.1-.3-.4-.4-.7-.3l-1.5,.6c-.2-.3-.4-.5-.6-.8-.2-.1-.5-.3-.7-.5l.6-1.5c.1-.3 0-.6-.3-.7l-.9-.4c-.3-.1-.6,0-.7,.3l-.6,1.5c-.6-.1-1.3-.1-2,0l-.6-1.5c-.1-.3-.4-.4-.7-.3l-1,.4c-.2,.1-.3,.4-.2,.6l.6,1.5c-.3,.3-.5,.5-.8,.7-.2,.3-.4,.5-.6,.8l-1.5-.7c-.3-.1-.6,0-.7,.3l-.4,.9c-.1,.3 0,.6 .3,.7l1.5,.7c-.1,.6-.1,1.3 0,1.9l-1.5,.6c-.3,.1-.4,.4-.3,.7l.4,1c.1,.3 .4,.4 .7,.3l1.5-.6c.2,.3 .4,.5 .6,.8 .2,.2 .5,.4 .7,.6l-.6,1.5c-.1,.3 0,.6 .3,.7l1,.4c.3,.1 .6,0 .7-.3l.6-1.5c.6,.1 1.3,.1 2,0l.6,1.5c.1,.3 .4,.4 .7,.3l1-.4c.1-.1 .3-.4 .1-.7zm-5.1-4.2c-.9-.9-.9-2.4 0-3.3 .9-.9 2.4-.9 3.3,0 .9,.9 .9,2.4 0,3.3-.9,.9-2.4,.9-3.3,0z"/>
- </defs>
- <use id="utilities" xlink:href="#utilities-shape"/>
- <use id="utilities-native" xlink:href="#utilities-shape"/>
- <use id="utilities-grayscale" xlink:href="#utilities-shape"/>
- <use id="utilities-inverted" xlink:href="#utilities-shape"/>
-</svg>