diff --git a/application/basilisk/app/profile/basilisk.js b/application/basilisk/app/profile/basilisk.js index 3effd0d95..cb6bff92d 100644 --- a/application/basilisk/app/profile/basilisk.js +++ b/application/basilisk/app/profile/basilisk.js @@ -214,7 +214,6 @@ pref("browser.slowStartup.timeThreshold", 40000); pref("browser.slowStartup.maxSamples", 5); pref("browser.enable_automatic_image_resizing", true); -pref("browser.casting.enabled", false); pref("browser.chrome.site_icons", true); pref("browser.chrome.favicons", true); // browser.warnOnQuit == false will override all other possible prompts when quitting or restarting diff --git a/application/basilisk/app/profile/centaury.js b/application/basilisk/app/profile/centaury.js index 094dfdf8d..def713f15 100644 --- a/application/basilisk/app/profile/centaury.js +++ b/application/basilisk/app/profile/centaury.js @@ -214,7 +214,6 @@ pref("browser.slowStartup.timeThreshold", 40000); pref("browser.slowStartup.maxSamples", 5); pref("browser.enable_automatic_image_resizing", true); -pref("browser.casting.enabled", false); pref("browser.chrome.site_icons", true); pref("browser.chrome.favicons", true); // browser.warnOnQuit == false will override all other possible prompts when quitting or restarting diff --git a/application/basilisk/base/content/browser-context.inc b/application/basilisk/base/content/browser-context.inc index d400cd0b2..61b20ac75 100644 --- a/application/basilisk/base/content/browser-context.inc +++ b/application/basilisk/base/content/browser-context.inc @@ -226,11 +226,6 @@ label="&emailVideoCmd.label;" accesskey="&emailVideoCmd.accesskey;" oncommand="gContextMenu.sendMedia();"/> - - - + accesskey="&toolsMenu.accesskey;"> - { - let item = doc.createElement("menuitem"); - item.setAttribute("label", service.friendlyName); - item._service = service; - item.addEventListener("command", mirrorMenuItemClicked); - popup.appendChild(item); - }); -} - function getWebNavigation() { return gBrowser.webNavigation; diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js index 370e5ba60..675b1e431 100644 --- a/application/basilisk/base/content/nsContextMenu.js +++ b/application/basilisk/base/content/nsContextMenu.js @@ -199,21 +199,10 @@ nsContextMenu.prototype = { // Send media URL (but not for canvas, since it's a big data: URL) this.showItem("context-sendimage", this.onImage); this.showItem("context-sendvideo", this.onVideo); - this.showItem("context-castvideo", this.onVideo); this.showItem("context-sendaudio", this.onAudio); let mediaIsBlob = this.mediaURL.startsWith("blob:"); this.setItemAttr("context-sendvideo", "disabled", !this.mediaURL || mediaIsBlob); this.setItemAttr("context-sendaudio", "disabled", !this.mediaURL || mediaIsBlob); - let shouldShowCast = Services.prefs.getBoolPref("browser.casting.enabled"); - // getServicesForVideo alone would be sufficient here (it depends on - // SimpleServiceDiscovery.services), but SimpleServiceDiscovery is guaranteed - // to be already loaded, since we load it on startup in nsBrowserGlue, - // and CastingApps isn't, so check SimpleServiceDiscovery.services first - // to avoid needing to load CastingApps.jsm if we don't need to. - shouldShowCast = shouldShowCast && this.mediaURL && - SimpleServiceDiscovery.services.length > 0 && - CastingApps.getServicesForVideo(this.target).length > 0; - this.setItemAttr("context-castvideo", "disabled", !shouldShowCast); }, initViewItems: function CM_initViewItems() { @@ -1408,25 +1397,6 @@ nsContextMenu.prototype = { MailIntegration.sendMessage(this.mediaURL, ""); }, - castVideo: function() { - CastingApps.openExternal(this.target, window); - }, - - populateCastVideoMenu: function(popup) { - let videoEl = this.target; - popup.innerHTML = null; - let doc = popup.ownerDocument; - let services = CastingApps.getServicesForVideo(videoEl); - services.forEach(service => { - let item = doc.createElement("menuitem"); - item.setAttribute("label", service.friendlyName); - item.addEventListener("command", event => { - CastingApps.sendVideoToService(videoEl, service); - }); - popup.appendChild(item); - }); - }, - playPlugin: function() { gPluginHandler.contextMenuCommand(this.browser, this.target, "play"); }, diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js index 7fbe40c2d..f66f536fa 100644 --- a/application/basilisk/base/content/tab-content.js +++ b/application/basilisk/base/content/tab-content.js @@ -25,21 +25,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Readerable", "resource://gre/modules/Readerable.jsm"); -XPCOMUtils.defineLazyGetter(this, "SimpleServiceDiscovery", function() { - let ssdp = Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm", {}).SimpleServiceDiscovery; - // Register targets - ssdp.registerDevice({ - id: "roku:ecp", - target: "roku:ecp", - factory: function(aService) { - Cu.import("resource://gre/modules/RokuApp.jsm"); - return new RokuApp(aService); - }, - types: ["video/mp4"], - extensions: ["mp4"] - }); - return ssdp; -}); // TabChildGlobal var global = this; @@ -94,19 +79,6 @@ addMessageListener("MixedContent:ReenableProtection", function() { docShell.mixedContentChannel = null; }); -addMessageListener("SecondScreen:tab-mirror", function(message) { - if (!Services.prefs.getBoolPref("browser.casting.enabled")) { - return; - } - let app = SimpleServiceDiscovery.findAppForService(message.data.service); - if (app) { - let width = content.innerWidth; - let height = content.innerHeight; - let viewport = {cssWidth: width, cssHeight: height, width: width, height: height}; - app.mirror(function() {}, content, viewport, function() {}, content); - } -}); - var AboutHomeListener = { init: function(chromeGlobal) { chromeGlobal.addEventListener('AboutHomeLoad', this, false, true); diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index 3e212212d..976672372 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -56,7 +56,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "winShellService", ["RemotePrompt", "resource:///modules/RemotePrompt.jsm"], ["SessionStore", "resource:///modules/sessionstore/SessionStore.jsm"], ["ShellService", "resource:///modules/ShellService.jsm"], - ["SimpleServiceDiscovery", "resource://gre/modules/SimpleServiceDiscovery.jsm"], ["TabCrashHandler", "resource:///modules/ContentCrashHandlers.jsm"], ["Task", "resource://gre/modules/Task.jsm"], ["URLBarZoom", "resource:///modules/URLBarZoom.jsm"], @@ -1014,32 +1013,8 @@ BrowserGlue.prototype = { } }, - _initServiceDiscovery: function () { - if (!Services.prefs.getBoolPref("browser.casting.enabled")) { - return; - } - var rokuDevice = { - id: "roku:ecp", - target: "roku:ecp", - factory: function(aService) { - Cu.import("resource://gre/modules/RokuApp.jsm"); - return new RokuApp(aService); - }, - types: ["video/mp4"], - extensions: ["mp4"] - }; - - // Register targets - SimpleServiceDiscovery.registerDevice(rokuDevice); - - // Search for devices continuously every 120 seconds - SimpleServiceDiscovery.search(120 * 1000); - }, - // All initial windows have opened. _onWindowsRestored: function BG__onWindowsRestored() { - this._initServiceDiscovery(); - // Show update notification, if needed. if (Services.prefs.prefHasUserValue("app.update.postupdate")) this._showUpdateNotification(); diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in index d590ff94b..d7e0d3c03 100644 --- a/application/basilisk/installer/package-manifest.in +++ b/application/basilisk/installer/package-manifest.in @@ -217,7 +217,6 @@ @RESPATH@/components/dom_xhr.xpt @RESPATH@/components/dom_xpath.xpt @RESPATH@/components/dom_xul.xpt -@RESPATH@/components/dom_presentation.xpt @RESPATH@/components/downloads.xpt @RESPATH@/components/editor.xpt @RESPATH@/components/embed_base.xpt @@ -532,13 +531,6 @@ @RESPATH@/components/nsAsyncShutdown.manifest @RESPATH@/components/nsAsyncShutdown.js -@RESPATH@/components/PresentationDeviceInfoManager.manifest -@RESPATH@/components/PresentationDeviceInfoManager.js -@RESPATH@/components/BuiltinProviders.manifest -@RESPATH@/components/PresentationControlService.js -@RESPATH@/components/PresentationDataChannelSessionTransport.js -@RESPATH@/components/PresentationDataChannelSessionTransport.manifest - ; InputMethod API @RESPATH@/components/MozKeyboard.js @RESPATH@/components/InputMethod.manifest diff --git a/application/basilisk/locales/en-US/chrome/browser/browser.dtd b/application/basilisk/locales/en-US/chrome/browser/browser.dtd index f886b8e63..44eda091a 100644 --- a/application/basilisk/locales/en-US/chrome/browser/browser.dtd +++ b/application/basilisk/locales/en-US/chrome/browser/browser.dtd @@ -96,8 +96,6 @@ when there are no windows but Firefox is still running. --> - - @@ -494,8 +492,6 @@ These should match what Safari and other Apple applications use on OS X Lion. -- - - diff --git a/application/basilisk/modules/CastingApps.jsm b/application/basilisk/modules/CastingApps.jsm deleted file mode 100644 index 6f32753e8..000000000 --- a/application/basilisk/modules/CastingApps.jsm +++ /dev/null @@ -1,164 +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 = ["CastingApps"]; - -const { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm"); - - -var CastingApps = { - _sendEventToVideo: function (element, data) { - let event = element.ownerDocument.createEvent("CustomEvent"); - event.initCustomEvent("media-videoCasting", false, true, JSON.stringify(data)); - element.dispatchEvent(event); - }, - - makeURI: function (url, charset, baseURI) { - return Services.io.newURI(url, charset, baseURI); - }, - - getVideo: function (element) { - if (!element) { - return null; - } - - let extensions = SimpleServiceDiscovery.getSupportedExtensions(); - let types = SimpleServiceDiscovery.getSupportedMimeTypes(); - - // Grab the poster attribute from the