summaryrefslogtreecommitdiff
path: root/base/content/nsContextMenu.js
diff options
context:
space:
mode:
Diffstat (limited to 'base/content/nsContextMenu.js')
-rw-r--r--base/content/nsContextMenu.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/base/content/nsContextMenu.js b/base/content/nsContextMenu.js
index 5c182b3..97f666a 100644
--- a/base/content/nsContextMenu.js
+++ b/base/content/nsContextMenu.js
@@ -161,21 +161,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() {
@@ -1364,25 +1353,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");
},