Bug 1114617 - Remove nsIDownloadManagerUI from Firefox for Android. r=margaret

This commit is contained in:
Paolo Amadini 2014-12-24 18:10:04 +00:00
parent 9d0c9d7da5
commit ba854ccf69
4 changed files with 0 additions and 59 deletions

View File

@ -1,51 +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/. */
const Ci = Components.interfaces;
const Cr = Components.results;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
// -----------------------------------------------------------------------
// Download Manager UI
// -----------------------------------------------------------------------
function DownloadManagerUI() { }
DownloadManagerUI.prototype = {
classID: Components.ID("{93db15b1-b408-453e-9a2b-6619e168324a}"),
show: function show(aWindowContext, aDownload, aReason, aUsePrivateUI) {
if (!aReason)
aReason = Ci.nsIDownloadManagerUI.REASON_USER_INTERACTED;
this._getBrowserApp().selectOrOpenTab("about:downloads");
},
get visible() {
let browserApp = this._getBrowserApp();
let downloadsTab = browserApp.getTabWithURL("about:downloads");
return (downloadsTab && downloadsTab == browserApp.selectedTab) ? true : false;
},
getAttention: function getAttention() {
if (this._getBrowserApp().getTabWithURL("about:downloads"))
return;
throw Cr.NS_ERROR_UNEXPECTED;
},
_getBrowserApp: function getBrowserApp() {
try {
return Services.wm.getMostRecentWindow("navigator:browser").BrowserApp;
} catch (e) {
throw Cr.NS_ERROR_FAILURE;
}
},
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDownloadManagerUI])
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DownloadManagerUI]);

View File

@ -51,10 +51,6 @@ contract @mozilla.org/content-permission/prompt;1 {C6E8C44D-9F39-4AF7-BCC0-76E38
component {c1242012-27d8-477e-a0f1-0b098ffc329b} XPIDialogService.js
contract @mozilla.org/addons/web-install-prompt;1 {c1242012-27d8-477e-a0f1-0b098ffc329b}
# DownloadManagerUI.js
component {93db15b1-b408-453e-9a2b-6619e168324a} DownloadManagerUI.js
contract @mozilla.org/download-manager-ui;1 {93db15b1-b408-453e-9a2b-6619e168324a}
# HelperAppDialog.js
component {e9d277a0-268a-4ec2-bb8c-10fdf3e44611} HelperAppDialog.js
contract @mozilla.org/helperapplauncherdialog;1 {e9d277a0-268a-4ec2-bb8c-10fdf3e44611}

View File

@ -17,7 +17,6 @@ EXTRA_COMPONENTS += [
'ColorPicker.js',
'ContentDispatchChooser.js',
'ContentPermissionPrompt.js',
'DownloadManagerUI.js',
'FilePicker.js',
'LoginManagerPrompter.js',
'NSSDialogService.js',

View File

@ -332,8 +332,6 @@
@BINPATH@/components/jsconsole-clhandler.js
@BINPATH@/components/nsHelperAppDlg.manifest
@BINPATH@/components/nsHelperAppDlg.js
@BINPATH@/components/nsDownloadManagerUI.manifest
@BINPATH@/components/nsDownloadManagerUI.js
@BINPATH@/components/NetworkGeolocationProvider.manifest
@BINPATH@/components/NetworkGeolocationProvider.js
@BINPATH@/components/nsSidebar.manifest
@ -607,7 +605,6 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/ContentDispatchChooser.js
@BINPATH@/components/ContentPermissionPrompt.js
@BINPATH@/components/DirectoryProvider.js
@BINPATH@/components/DownloadManagerUI.js
@BINPATH@/components/FilePicker.js
@BINPATH@/components/HelperAppDialog.js
@BINPATH@/components/LoginManagerPrompter.js