зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1393582 - Remove CastingApps support for Firefox desktop. r=felipe
MozReview-Commit-ID: B2bqiNXibPP
This commit is contained in:
Родитель
15d0cf7b73
Коммит
491c7f5d8c
|
@ -272,7 +272,6 @@ pref("browser.slowStartup.maxSamples", 5);
|
|||
pref("browser.aboutHomeSnippets.updateUrl", "https://snippets.cdn.mozilla.net/%STARTPAGE_VERSION%/%NAME%/%VERSION%/%APPBUILDID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/");
|
||||
|
||||
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
|
||||
|
|
|
@ -241,11 +241,6 @@
|
|||
label="&emailVideoCmd.label;"
|
||||
accesskey="&emailVideoCmd.accesskey;"
|
||||
oncommand="gContextMenu.sendMedia();"/>
|
||||
<menu id="context-castvideo"
|
||||
label="&castVideoCmd.label;"
|
||||
accesskey="&castVideoCmd.accesskey;">
|
||||
<menupopup id="context-castvideo-popup" onpopupshowing="gContextMenu.populateCastVideoMenu(this)"/>
|
||||
</menu>
|
||||
<menuitem id="context-sendaudio"
|
||||
label="&emailAudioCmd.label;"
|
||||
accesskey="&emailAudioCmd.accesskey;"
|
||||
|
|
|
@ -473,8 +473,7 @@
|
|||
|
||||
<menu id="tools-menu"
|
||||
label="&toolsMenu.label;"
|
||||
accesskey="&toolsMenu.accesskey;"
|
||||
onpopupshowing="mirrorShow(this)">
|
||||
accesskey="&toolsMenu.accesskey;">
|
||||
<menupopup id="menu_ToolsPopup">
|
||||
<menuitem id="menu_openDownloads"
|
||||
label="&downloads.label;"
|
||||
|
@ -520,13 +519,6 @@
|
|||
key="key_viewInfo"
|
||||
#endif
|
||||
command="View:PageInfo"/>
|
||||
<menu id="menu_mirrorTabCmd"
|
||||
hidden="true"
|
||||
accesskey="&mirrorTabCmd.accesskey;"
|
||||
label="&mirrorTabCmd.label;">
|
||||
<menupopup id="menu_mirrorTab-popup"
|
||||
onpopupshowing="populateMirrorTabMenu(this)"/>
|
||||
</menu>
|
||||
#ifndef XP_UNIX
|
||||
<menuseparator id="prefSep"/>
|
||||
<menuitem id="menu_preferences"
|
||||
|
|
|
@ -26,7 +26,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
BrowserUITelemetry: "resource:///modules/BrowserUITelemetry.jsm",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
|
||||
CastingApps: "resource:///modules/CastingApps.jsm",
|
||||
CharsetMenu: "resource://gre/modules/CharsetMenu.jsm",
|
||||
Color: "resource://gre/modules/Color.jsm",
|
||||
ContentSearch: "resource:///modules/ContentSearch.jsm",
|
||||
|
@ -3310,35 +3309,6 @@ function BrowserFullScreen() {
|
|||
window.fullScreen = !window.fullScreen;
|
||||
}
|
||||
|
||||
function mirrorShow(popup) {
|
||||
let services = [];
|
||||
if (Services.prefs.getBoolPref("browser.casting.enabled")) {
|
||||
services = CastingApps.getServicesForMirroring();
|
||||
}
|
||||
popup.ownerDocument.getElementById("menu_mirrorTabCmd").hidden = !services.length;
|
||||
}
|
||||
|
||||
function mirrorMenuItemClicked(event) {
|
||||
gBrowser.selectedBrowser.messageManager.sendAsyncMessage("SecondScreen:tab-mirror",
|
||||
{service: event.originalTarget._service});
|
||||
}
|
||||
|
||||
function populateMirrorTabMenu(popup) {
|
||||
popup.innerHTML = null;
|
||||
if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
|
||||
return;
|
||||
}
|
||||
let doc = popup.ownerDocument;
|
||||
let services = CastingApps.getServicesForMirroring();
|
||||
services.forEach(service => {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -93,19 +93,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, height};
|
||||
app.mirror(function() {}, content, viewport, function() {}, content);
|
||||
}
|
||||
});
|
||||
|
||||
var AboutHomeListener = {
|
||||
init(chromeGlobal) {
|
||||
chromeGlobal.addEventListener("AboutHomeLoad", this, false, true);
|
||||
|
|
|
@ -184,8 +184,6 @@ add_task(async function test_video_ok() {
|
|||
"context-savevideo", true,
|
||||
"context-video-saveimage", true,
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -231,8 +229,6 @@ add_task(async function test_video_bad() {
|
|||
"context-savevideo", true,
|
||||
"context-video-saveimage", false,
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -257,8 +253,6 @@ add_task(async function test_video_bad2() {
|
|||
"context-savevideo", false,
|
||||
"context-video-saveimage", false,
|
||||
"context-sendvideo", false,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -319,8 +313,6 @@ add_task(async function test_video_in_iframe() {
|
|||
"context-savevideo", true,
|
||||
"context-video-saveimage", true,
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null,
|
||||
"frame", null,
|
||||
["context-showonlythisframe", true,
|
||||
"context-openframeintab", true,
|
||||
|
|
|
@ -966,28 +966,6 @@ BrowserGlue.prototype = {
|
|||
DateTimePickerHelper.uninit();
|
||||
},
|
||||
|
||||
_initServiceDiscovery() {
|
||||
if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
|
||||
return;
|
||||
}
|
||||
var rokuDevice = {
|
||||
id: "roku:ecp",
|
||||
target: "roku:ecp",
|
||||
factory(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() {
|
||||
if (this._windowsWereRestored) {
|
||||
|
@ -998,8 +976,6 @@ BrowserGlue.prototype = {
|
|||
BrowserUsageTelemetry.init();
|
||||
BrowserUITelemetry.init();
|
||||
|
||||
this._initServiceDiscovery();
|
||||
|
||||
// Show update notification, if needed.
|
||||
if (Services.prefs.prefHasUserValue("app.update.postupdate"))
|
||||
this._showUpdateNotification();
|
||||
|
|
|
@ -581,8 +581,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY emailImageCmd.accesskey "g">
|
||||
<!ENTITY emailVideoCmd.label "Email Video…">
|
||||
<!ENTITY emailVideoCmd.accesskey "a">
|
||||
<!ENTITY castVideoCmd.label "Send Video To Device">
|
||||
<!ENTITY castVideoCmd.accesskey "e">
|
||||
<!ENTITY emailAudioCmd.label "Email Audio…">
|
||||
<!ENTITY emailAudioCmd.accesskey "a">
|
||||
<!ENTITY playPluginCmd.label "Activate this plugin">
|
||||
|
|
|
@ -128,7 +128,6 @@ EXTRA_JS_MODULES += [
|
|||
'AttributionCode.jsm',
|
||||
'BrowserUITelemetry.jsm',
|
||||
'BrowserUsageTelemetry.jsm',
|
||||
'CastingApps.jsm',
|
||||
'ContentClick.jsm',
|
||||
'ContentCrashHandlers.jsm',
|
||||
'ContentLinkHandler.jsm',
|
||||
|
|
|
@ -226,7 +226,6 @@ class RobocopTestRunner(MochitestDesktop):
|
|||
self.options.extraPrefs.append('layout.css.devPixelsPerPx=1.0')
|
||||
self.options.extraPrefs.append('browser.chrome.dynamictoolbar=false')
|
||||
self.options.extraPrefs.append('browser.snippets.enabled=false')
|
||||
self.options.extraPrefs.append('browser.casting.enabled=true')
|
||||
self.options.extraPrefs.append('extensions.autoupdate.enabled=false')
|
||||
|
||||
# Override the telemetry init delay for integration testing.
|
||||
|
|
Загрузка…
Ссылка в новой задаче