From bc8d2f36a9f71e84521056d554632cc7dc39bb96 Mon Sep 17 00:00:00 2001 From: Justin Dolske Date: Thu, 18 Sep 2014 10:01:23 -0700 Subject: [PATCH] Bug 836415 - Kill PFS. r=bsmedberg --- browser/app/profile/firefox.js | 5 - browser/base/content/browser-plugins.js | 150 ---- browser/base/content/browser.js | 2 - browser/base/content/browser.xul | 1 - browser/base/content/tabbrowser.xml | 4 - .../plugins/browser_pluginnotification.js | 33 - .../test/plugins/browser_pluginplaypreview.js | 1 - .../plugins/browser_pluginplaypreview2.js | 1 - browser/components/nsBrowserGlue.js | 6 +- .../en-US/chrome/browser/browser.properties | 7 - browser/modules/PluginContent.jsm | 29 +- browser/themes/linux/browser.css | 8 - browser/themes/linux/jar.mn | 2 - browser/themes/linux/pluginInstall-16.png | Bin 236 -> 0 bytes browser/themes/linux/pluginInstall-64.png | Bin 2196 -> 0 bytes browser/themes/osx/browser.css | 18 - browser/themes/osx/jar.mn | 4 - browser/themes/osx/pluginInstall-16.png | Bin 236 -> 0 bytes browser/themes/osx/pluginInstall-16@2x.png | Bin 426 -> 0 bytes browser/themes/osx/pluginInstall-64.png | Bin 2196 -> 0 bytes browser/themes/osx/pluginInstall-64@2x.png | Bin 4648 -> 0 bytes browser/themes/windows/browser.css | 8 - browser/themes/windows/jar.mn | 4 - browser/themes/windows/pluginInstall-16.png | Bin 236 -> 0 bytes browser/themes/windows/pluginInstall-64.png | Bin 2196 -> 0 bytes mobile/android/locales/jar.mn | 2 - .../global/xpinstall/xpinstall.properties | 95 --- .../en-US/chrome/mozapps/plugins/plugins.dtd | 22 - .../chrome/mozapps/plugins/plugins.properties | 30 - toolkit/locales/jar.mn | 2 - .../content/pluginInstallerDatasource.js | 150 ---- .../plugins/content/pluginInstallerService.js | 299 -------- .../plugins/content/pluginInstallerWizard.css | 9 - .../plugins/content/pluginInstallerWizard.js | 659 ------------------ .../plugins/content/pluginInstallerWizard.xul | 115 --- .../mozapps/plugins/content/pluginProblem.xml | 5 - .../plugins/content/pluginProblemContent.css | 4 - toolkit/mozapps/plugins/jar.mn | 5 - toolkit/mozapps/plugins/moz.build | 4 +- .../plugins/service/PluginFinderService.java | 40 -- .../plugins/service/PluginFinderService.php | 163 ----- .../mozapps/plugins/service/PluginInfo.java | 94 --- toolkit/mozapps/plugins/service/make.sh | 50 -- .../mozapps/plugins/tests/BadExtension.xpi | Bin 152 -> 0 bytes toolkit/mozapps/plugins/tests/BadPlugin.cpp | 4 - .../mozapps/plugins/tests/GoodExtension.xpi | Bin 460 -> 0 bytes toolkit/mozapps/plugins/tests/GoodPlugin.cpp | 4 - toolkit/mozapps/plugins/tests/Makefile.in | 9 - toolkit/mozapps/plugins/tests/browser.ini | 9 - .../plugins/tests/browser_bug435788.js | 461 ------------ toolkit/mozapps/plugins/tests/moz.build | 13 - .../mozapps/plugins/tests/pfs_bug435788_1.rdf | 161 ----- .../mozapps/plugins/tests/pfs_bug435788_2.rdf | 4 - toolkit/themes/windows/mozapps/jar.mn | 2 - 54 files changed, 3 insertions(+), 2695 deletions(-) delete mode 100644 browser/themes/linux/pluginInstall-16.png delete mode 100644 browser/themes/linux/pluginInstall-64.png delete mode 100644 browser/themes/osx/pluginInstall-16.png delete mode 100644 browser/themes/osx/pluginInstall-16@2x.png delete mode 100644 browser/themes/osx/pluginInstall-64.png delete mode 100644 browser/themes/osx/pluginInstall-64@2x.png delete mode 100644 browser/themes/windows/pluginInstall-16.png delete mode 100644 browser/themes/windows/pluginInstall-64.png delete mode 100644 toolkit/locales/en-US/chrome/global/xpinstall/xpinstall.properties delete mode 100644 toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties delete mode 100644 toolkit/mozapps/plugins/content/pluginInstallerDatasource.js delete mode 100644 toolkit/mozapps/plugins/content/pluginInstallerService.js delete mode 100644 toolkit/mozapps/plugins/content/pluginInstallerWizard.css delete mode 100644 toolkit/mozapps/plugins/content/pluginInstallerWizard.js delete mode 100644 toolkit/mozapps/plugins/content/pluginInstallerWizard.xul delete mode 100644 toolkit/mozapps/plugins/service/PluginFinderService.java delete mode 100644 toolkit/mozapps/plugins/service/PluginFinderService.php delete mode 100644 toolkit/mozapps/plugins/service/PluginInfo.java delete mode 100644 toolkit/mozapps/plugins/service/make.sh delete mode 100644 toolkit/mozapps/plugins/tests/BadExtension.xpi delete mode 100644 toolkit/mozapps/plugins/tests/BadPlugin.cpp delete mode 100644 toolkit/mozapps/plugins/tests/GoodExtension.xpi delete mode 100644 toolkit/mozapps/plugins/tests/GoodPlugin.cpp delete mode 100644 toolkit/mozapps/plugins/tests/Makefile.in delete mode 100644 toolkit/mozapps/plugins/tests/browser.ini delete mode 100644 toolkit/mozapps/plugins/tests/browser_bug435788.js delete mode 100644 toolkit/mozapps/plugins/tests/moz.build delete mode 100644 toolkit/mozapps/plugins/tests/pfs_bug435788_1.rdf delete mode 100644 toolkit/mozapps/plugins/tests/pfs_bug435788_2.rdf diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index fe61d8e2688..88d4664e25e 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -664,8 +664,6 @@ pref("plugins.update.notifyUser", false); pref("plugins.click_to_play", true); -pref("plugins.hideMissingPluginsNotification", false); - pref("plugin.default.state", 1); // Plugins bundled in XPIs are enabled by default. @@ -845,9 +843,6 @@ pref("plugin.state.personalplugin", 2); pref("plugin.state.libplugins", 2); #endif -// display door hanger if flash not installed -pref("plugins.notifyMissingFlash", true); - #ifdef XP_MACOSX pref("browser.preferences.animateFadeIn", true); #else diff --git a/browser/base/content/browser-plugins.js b/browser/base/content/browser-plugins.js index 2fd704c13da..f407820266e 100644 --- a/browser/base/content/browser-plugins.js +++ b/browser/base/content/browser-plugins.js @@ -4,8 +4,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. var gPluginHandler = { - PREF_NOTIFY_MISSING_FLASH: "plugins.notifyMissingFlash", - PREF_HIDE_MISSING_PLUGINS_NOTIFICATION: "plugins.hideMissingPluginsNotification", PREF_SESSION_PERSIST_MINUTES: "plugin.sessionPermissionNow.intervalInMinutes", PREF_PERSISTENT_DAYS: "plugin.persistentPermissionAlways.intervalInDays", MESSAGES: [ @@ -93,94 +91,6 @@ var gPluginHandler = { }, #endif - supportedPlugins: { - "mimetypes": { - "application/x-shockwave-flash": "flash", - "application/futuresplash": "flash", - "application/x-java-.*": "java", - "application/x-director": "shockwave", - "application/(sdp|x-(mpeg|rtsp|sdp))": "quicktime", - "audio/(3gpp(2)?|AMR|aiff|basic|mid(i)?|mp4|mpeg|vnd\.qcelp|wav|x-(aiff|m4(a|b|p)|midi|mpeg|wav))": "quicktime", - "image/(pict|png|tiff|x-(macpaint|pict|png|quicktime|sgi|targa|tiff))": "quicktime", - "video/(3gpp(2)?|flc|mp4|mpeg|quicktime|sd-video|x-mpeg)": "quicktime", - "application/x-unknown": "test", - }, - - "plugins": { - "flash": { - "displayName": "Flash", - "installWINNT": true, - "installDarwin": true, - "installLinux": true, - }, - "java": { - "displayName": "Java", - "installWINNT": true, - "installDarwin": true, - "installLinux": true, - }, - "shockwave": { - "displayName": "Shockwave", - "installWINNT": true, - "installDarwin": true, - }, - "quicktime": { - "displayName": "QuickTime", - "installWINNT": true, - }, - "test": { - "displayName": "Test plugin", - "installWINNT": true, - "installLinux": true, - "installDarwin": true, - } - } - }, - - nameForSupportedPlugin: function (aMimeType) { - for (let type in this.supportedPlugins.mimetypes) { - let re = new RegExp(type); - if (re.test(aMimeType)) { - return this.supportedPlugins.mimetypes[type]; - } - } - return null; - }, - - canInstallThisMimeType: function (aMimeType) { - let os = Services.appinfo.OS; - let pluginName = this.nameForSupportedPlugin(aMimeType); - if (pluginName && "install" + os in this.supportedPlugins.plugins[pluginName]) { - return true; - } - return false; - }, - - newPluginInstalled : function(event) { - // browser elements are anonymous so we can't just use target. - var browser = event.originalTarget; - // clear the plugin list, now that at least one plugin has been installed - browser.missingPlugins = null; - - var notificationBox = gBrowser.getNotificationBox(browser); - var notification = notificationBox.getNotificationWithValue("missing-plugins"); - if (notification) - notificationBox.removeNotification(notification); - - // reload the browser to make the new plugin show. - browser.reload(); - }, - - // Callback for user clicking on a missing (unsupported) plugin. - installSinglePlugin: function (pluginInfo) { - var missingPlugins = new Map(); - missingPlugins.set(pluginInfo.mimetype, pluginInfo); - - openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", - "PFSWindow", "chrome,centerscreen,resizable=yes", - {plugins: missingPlugins, browser: gBrowser.selectedBrowser}); - }, - // Callback for user clicking on a disabled plugin managePlugins: function () { BrowserOpenAddonsMgr("addons://list/plugin"); @@ -212,66 +122,6 @@ var gPluginHandler = { openHelpLink("plugin-crashed", false); }, - showInstallNotification: function (browser, pluginInfo) { - let hideMissingPluginsNotification = - Services.prefs.getBoolPref(this.PREF_HIDE_MISSING_PLUGINS_NOTIFICATION); - if (hideMissingPluginsNotification) { - return false; - } - - if (!browser.missingPlugins) - browser.missingPlugins = new Map(); - - browser.missingPlugins.set(pluginInfo.mimetype, pluginInfo); - - // only show notification for small subset of plugins - let mimetype = pluginInfo.mimetype.split(";")[0]; - if (!this.canInstallThisMimeType(mimetype)) - return false; - - let pluginIdentifier = this.nameForSupportedPlugin(mimetype); - if (!pluginIdentifier) - return false; - - let displayName = this.supportedPlugins.plugins[pluginIdentifier].displayName; - - // don't show several notifications - let notification = PopupNotifications.getNotification("plugins-not-found", browser); - if (notification) - return true; - - let messageString = gNavigatorBundle.getString("installPlugin.message"); - let mainAction = { - label: gNavigatorBundle.getFormattedString("installPlugin.button.label", - [displayName]), - accessKey: gNavigatorBundle.getString("installPlugin.button.accesskey"), - callback: function () { - openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul", - "PFSWindow", "chrome,centerscreen,resizable=yes", - {plugins: browser.missingPlugins, browser: browser}); - } - }; - let secondaryActions = null; - let options = { dismissed: true }; - - let showForFlash = Services.prefs.getBoolPref(this.PREF_NOTIFY_MISSING_FLASH); - if (pluginIdentifier == "flash" && showForFlash) { - let prefNotifyMissingFlash = this.PREF_NOTIFY_MISSING_FLASH; - secondaryActions = [{ - label: gNavigatorBundle.getString("installPlugin.ignoreButton.label"), - accessKey: gNavigatorBundle.getString("installPlugin.ignoreButton.accesskey"), - callback: function () { - Services.prefs.setBoolPref(prefNotifyMissingFlash, false); - } - }]; - options.dismissed = false; - } - PopupNotifications.show(browser, "plugins-not-found", - messageString, "plugin-install-notification-icon", - mainAction, secondaryActions, options); - return true; - }, - _clickToPlayNotificationEventCallback: function PH_ctpEventCallback(event) { if (event == "showing") { Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_SHOWN") diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index f217c7b6e30..77f15bd2d4e 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -774,8 +774,6 @@ var gBrowserInit = { gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false); - gBrowser.addEventListener("NewPluginInstalled", gPluginHandler.newPluginInstalled, true); - Services.obs.addObserver(gPluginHandler.pluginCrashed, "plugin-crashed", false); window.addEventListener("AppCommand", HandleAppCommandEvent, true); diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index fc884adce6d..ef1766da985 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -723,7 +723,6 @@ - diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 741baa911d1..b7f829cabe1 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -762,10 +762,6 @@ aLocation.spec != "about:blank")) this.mBrowser.userTypedValue = null; - // Clear out the missing plugins list since it's related to the - // previous location. - this.mBrowser.missingPlugins = null; - if (this.mTabBrowser.isFindBarInitialized(this.mTab)) { let findBar = this.mTabBrowser.getFindBar(this.mTab); diff --git a/browser/base/content/test/plugins/browser_pluginnotification.js b/browser/base/content/test/plugins/browser_pluginnotification.js index 3841727871e..c2d472495cd 100644 --- a/browser/base/content/test/plugins/browser_pluginnotification.js +++ b/browser/base/content/test/plugins/browser_pluginnotification.js @@ -61,7 +61,6 @@ function test() { registerCleanupFunction(function() { clearAllPluginPermissions(); Services.prefs.clearUserPref("extensions.blocklist.suppressUI"); - Services.prefs.clearUserPref("plugins.hideMissingPluginsNotification"); }); Services.prefs.setBoolPref("extensions.blocklist.suppressUI", true); @@ -112,26 +111,16 @@ function runAfterPluginBindingAttached(func) { // Tests a page with an unknown plugin in it. function test1a() { - ok(PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 1a, Should have displayed the missing plugin notification"); - ok(gTestBrowser.missingPlugins, "Test 1a, Should be a missing plugin list"); - ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 1a, Should know about application/x-unknown"); - ok(!gTestBrowser.missingPlugins.has("application/x-test"), "Test 1a, Should not know about application/x-test"); - var pluginNode = gTestBrowser.contentDocument.getElementById("unknown"); ok(pluginNode, "Test 1a, Found plugin in page"); var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent); is(objLoadingContent.pluginFallbackType, Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED, "Test 1a, plugin fallback type should be PLUGIN_UNSUPPORTED"); - Services.prefs.setBoolPref("plugins.hideMissingPluginsNotification", true); prepareTest(runAfterPluginBindingAttached(test1b), gTestRoot + "plugin_unknown.html"); } function test1b() { - ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 1b, Should not have displayed the missing plugin notification"); - ok(!gTestBrowser.missingPlugins, "Test 1b, Should not be a missing plugin list"); - Services.prefs.clearUserPref("plugins.hideMissingPluginsNotification"); - var plugin = getTestPlugin(); ok(plugin, "Test 1b, Should have a test plugin"); plugin.enabledState = Ci.nsIPluginTag.STATE_ENABLED; @@ -140,9 +129,6 @@ function test1b() { // Tests a page with a working plugin in it. function test2() { - ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 2, Should not have displayed the missing plugin notification"); - ok(!gTestBrowser.missingPlugins, "Test 2, Should not be a missing plugin list"); - var plugin = getTestPlugin(); ok(plugin, "Should have a test plugin"); plugin.enabledState = Ci.nsIPluginTag.STATE_DISABLED; @@ -151,9 +137,6 @@ function test2() { // Tests a page with a disabled plugin in it. function test3() { - ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 3, Should not have displayed the missing plugin notification"); - ok(!gTestBrowser.missingPlugins, "Test 3, Should not be a missing plugin list"); - new TabOpenListener("about:addons", test4, prepareTest5); var pluginNode = gTestBrowser.contentDocument.getElementById("test"); @@ -185,7 +168,6 @@ function prepareTest5() { // Tests a page with a blocked plugin in it. function test5() { info("test5"); - ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 5, Should not have displayed the missing plugin notification"); let notification = PopupNotifications.getNotification("click-to-play-plugins"); ok(notification, "Test 5: There should be a plugin notification for blocked plugins"); ok(notification.dismissed, "Test 5: The plugin notification should be dismissed by default"); @@ -194,7 +176,6 @@ function test5() { is(notification.options.pluginData.size, 1, "Test 5: Only the blocked plugin should be present in the notification"); ok(PopupNotifications.panel.firstChild._buttonContainer.hidden, "Part 5: The blocked plugins notification should not have any buttons visible."); - ok(!gTestBrowser.missingPlugins, "Test 5, Should not be a missing plugin list"); var pluginNode = gTestBrowser.contentDocument.getElementById("test"); ok(pluginNode, "Test 5, Found plugin in page"); var objLoadingContent = pluginNode.QueryInterface(Ci.nsIObjectLoadingContent); @@ -205,21 +186,11 @@ function test5() { // Tests a page with a blocked and unknown plugin in it. function test6() { - ok(PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 6, Should have displayed the missing plugin notification"); - ok(gTestBrowser.missingPlugins, "Test 6, Should be a missing plugin list"); - ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 6, Should know about application/x-unknown"); - ok(!gTestBrowser.missingPlugins.has("application/x-test"), "Test 6, application/x-test should not be a missing plugin"); - prepareTest(runAfterPluginBindingAttached(test7), gTestRoot + "plugin_both2.html"); } // Tests a page with a blocked and unknown plugin in it (alternate order to above). function test7() { - ok(PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 7, Should have displayed the missing plugin notification"); - ok(gTestBrowser.missingPlugins, "Test 7, Should be a missing plugin list"); - ok(gTestBrowser.missingPlugins.has("application/x-unknown"), "Test 7, Should know about application/x-unknown"); - ok(!gTestBrowser.missingPlugins.has("application/x-test"), "Test 7, application/x-test should not be a missing plugin"); - var plugin = getTestPlugin(); plugin.enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY; getTestPlugin("Second Test Plug-in").enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY; @@ -231,8 +202,6 @@ function test7() { // Tests a page with a working plugin that is click-to-play function test8() { - ok(!PopupNotifications.getNotification("plugins-not-found", gTestBrowser), "Test 8, Should not have displayed the missing plugin notification"); - ok(!gTestBrowser.missingPlugins, "Test 8, Should not be a missing plugin list"); ok(PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser), "Test 8, Should have a click-to-play notification"); var pluginNode = gTestBrowser.contentDocument.getElementById("test"); @@ -349,8 +318,6 @@ function test15() { function test17() { var clickToPlayNotification = PopupNotifications.getNotification("click-to-play-plugins", gTestBrowser); ok(clickToPlayNotification, "Test 17, Should have a click-to-play notification"); - var missingNotification = PopupNotifications.getNotification("missing-plugins", gTestBrowser); - ok(!missingNotification, "Test 17, Should not have a missing plugin notification"); setAndUpdateBlocklist(gHttpTestRoot + "blockPluginVulnerableUpdatable.xml", function() { diff --git a/browser/base/content/test/plugins/browser_pluginplaypreview.js b/browser/base/content/test/plugins/browser_pluginplaypreview.js index 0e963e152c4..bd0c1512918 100644 --- a/browser/base/content/test/plugins/browser_pluginplaypreview.js +++ b/browser/base/content/test/plugins/browser_pluginplaypreview.js @@ -188,7 +188,6 @@ function prepareTest(nextTest, url, skip) { // Tests a page with normal play preview registration (1/2) function test1a() { var notificationBox = gBrowser.getNotificationBox(gTestBrowser); - ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 1a, Should not have displayed the missing plugin notification"); ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 1a, Should not have displayed the blocked plugin notification"); var pluginInfo = getTestPlugin(); diff --git a/browser/base/content/test/plugins/browser_pluginplaypreview2.js b/browser/base/content/test/plugins/browser_pluginplaypreview2.js index 07d8185f124..a5dc6b8da41 100644 --- a/browser/base/content/test/plugins/browser_pluginplaypreview2.js +++ b/browser/base/content/test/plugins/browser_pluginplaypreview2.js @@ -90,7 +90,6 @@ function prepareTest(nextTest, url, skip) { // Tests a page with normal play preview registration (1/2) function test1a() { var notificationBox = gBrowser.getNotificationBox(gTestBrowser); - ok(!notificationBox.getNotificationWithValue("missing-plugins"), "Test 1a, Should not have displayed the missing plugin notification"); ok(!notificationBox.getNotificationWithValue("blocked-plugins"), "Test 1a, Should not have displayed the blocked plugin notification"); var pluginInfo = getTestPlugin(); diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 53e3fe4957b..2d0f7ddbbba 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -1480,11 +1480,7 @@ BrowserGlue.prototype = { } if (currentUIVersion < 13) { - try { - if (Services.prefs.getBoolPref("plugins.hide_infobar_for_missing_plugin")) - Services.prefs.setBoolPref("plugins.notifyMissingFlash", false); - } - catch (ex) {} + /* Obsolete */ } if (currentUIVersion < 14) { diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties index f9671875b3a..b16bb7ea006 100644 --- a/browser/locales/en-US/chrome/browser/browser.properties +++ b/browser/locales/en-US/chrome/browser/browser.properties @@ -103,13 +103,6 @@ popupShowPopupPrefix=Show '%S' badContentBlocked.blocked.message=%S is blocking content on this page. badContentBlocked.notblocked.message=%S is not blocking any content on this page. -# missing plugin installer -installPlugin.message = Would you like to install the plugin needed to display the media on this page? -installPlugin.button.label=Install %S -installPlugin.button.accesskey=I -installPlugin.ignoreButton.label=Don't ask again -installPlugin.ignoreButton.accesskey=N - crashedpluginsMessage.title=The %S plugin has crashed. crashedpluginsMessage.reloadButton.label=Reload page crashedpluginsMessage.reloadButton.accesskey=R diff --git a/browser/modules/PluginContent.jsm b/browser/modules/PluginContent.jsm index f58ab2f95d8..ba021a8de26 100644 --- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -333,20 +333,7 @@ PluginContent.prototype = { break; case "PluginNotFound": { - let installable = this.showInstallNotification(plugin, eventType); - let contentWindow = plugin.ownerDocument.defaultView; - // For non-object plugin tags, register a click handler to install the - // plugin. Object tags can, and often do, deal with that themselves, - // so don't stomp on the page developers toes. - if (installable && !(plugin instanceof contentWindow.HTMLObjectElement)) { - let installStatus = this.getPluginUI(plugin, "installStatus"); - installStatus.setAttribute("installable", "true"); - let iconStatus = this.getPluginUI(plugin, "icon"); - iconStatus.setAttribute("installable", "true"); - - let installLink = this.getPluginUI(plugin, "installPluginLink"); - this.addLinkClickCallback(installLink, "installSinglePlugin", plugin); - } + /* NOP */ break; } @@ -471,13 +458,6 @@ PluginContent.prototype = { objLoadingContent.cancelPlayPreview(); }, - // Callback for user clicking on a missing (unsupported) plugin. - installSinglePlugin: function (plugin) { - this.global.sendAsyncMessage("PluginContent:InstallSinglePlugin", { - pluginInfo: this._getPluginInfo(plugin), - }); - }, - // Forward a link click callback to the chrome process. forwardCallback: function (name) { this.global.sendAsyncMessage("PluginContent:LinkClickCallback", { name: name }); @@ -506,13 +486,6 @@ PluginContent.prototype = { this.global.content.location.reload(); }, - showInstallNotification: function (plugin) { - let [shown] = this.global.sendSyncMessage("PluginContent:ShowInstallNotification", { - pluginInfo: this._getPluginInfo(plugin), - }); - return shown; - }, - // Event listener for click-to-play plugins. _handleClickToPlayEvent: function (plugin) { let doc = plugin.ownerDocument; diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 0c61880830f..9b09a5e090e 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -1132,10 +1132,6 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { list-style-image: url(chrome://mozapps/skin/plugins/pluginBlocked-64.png); } -.popup-notification-icon[popupid="plugins-not-found"] { - list-style-image: url(chrome://browser/skin/pluginInstall-64.png); -} - .popup-notification-icon[popupid="web-notifications"] { list-style-image: url(chrome://browser/skin/notification-64.png); } @@ -1301,10 +1297,6 @@ toolbarbutton[sdk-button="true"][cui-areatype="toolbar"] > .toolbarbutton-icon { -moz-image-region: rect(0, 48px, 16px, 32px); } -#plugin-install-notification-icon { - list-style-image: url(chrome://browser/skin/pluginInstall-16.png); -} - #notification-popup-box[hidden] { /* Override display:none to make the pluginBlockedNotification animation work when showing the notification repeatedly. */ diff --git a/browser/themes/linux/jar.mn b/browser/themes/linux/jar.mn index 85a6e66c04e..2aaac1a2c99 100644 --- a/browser/themes/linux/jar.mn +++ b/browser/themes/linux/jar.mn @@ -54,8 +54,6 @@ browser.jar: * skin/classic/browser/pageInfo.css skin/classic/browser/pageInfo.png skin/classic/browser/page-livemarks.png - skin/classic/browser/pluginInstall-16.png - skin/classic/browser/pluginInstall-64.png skin/classic/browser/pointerLock-16.png skin/classic/browser/pointerLock-64.png skin/classic/browser/Privacy-16.png diff --git a/browser/themes/linux/pluginInstall-16.png b/browser/themes/linux/pluginInstall-16.png deleted file mode 100644 index a72a2839c99b5ff619a7cf83d5fb196f1edf5864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 236 zcmVA9975>iL_x$WoXax#m_ zos;j}Gv|CW*A|l4$&gQe>S63;$dTv2hMf$99gYfeaDDDt0-y$<4?u$ANCB(?SUvpt zC(|wP)m;FT{GlhFI9jXq9|n+!K+pk_^1uVb=K)}T{_a^3A!2|80i>&|E7$+>)>~Hq zEOqNE-(SA3UIWlSFi<}{J$-)iu}2?~7Lb7eL4brM$4FwsHYN!H^pB42xp&_AC(oWa zO8~#u0QBe!RDWIgDiVM`V~mW9?3dN`6bcbXo)*@&EKSjDS=wxFjH!hsK_y@ej7cCZ zOOgb8AO5tM7688 z*KrVlTi~m=H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DwUyK@hB17?WUf z>LlLy?Qisl88I?4q9O-LrHW?ZHy@>a$5{ffQ2_kW&>$estRy(@WbsS@K@klC#>XeL zBfwgs*=!c1RgPaEv1mWQnXD7zKe)u8|Z5*!Cs_5+8=v0DsE)g{5IPP9q29JQw>c(VqqI zK7f_53# .toolbarbutton-menu-dropmarker { } } -#plugin-install-notification-icon { - list-style-image: url(chrome://browser/skin/pluginInstall-16.png); -} -@media (min-resolution: 2dppx) { - #plugin-install-notification-icon { - list-style-image: url(chrome://browser/skin/pluginInstall-16@2x.png); - } -} - #notification-popup-box[hidden] { /* Override display:none to make the pluginBlockedNotification animation work when showing the notification repeatedly. */ @@ -3974,15 +3965,6 @@ menulist.translate-infobar-element > .menulist-dropmarker { list-style-image: url(chrome://mozapps/skin/plugins/pluginBlocked-64.png); } -.popup-notification-icon[popupid="plugins-not-found"] { - list-style-image: url(chrome://browser/skin/pluginInstall-64.png); -} -@media (min-resolution: 2dppx) { - .popup-notification-icon[popupid="plugins-not-found"] { - list-style-image: url(chrome://browser/skin/pluginInstall-64\@2x.png); - } -} - .addon-progress-description { width: 350px; max-width: 350px; diff --git a/browser/themes/osx/jar.mn b/browser/themes/osx/jar.mn index 58a15d311ac..887d6fa66d7 100644 --- a/browser/themes/osx/jar.mn +++ b/browser/themes/osx/jar.mn @@ -82,10 +82,6 @@ browser.jar: skin/classic/browser/page-livemarks.png skin/classic/browser/page-livemarks@2x.png skin/classic/browser/pageInfo.css - skin/classic/browser/pluginInstall-16.png - skin/classic/browser/pluginInstall-16@2x.png - skin/classic/browser/pluginInstall-64.png - skin/classic/browser/pluginInstall-64@2x.png skin/classic/browser/pointerLock-16.png skin/classic/browser/pointerLock-16@2x.png skin/classic/browser/pointerLock-64.png diff --git a/browser/themes/osx/pluginInstall-16.png b/browser/themes/osx/pluginInstall-16.png deleted file mode 100644 index a72a2839c99b5ff619a7cf83d5fb196f1edf5864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 236 zcmVrj9MOTzcS zfF-SVoUunDXNW7g9hHs~56j4$u%$%)^2x&=>{(`gX0LkH%rBo|Vay|FQpWIS^=)Yb z8NU0=E^A(UZR)pNSZ_La-*IKL*}Ts_TdGawta!FHS1*l0sq2DSxqN{1f##H??vj7{ zY%F4|AQ;E3!v%p?XWnW!aVMYI%SnmVV%tw2IPl z4;1YbF_E|t$-JQL`h4kKIR}z93YciDSp9jC(!;InRrxPAF;>pwR*G5aF3YHJ^|zj= zpsiVg*=$awsaL}NTx;$w&Q59Pec-?1z{762m0Bw|)oRIBN>50gdEn*jxD1E+=hpB( zXl_zals1s-X9c?VVup&x3APWGzCaJjZ)MC~dE#{%+nxWi{~6dEGgWpKPtFI%0fVQj KpUXO@geCxN#HjxO diff --git a/browser/themes/osx/pluginInstall-64.png b/browser/themes/osx/pluginInstall-64.png deleted file mode 100644 index 6a41aa05963f69c5edcee028d34443ab3e1a31f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2196 zcmV;F2y6F=P)A9975>iL_x$WoXax#m_ zos;j}Gv|CW*A|l4$&gQe>S63;$dTv2hMf$99gYfeaDDDt0-y$<4?u$ANCB(?SUvpt zC(|wP)m;FT{GlhFI9jXq9|n+!K+pk_^1uVb=K)}T{_a^3A!2|80i>&|E7$+>)>~Hq zEOqNE-(SA3UIWlSFi<}{J$-)iu}2?~7Lb7eL4brM$4FwsHYN!H^pB42xp&_AC(oWa zO8~#u0QBe!RDWIgDiVM`V~mW9?3dN`6bcbXo)*@&EKSjDS=wxFjH!hsK_y@ej7cCZ zOOgb8AO5tM7688 z*KrVlTi~m=HYg|;qPDfZJSre^F*G>zLjdC_f_OcETj|T=V<9BS$Nb&9=TQ{#dZ%Se zeR&vyxPE;uX<5Bx!!3L8zXo8pB*r$IO_XK2p02AtJ|bVA=1hTU%S}%5*(l*ZKG;e0?|brcR9OGO zljqKzJ^tCpKT~yW2vUA+#>`KDq*7Pye~y`-Z1|#=(fI4ze_KCy?z{!?I{-_SK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;`F&$nn8Q ze?Jl>52S-n36_j&7JmTtaQ&ksc~FudZJD4TgFhrNrVpp=ok8afE!fXr?;&9czQHyB z>R_u0`T!?PFA(~8kNSxq0C#8s|FL%fpVep$GmQQj76~G7gxff0WRxBt*i1KR$#x=)K zu=|NeSHUXrr+Y{R-VmacV%7*?5q(%QP;Hb$JE$niH59CYNBZSkzkqGC+dnV^MBfen zsyX=OTW>K=q!fMN8$u!?)d8qA7Eb^B+k5ZcKQ*&;Tl|I&sMP+36Q1Sd2l=JbKmHW} zAY;oIyM}^0dKJvi^m_MC{m;2q7S6qLrbbF()=^$QchlI|AAsH9^5Wv(VGtCcNwNIO z&ex}W5PZ7`vK)&g-we_OBn?v!~W-we}$5DAsD2wV$s5gsNaLf*^HB3W5y`ekD@7M@dkOxzzxY z1RMv~Py1il0aoo>@C^YRB&g&%BSHec5xnQV->Co?VhJh$Dgsne5ulP`6&zN7zDg<$ eP)S9AYWsh$&}EK;5N diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index c3288852049..4d9ecc8e4fb 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -2142,10 +2142,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { list-style-image: url(chrome://mozapps/skin/plugins/pluginBlocked-64.png); } -.popup-notification-icon[popupid="plugins-not-found"] { - list-style-image: url(chrome://browser/skin/pluginInstall-64.png); -} - .popup-notification-icon[popupid="web-notifications"] { list-style-image: url(chrome://browser/skin/notification-64.png); } @@ -2313,10 +2309,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { -moz-image-region: rect(0, 48px, 16px, 32px); } -#plugin-install-notification-icon { - list-style-image: url(chrome://browser/skin/pluginInstall-16.png); -} - #notification-popup-box[hidden] { /* Override display:none to make the pluginBlockedNotification animation work when showing the notification repeatedly. */ diff --git a/browser/themes/windows/jar.mn b/browser/themes/windows/jar.mn index d707c4d42c6..434cca7f29b 100644 --- a/browser/themes/windows/jar.mn +++ b/browser/themes/windows/jar.mn @@ -64,8 +64,6 @@ browser.jar: skin/classic/browser/pageInfo.css skin/classic/browser/pageInfo.png skin/classic/browser/page-livemarks.png (feeds/feedIcon16.png) - skin/classic/browser/pluginInstall-16.png - skin/classic/browser/pluginInstall-64.png skin/classic/browser/pointerLock-16.png skin/classic/browser/pointerLock-64.png skin/classic/browser/Privacy-16.png @@ -487,8 +485,6 @@ browser.jar: skin/classic/aero/browser/pageInfo.css skin/classic/aero/browser/pageInfo.png (pageInfo-aero.png) skin/classic/aero/browser/page-livemarks.png (feeds/feedIcon16-aero.png) - skin/classic/aero/browser/pluginInstall-16.png - skin/classic/aero/browser/pluginInstall-64.png skin/classic/aero/browser/pointerLock-16.png skin/classic/aero/browser/pointerLock-64.png skin/classic/aero/browser/Privacy-16.png (Privacy-16-aero.png) diff --git a/browser/themes/windows/pluginInstall-16.png b/browser/themes/windows/pluginInstall-16.png deleted file mode 100644 index a72a2839c99b5ff619a7cf83d5fb196f1edf5864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 236 zcmVA9975>iL_x$WoXax#m_ zos;j}Gv|CW*A|l4$&gQe>S63;$dTv2hMf$99gYfeaDDDt0-y$<4?u$ANCB(?SUvpt zC(|wP)m;FT{GlhFI9jXq9|n+!K+pk_^1uVb=K)}T{_a^3A!2|80i>&|E7$+>)>~Hq zEOqNE-(SA3UIWlSFi<}{J$-)iu}2?~7Lb7eL4brM$4FwsHYN!H^pB42xp&_AC(oWa zO8~#u0QBe!RDWIgDiVM`V~mW9?3dN`6bcbXo)*@&EKSjDS=wxFjH!hsK_y@ej7cCZ zOOgb8AO5tM7688 z*KrVlTi~m=HYg|;qPDfZJSre^F*G>zLjdC_f_OcETj|T=V<9BS$Nb&9=TQ{#dZ%Se zeR&vyxPE;uX<5Bx!!3L8zXo8pB*r$IO_XK2p02AtJ|bVA=1hTU%S}%5*(l*ZKG;e0?|brcR9OGO zljqKzJ^tCpKT~yW2vUA+#>`KDq*7Pye~y`-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- - - - - - - @@ -40,7 +19,6 @@ - diff --git a/toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties b/toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties deleted file mode 100644 index 144014cb3ba..00000000000 --- a/toolkit/locales/en-US/chrome/mozapps/plugins/plugins.properties +++ /dev/null @@ -1,30 +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/. - -pluginLicenseAgreement.label=To install %S, you need to agree to the following: - -pluginInstallation.download.start=Downloading %S… -pluginInstallation.download.finish=Finished downloading %S. - -pluginInstallation.install.start=Installing %S… -pluginInstallation.install.finish=Successfully installed %S. -pluginInstallation.install.error=Failed to install %S (%S). - -pluginInstallation.complete=Finished installing plugins. - -pluginInstallationSummary.success=Installed -pluginInstallationSummary.failed=Failed -pluginInstallationSummary.licenseNotAccepted=License not accepted -pluginInstallationSummary.notAvailable=Not Available -pluginInstallationSummary.manualInstall.label=Manual Install -pluginInstallationSummary.manualInstall.tooltip=Manually install the plugin. - -pluginInstallation.noPluginsFound=No suitable plugins were found. -pluginInstallation.noPluginsInstalled=No plugins were installed. -pluginInstallation.unknownPlugin=Unknown Plugin (%S) - -pluginInstallation.restart.label=Restart %S -pluginInstallation.restart.accesskey=R -pluginInstallation.close.label=Close -pluginInstallation.close.accesskey=C diff --git a/toolkit/locales/jar.mn b/toolkit/locales/jar.mn index 0d4377fb5dc..d03a6fafd66 100644 --- a/toolkit/locales/jar.mn +++ b/toolkit/locales/jar.mn @@ -72,7 +72,6 @@ locale/@AB_CD@/global/webapps.properties (%chrome/global/webapps.properties) locale/@AB_CD@/global/wizard.dtd (%chrome/global/wizard.dtd) locale/@AB_CD@/global/wizard.properties (%chrome/global/wizard.properties) - locale/@AB_CD@/global/xpinstall/xpinstall.properties (%chrome/global/xpinstall/xpinstall.properties) locale/@AB_CD@/global/crashes.dtd (%crashreporter/crashes.dtd) locale/@AB_CD@/global/crashes.properties (%crashreporter/crashes.properties) % locale global-region @AB_CD@ %locale/@AB_CD@/global-region/ @@ -103,7 +102,6 @@ locale/@AB_CD@/mozapps/handling/handling.dtd (%chrome/mozapps/handling/handling.dtd) locale/@AB_CD@/mozapps/handling/handling.properties (%chrome/mozapps/handling/handling.properties) locale/@AB_CD@/mozapps/plugins/plugins.dtd (%chrome/mozapps/plugins/plugins.dtd) - locale/@AB_CD@/mozapps/plugins/plugins.properties (%chrome/mozapps/plugins/plugins.properties) locale/@AB_CD@/mozapps/preferences/changemp.dtd (%chrome/mozapps/preferences/changemp.dtd) locale/@AB_CD@/mozapps/preferences/removemp.dtd (%chrome/mozapps/preferences/removemp.dtd) locale/@AB_CD@/mozapps/preferences/preferences.properties (%chrome/mozapps/preferences/preferences.properties) diff --git a/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js b/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js deleted file mode 100644 index dc1535a9640..00000000000 --- a/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js +++ /dev/null @@ -1,150 +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 PFS_NS = "http://www.mozilla.org/2004/pfs-rdf#"; - -function nsRDFItemUpdater(aClientOS, aChromeLocale) { - this._rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"] - .getService(Components.interfaces.nsIRDFService); - this._os = Components.classes["@mozilla.org/observer-service;1"] - .getService(Components.interfaces.nsIObserverService); - - var app = Components.classes["@mozilla.org/xre/app-info;1"] - .getService(Components.interfaces.nsIXULAppInfo); - this.appID = app.ID; - this.buildID = app.platformBuildID; - this.appRelease = app.version; - - this.clientOS = aClientOS; - this.chromeLocale = aChromeLocale; - - var prefBranch = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - this.dsURI = prefBranch.getCharPref("pfs.datasource.url"); -} - -nsRDFItemUpdater.prototype = { - checkForPlugin: function (aPluginRequestItem) { - var dsURI = this.dsURI; - // escape the mimetype as mimetypes can contain '+', which will break pfs. - dsURI = dsURI.replace(/%PLUGIN_MIMETYPE%/g, encodeURIComponent(aPluginRequestItem.mimetype)); - dsURI = dsURI.replace(/%APP_ID%/g, this.appID); - dsURI = dsURI.replace(/%APP_VERSION%/g, this.buildID); - dsURI = dsURI.replace(/%APP_RELEASE%/g, this.appRelease); - dsURI = dsURI.replace(/%CLIENT_OS%/g, this.clientOS); - dsURI = dsURI.replace(/%CHROME_LOCALE%/g, this.chromeLocale); - - var ds = this._rdfService.GetDataSource(dsURI); - var rds = ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource) - if (rds.loaded) - this.onDatasourceLoaded(ds, aPluginRequestItem); - else { - var sink = ds.QueryInterface(Components.interfaces.nsIRDFXMLSink); - sink.addXMLSinkObserver(new nsPluginXMLRDFDSObserver(this, aPluginRequestItem)); - } - }, - - onDatasourceLoaded: function pfs_onDatasourceLoaded (aDatasource, aPluginRequestItem) { - var container = Components.classes["@mozilla.org/rdf/container;1"] - .createInstance(Components.interfaces.nsIRDFContainer); - var resultRes = this._rdfService.GetResource("urn:mozilla:plugin-results:" + aPluginRequestItem.mimetype); - var pluginList = aDatasource.GetTarget(resultRes, this._rdfService.GetResource(PFS_NS+"plugins"), true); - - var pluginInfo = null; - - try { - container.Init(aDatasource, pluginList); - - var children = container.GetElements(); - var target; - - // get the first item - var child = children.getNext(); - if (child instanceof Components.interfaces.nsIRDFResource) { - var name = this._rdfService.GetResource("http://www.mozilla.org/2004/pfs-rdf#updates"); - target = aDatasource.GetTarget(child, name, true); - } - - try { - container.Init(aDatasource, target); - target = null; - children = container.GetElements(); - - var child = children.getNext(); - if (child instanceof Components.interfaces.nsIRDFResource) { - target = child; - } - - var rdfs = this._rdfService; - - function getPFSValueFromRDF(aValue) { - var rv = null; - - var myTarget = aDatasource.GetTarget(target, rdfs.GetResource(PFS_NS + aValue), true); - if (myTarget) - rv = myTarget.QueryInterface(Components.interfaces.nsIRDFLiteral).Value; - - return rv; - } - - pluginInfo = { - name: getPFSValueFromRDF("name"), - pid: getPFSValueFromRDF("guid"), - version: getPFSValueFromRDF("version"), - IconUrl: getPFSValueFromRDF("IconUrl"), - InstallerLocation: getPFSValueFromRDF("InstallerLocation"), - InstallerHash: getPFSValueFromRDF("InstallerHash"), - XPILocation: getPFSValueFromRDF("XPILocation"), - XPIHash: getPFSValueFromRDF("XPIHash"), - InstallerShowsUI: getPFSValueFromRDF("InstallerShowsUI"), - manualInstallationURL: getPFSValueFromRDF("manualInstallationURL"), - requestedMimetype: getPFSValueFromRDF("requestedMimetype"), - licenseURL: getPFSValueFromRDF("licenseURL"), - needsRestart: getPFSValueFromRDF("needsRestart") - }; - } - catch (ex) { - Components.utils.reportError(ex); - } - } - catch (ex) { - Components.utils.reportError(ex); - } - - gPluginInstaller.pluginInfoReceived(aPluginRequestItem, pluginInfo); - }, - - onDatasourceError: function pfs_onDatasourceError (aPluginRequestItem, aError) { - this._os.notifyObservers(aPluginRequestItem, "error", aError); - Components.utils.reportError(aError); - gPluginInstaller.pluginInfoReceived(aPluginRequestItem, null); - } -}; - -function nsPluginXMLRDFDSObserver(aUpdater, aPluginRequestItem) { - this._updater = aUpdater; - this._item = aPluginRequestItem; -} - -nsPluginXMLRDFDSObserver.prototype = -{ - _updater : null, - _item : null, - - // nsIRDFXMLSinkObserver - onBeginLoad: function(aSink) {}, - onInterrupt: function(aSink) {}, - onResume: function(aSink) {}, - onEndLoad: function(aSink) { - aSink.removeXMLSinkObserver(this); - - var ds = aSink.QueryInterface(Components.interfaces.nsIRDFDataSource); - this._updater.onDatasourceLoaded(ds, this._item); - }, - - onError: function(aSink, aStatus, aErrorMsg) { - aSink.removeXMLSinkObserver(this); - this._updater.onDatasourceError(this._item, aStatus.toString()); - } -}; diff --git a/toolkit/mozapps/plugins/content/pluginInstallerService.js b/toolkit/mozapps/plugins/content/pluginInstallerService.js deleted file mode 100644 index 88285fdad19..00000000000 --- a/toolkit/mozapps/plugins/content/pluginInstallerService.js +++ /dev/null @@ -1,299 +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/. */ - -Components.utils.import("resource://gre/modules/AddonManager.jsm"); - -const DOWNLOAD_STARTED = 0; -const DOWNLOAD_FINISHED = 1; -const INSTALL_STARTED = 2; -const INSTALL_FINISHED = 3; -const INSTALLS_COMPLETE = 4; - -function getLocalizedError(key) -{ - return document.getElementById("xpinstallStrings").getString(key); -} - -function binaryToHex(input) -{ - return [('0' + input.charCodeAt(i).toString(16)).slice(-2) - for (i in input)].join(''); -} - -function verifyHash(aFile, aHash) -{ - try { - var [, method, hash] = /^([A-Za-z0-9]+):(.*)$/.exec(aHash); - - var fis = Components.classes['@mozilla.org/network/file-input-stream;1']. - createInstance(Components.interfaces.nsIFileInputStream); - fis.init(aFile, -1, -1, 0); - - var hasher = Components.classes['@mozilla.org/security/hash;1']. - createInstance(Components.interfaces.nsICryptoHash); - hasher.initWithString(method); - hasher.updateFromStream(fis, -1); - dlhash = binaryToHex(hasher.finish(false)); - return dlhash == hash; - } - catch (e) { - Components.utils.reportError(e); - return false; - } -} - -function InstallerObserver(aPlugin) -{ - this._plugin = aPlugin; - this._init(); -} - -InstallerObserver.prototype = { - _init: function() - { - try { - var ios = Components.classes["@mozilla.org/network/io-service;1"]. - getService(Components.interfaces.nsIIOService); - var uri = ios.newURI(this._plugin.InstallerLocation, null, null); - uri.QueryInterface(Components.interfaces.nsIURL); - - // Use a local filename appropriate for the OS - var leafName = uri.fileName; - var os = Components.classes["@mozilla.org/xre/app-info;1"] - .getService(Components.interfaces.nsIXULRuntime) - .OS; - if (os == "WINNT" && leafName.indexOf(".") < 0) - leafName += ".exe"; - - var dirs = Components.classes["@mozilla.org/file/directory_service;1"]. - getService(Components.interfaces.nsIProperties); - - var resultFile = dirs.get("TmpD", Components.interfaces.nsIFile); - resultFile.append(leafName); - resultFile.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, - 0770); - - var channel = ios.newChannelFromURI(uri); - this._downloader = - Components.classes["@mozilla.org/network/downloader;1"]. - createInstance(Components.interfaces.nsIDownloader); - this._downloader.init(this, resultFile); - channel.notificationCallbacks = this; - - this._fireNotification(DOWNLOAD_STARTED, null); - - channel.asyncOpen(this._downloader, null); - } - catch (e) { - Components.utils.reportError(e); - this._fireNotification(INSTALL_FINISHED, getLocalizedError("error-228")); - if (resultFile && resultFile.exists()) - resultfile.remove(false); - } - }, - - /** - * Inform the gPluginInstaller about what's going on. - */ - _fireNotification: function(aStatus, aErrorMsg) - { - gPluginInstaller.pluginInstallationProgress(this._plugin.pid, - aStatus, aErrorMsg); - - if (aStatus == INSTALL_FINISHED) { - --PluginInstallService._installersPending; - PluginInstallService._fireFinishedNotification(); - } - }, - - QueryInterface: function(iid) - { - if (iid.equals(Components.interfaces.nsISupports) || - iid.equals(Components.interfaces.nsIInterfaceRequestor) || - iid.equals(Components.interfaces.nsIDownloadObserver) || - iid.equals(Components.interfaces.nsIProgressEventSink)) - return this; - - throw Components.results.NS_ERROR_NO_INTERFACE; - }, - - getInterface: function(iid) - { - if (iid.equals(Components.interfaces.nsIProgressEventSink)) - return this; - - return null; - }, - - onDownloadComplete: function(downloader, request, ctxt, status, result) - { - if (!Components.isSuccessCode(status)) { - // xpinstall error 228 is "Download Error" - this._fireNotification(INSTALL_FINISHED, getLocalizedError("error-228")); - result.remove(false); - return; - } - - this._fireNotification(DOWNLOAD_FINISHED); - - if (this._plugin.InstallerHash && - !verifyHash(result, this._plugin.InstallerHash)) { - // xpinstall error 261 is "Invalid file hash..." - this._fireNotification(INSTALL_FINISHED, getLocalizedError("error-261")); - result.remove(false); - return; - } - - this._fireNotification(INSTALL_STARTED); - - result.QueryInterface(Components.interfaces.nsILocalFile); - try { - // Make sure the file is executable - result.permissions = 0770; - var process = Components.classes["@mozilla.org/process/util;1"] - .createInstance(Components.interfaces.nsIProcess); - process.init(result); - var self = this; - process.runAsync([], 0, { - observe: function(subject, topic, data) { - if (topic != "process-finished") { - Components.utils.reportError("Failed to launch installer"); - self._fireNotification(INSTALL_FINISHED, - getLocalizedError("error-207")); - } - else if (process.exitValue != 0) { - Components.utils.reportError("Installer returned exit code " + process.exitValue); - self._fireNotification(INSTALL_FINISHED, - getLocalizedError("error-203")); - } - else { - self._fireNotification(INSTALL_FINISHED, null); - } - result.remove(false); - } - }); - } - catch (e) { - Components.utils.reportError(e); - this._fireNotification(INSTALL_FINISHED, getLocalizedError("error-207")); - result.remove(false); - } - }, - - onProgress: function(aRequest, aContext, aProgress, aProgressMax) - { - gPluginInstaller.pluginInstallationProgressMeter(this._plugin.pid, - aProgress, - aProgressMax); - }, - - onStatus: function(aRequest, aContext, aStatus, aStatusArg) - { - /* pass */ - } -}; - -var PluginInstallService = { - - /** - * Start installation of installers and XPI plugins. - * @param aInstallerPlugins An array of objects which should have the - * properties "pid", "InstallerLocation", - * and "InstallerHash" - * @param aXPIPlugins An array of objects which should have the - * properties "pid", "XPILocation", - * and "XPIHash" - */ - startPluginInstallation: function (aInstallerPlugins, - aXPIPlugins) - { - this._xpiPlugins = aXPIPlugins; - this._xpisPending = aXPIPlugins.length; - - aXPIPlugins.forEach(function(plugin) { - AddonManager.getInstallForURL(plugin.XPILocation, function(install) { - install.addListener(PluginInstallService); - install.install(); - }, "application/x-xpinstall", plugin.XPIHash); - }); - - // InstallerObserver may finish immediately so we must initialise the - // installers after setting the number of installers and xpis pending - this._installersPending = aInstallerPlugins.length; - this._installerPlugins = [new InstallerObserver(plugin) - for each (plugin in aInstallerPlugins)]; - }, - - _fireFinishedNotification: function() - { - if (this._installersPending == 0 && this._xpisPending == 0) - gPluginInstaller.pluginInstallationProgress(null, INSTALLS_COMPLETE, null); - }, - - getPidForInstall: function(install) { - for (let i = 0; i < this._xpiPlugins.length; i++) { - if (install.sourceURI.spec == this._xpiPlugins[i].XPILocation) - return this._xpiPlugins[i].pid; - } - return -1; - }, - - // InstallListener interface - onDownloadStarted: function(install) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgress(pid, DOWNLOAD_STARTED, null); - }, - - onDownloadProgress: function(install) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgressMeter(pid, install.progress, - install.maxProgress); - }, - - onDownloadEnded: function(install) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgress(pid, DOWNLOAD_FINISHED, null); - }, - - onDownloadFailed: function(install) { - var pid = this.getPidForInstall(install); - switch (install.error) { - case AddonManager.ERROR_NETWORK_FAILURE: - var errorMsg = getLocalizedError("error-228"); - break; - case AddonManager.ERROR_INCORRECT_HASH: - var errorMsg = getLocalizedError("error-261"); - break; - case AddonManager.ERROR_CORRUPT_FILE: - var errorMsg = getLocalizedError("error-207"); - break; - } - gPluginInstaller.pluginInstallationProgress(pid, INSTALL_FINISHED, errorMsg); - - this._xpisPending--; - this._fireFinishedNotification(); - }, - - onInstallStarted: function(install) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgress(pid, INSTALL_STARTED, null); - }, - - onInstallEnded: function(install, addon) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgress(pid, INSTALL_FINISHED, null); - - this._xpisPending--; - this._fireFinishedNotification(); - }, - - onInstallFailed: function(install) { - var pid = this.getPidForInstall(install); - gPluginInstaller.pluginInstallationProgress(pid, INSTALL_FINISHED, - getLocalizedError("error-203")); - - this._xpisPending--; - this._fireFinishedNotification(); - } -} diff --git a/toolkit/mozapps/plugins/content/pluginInstallerWizard.css b/toolkit/mozapps/plugins/content/pluginInstallerWizard.css deleted file mode 100644 index cc93118716a..00000000000 --- a/toolkit/mozapps/plugins/content/pluginInstallerWizard.css +++ /dev/null @@ -1,9 +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/. */ - - -.wizard-header-description { - display: none; -} - diff --git a/toolkit/mozapps/plugins/content/pluginInstallerWizard.js b/toolkit/mozapps/plugins/content/pluginInstallerWizard.js deleted file mode 100644 index 9271f5b988b..00000000000 --- a/toolkit/mozapps/plugins/content/pluginInstallerWizard.js +++ /dev/null @@ -1,659 +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/. */ - -function nsPluginInstallerWizard(){ - - // create the request array - this.mPluginRequests = new Map(); - - // create the plugin info array. - // a hash indexed by plugin id so we don't install - // the same plugin more than once. - this.mPluginInfoArray = new Object(); - this.mPluginInfoArrayLength = 0; - - // holds plugins we couldn't find - this.mPluginNotFoundArray = new Object(); - this.mPluginNotFoundArrayLength = 0; - - // array holding pids of plugins that require a license - this.mPluginLicenseArray = new Array(); - - // how many plugins are to be installed - this.pluginsToInstallNum = 0; - - this.mBrowser = null; - this.mSuccessfullPluginInstallation = 0; - this.mNeedsRestart = false; - - // arguments[0] is an object that contains two items: - // a mimetype->pluginInfo map of missing plugins, - // a reference to the browser that needs them, - // so we can notify which browser can be reloaded. - - if ("arguments" in window) { - for (let [mimetype, pluginInfo] of window.arguments[0].plugins){ - this.mPluginRequests.set(mimetype, new nsPluginRequest(pluginInfo)); - } - - this.mBrowser = window.arguments[0].browser; - } - - this.WSPluginCounter = 0; - this.licenseAcceptCounter = 0; - - this.prefBranch = null; -} - -nsPluginInstallerWizard.prototype.getPluginData = function (){ - // for each mPluginRequests item, call the datasource - this.WSPluginCounter = 0; - - // initiate the datasource call - var rdfUpdater = new nsRDFItemUpdater(this.getOS(), this.getChromeLocale()); - - for (let [mimetype, pluginRequest] of this.mPluginRequests) { - rdfUpdater.checkForPlugin(pluginRequest); - } -} - -// aPluginInfo is null if the datasource call failed, and pid is -1 if -// no matching plugin was found. -nsPluginInstallerWizard.prototype.pluginInfoReceived = function (aPluginRequestItem, aPluginInfo){ - this.WSPluginCounter++; - - if (aPluginInfo && (aPluginInfo.pid != -1) ) { - // hash by id - this.mPluginInfoArray[aPluginInfo.pid] = new PluginInfo(aPluginInfo); - this.mPluginInfoArrayLength++; - } else { - this.mPluginNotFoundArray[aPluginRequestItem.mimetype] = aPluginRequestItem; - this.mPluginNotFoundArrayLength++; - } - - var progressMeter = document.getElementById("ws_request_progress"); - - if (progressMeter.getAttribute("mode") == "undetermined") - progressMeter.setAttribute("mode", "determined"); - - progressMeter.setAttribute("value", - ((this.WSPluginCounter / this.mPluginRequests.size) * 100) + "%"); - - if (this.WSPluginCounter == this.mPluginRequests.size) { - // check if no plugins were found - if (this.mPluginInfoArrayLength == 0) { - this.advancePage("lastpage"); - } else { - this.advancePage(null); - } - } else { - // process more. - } -} - -nsPluginInstallerWizard.prototype.showPluginList = function (){ - var myPluginList = document.getElementById("pluginList"); - var hasPluginWithInstallerUI = false; - - // clear children - for (var run = myPluginList.childNodes.length; run > 0; run--) - myPluginList.removeChild(myPluginList.childNodes.item(run)); - - this.pluginsToInstallNum = 0; - - for (var pluginInfoItem in this.mPluginInfoArray){ - // [plugin image] [Plugin_Name Plugin_Version] - - var pluginInfo = this.mPluginInfoArray[pluginInfoItem]; - - // create the checkbox - var myCheckbox = document.createElement("checkbox"); - myCheckbox.setAttribute("checked", "true"); - myCheckbox.setAttribute("oncommand", "gPluginInstaller.toggleInstallPlugin('" + pluginInfo.pid + "', this)"); - // XXXlocalize (nit) - myCheckbox.setAttribute("label", pluginInfo.name + " " + (pluginInfo.version ? pluginInfo.version : "")); - myCheckbox.setAttribute("src", pluginInfo.IconUrl); - - myPluginList.appendChild(myCheckbox); - - if (pluginInfo.InstallerShowsUI == "true") - hasPluginWithInstallerUI = true; - - // keep a running count of plugins the user wants to install - this.pluginsToInstallNum++; - } - - if (hasPluginWithInstallerUI) - document.getElementById("installerUI").hidden = false; - - this.canAdvance(true); - this.canRewind(false); -} - -nsPluginInstallerWizard.prototype.toggleInstallPlugin = function (aPid, aCheckbox) { - this.mPluginInfoArray[aPid].toBeInstalled = aCheckbox.checked; - - // if no plugins are checked, don't allow to advance - this.pluginsToInstallNum = 0; - for (var pluginInfoItem in this.mPluginInfoArray){ - if (this.mPluginInfoArray[pluginInfoItem].toBeInstalled) - this.pluginsToInstallNum++; - } - - if (this.pluginsToInstallNum > 0) - this.canAdvance(true); - else - this.canAdvance(false); -} - -nsPluginInstallerWizard.prototype.canAdvance = function (aBool){ - document.getElementById("plugin-installer-wizard").canAdvance = aBool; -} - -nsPluginInstallerWizard.prototype.canRewind = function (aBool){ - document.getElementById("plugin-installer-wizard").canRewind = aBool; -} - -nsPluginInstallerWizard.prototype.canCancel = function (aBool){ - document.documentElement.getButton("cancel").disabled = !aBool; -} - -nsPluginInstallerWizard.prototype.showLicenses = function (){ - this.canAdvance(false); - this.canRewind(false); - - // only add if a license is provided and the plugin was selected to - // be installed - for (var pluginInfoItem in this.mPluginInfoArray){ - var myPluginInfoItem = this.mPluginInfoArray[pluginInfoItem]; - if (myPluginInfoItem.toBeInstalled && myPluginInfoItem.licenseURL && (myPluginInfoItem.licenseURL != "")) - this.mPluginLicenseArray.push(myPluginInfoItem.pid); - } - - if (this.mPluginLicenseArray.length == 0) { - // no plugins require licenses - this.advancePage(null); - } else { - this.licenseAcceptCounter = 0; - - // add a nsIWebProgress listener to the license iframe. - var docShell = document.getElementById("licenseIFrame").docShell; - var iiReq = docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor); - var webProgress = iiReq.getInterface(Components.interfaces.nsIWebProgress); - webProgress.addProgressListener(gPluginInstaller.progressListener, - Components.interfaces.nsIWebProgress.NOTIFY_ALL); - - this.showLicense(); - } -} - -nsPluginInstallerWizard.prototype.enableNext = function (){ - // if only one plugin exists, don't enable the next button until - // the license is accepted - if (gPluginInstaller.pluginsToInstallNum > 1) - gPluginInstaller.canAdvance(true); - - document.getElementById("licenseRadioGroup1").disabled = false; - document.getElementById("licenseRadioGroup2").disabled = false; -} - -const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener; -nsPluginInstallerWizard.prototype.progressListener = { - onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) - { - if ((aStateFlags & nsIWebProgressListener.STATE_STOP) && - (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)) { - // iframe loaded - gPluginInstaller.enableNext(); - } - }, - - onProgressChange : function(aWebProgress, aRequest, aCurSelfProgress, - aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) - {}, - onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) - {}, - - QueryInterface : function(aIID) - { - if (aIID.equals(Components.interfaces.nsIWebProgressListener) || - aIID.equals(Components.interfaces.nsISupportsWeakReference) || - aIID.equals(Components.interfaces.nsISupports)) - return this; - throw Components.results.NS_NOINTERFACE; - } -} - -nsPluginInstallerWizard.prototype.showLicense = function (){ - var pluginInfo = this.mPluginInfoArray[this.mPluginLicenseArray[this.licenseAcceptCounter]]; - - this.canAdvance(false); - - var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; - document.getElementById("licenseIFrame").webNavigation.loadURI(pluginInfo.licenseURL, loadFlags, null, null, null); - - document.getElementById("pluginLicenseLabel").firstChild.nodeValue = - this.getFormattedString("pluginLicenseAgreement.label", [pluginInfo.name]); - - document.getElementById("licenseRadioGroup1").disabled = true; - document.getElementById("licenseRadioGroup2").disabled = true; - document.getElementById("licenseRadioGroup").selectedIndex = - pluginInfo.licenseAccepted ? 0 : 1; -} - -nsPluginInstallerWizard.prototype.showNextLicense = function (){ - var rv = true; - - if (this.mPluginLicenseArray.length > 0) { - this.storeLicenseRadioGroup(); - - this.licenseAcceptCounter++; - - if (this.licenseAcceptCounter < this.mPluginLicenseArray.length) { - this.showLicense(); - - rv = false; - this.canRewind(true); - } - } - - return rv; -} - -nsPluginInstallerWizard.prototype.showPreviousLicense = function (){ - this.storeLicenseRadioGroup(); - this.licenseAcceptCounter--; - - if (this.licenseAcceptCounter > 0) - this.canRewind(true); - else - this.canRewind(false); - - this.showLicense(); - - // don't allow to return from the license screens - return false; -} - -nsPluginInstallerWizard.prototype.storeLicenseRadioGroup = function (){ - var pluginInfo = this.mPluginInfoArray[this.mPluginLicenseArray[this.licenseAcceptCounter]]; - pluginInfo.licenseAccepted = !document.getElementById("licenseRadioGroup").selectedIndex; -} - -nsPluginInstallerWizard.prototype.licenseRadioGroupChange = function(aAccepted) { - // only if one plugin is to be installed should selection change the next button - if (this.pluginsToInstallNum == 1) - this.canAdvance(aAccepted); -} - -nsPluginInstallerWizard.prototype.advancePage = function (aPageId){ - this.canAdvance(true); - document.getElementById("plugin-installer-wizard").advance(aPageId); -} - -nsPluginInstallerWizard.prototype.startPluginInstallation = function (){ - this.canAdvance(false); - this.canRewind(false); - - var installerPlugins = []; - var xpiPlugins = []; - - for (var pluginInfoItem in this.mPluginInfoArray){ - var pluginItem = this.mPluginInfoArray[pluginInfoItem]; - - if (pluginItem.toBeInstalled && pluginItem.licenseAccepted) { - if (pluginItem.InstallerLocation) - installerPlugins.push(pluginItem); - else if (pluginItem.XPILocation) - xpiPlugins.push(pluginItem); - } - } - - if (installerPlugins.length > 0 || xpiPlugins.length > 0) - PluginInstallService.startPluginInstallation(installerPlugins, - xpiPlugins); - else - this.advancePage(null); -} - -/* - 0 starting download - 1 download finished - 2 starting installation - 3 finished installation - 4 all done -*/ -nsPluginInstallerWizard.prototype.pluginInstallationProgress = function (aPid, aProgress, aError) { - - var statMsg = null; - var pluginInfo = gPluginInstaller.mPluginInfoArray[aPid]; - - switch (aProgress) { - - case 0: - statMsg = this.getFormattedString("pluginInstallation.download.start", [pluginInfo.name]); - break; - - case 1: - statMsg = this.getFormattedString("pluginInstallation.download.finish", [pluginInfo.name]); - break; - - case 2: - statMsg = this.getFormattedString("pluginInstallation.install.start", [pluginInfo.name]); - var progressElm = document.getElementById("plugin_install_progress"); - progressElm.setAttribute("mode", "undetermined"); - break; - - case 3: - if (aError) { - statMsg = this.getFormattedString("pluginInstallation.install.error", [pluginInfo.name, aError]); - pluginInfo.error = aError; - } else { - statMsg = this.getFormattedString("pluginInstallation.install.finish", [pluginInfo.name]); - pluginInfo.error = null; - } - break; - - case 4: - statMsg = this.getString("pluginInstallation.complete"); - break; - } - - if (statMsg) - document.getElementById("plugin_install_progress_message").value = statMsg; - - if (aProgress == 4) { - this.advancePage(null); - } -} - -nsPluginInstallerWizard.prototype.pluginInstallationProgressMeter = function (aPid, aValue, aMaxValue){ - var progressElm = document.getElementById("plugin_install_progress"); - - if (progressElm.getAttribute("mode") == "undetermined") - progressElm.setAttribute("mode", "determined"); - - progressElm.setAttribute("value", Math.ceil((aValue / aMaxValue) * 100) + "%") -} - -nsPluginInstallerWizard.prototype.addPluginResultRow = function (aImgSrc, aName, aNameTooltip, aStatus, aStatusTooltip, aManualUrl){ - var myRows = document.getElementById("pluginResultList"); - - var myRow = document.createElement("row"); - myRow.setAttribute("align", "center"); - - // create the image - var myImage = document.createElement("image"); - myImage.setAttribute("src", aImgSrc); - myImage.setAttribute("height", "16px"); - myImage.setAttribute("width", "16px"); - myRow.appendChild(myImage) - - // create the labels - var myLabel = document.createElement("label"); - myLabel.setAttribute("value", aName); - if (aNameTooltip) - myLabel.setAttribute("tooltiptext", aNameTooltip); - myRow.appendChild(myLabel); - - if (aStatus) { - myLabel = document.createElement("label"); - myLabel.setAttribute("value", aStatus); - myRow.appendChild(myLabel); - } - - // manual install - if (aManualUrl) { - var myButton = document.createElement("button"); - - var manualInstallLabel = this.getString("pluginInstallationSummary.manualInstall.label"); - var manualInstallTooltip = this.getString("pluginInstallationSummary.manualInstall.tooltip"); - - myButton.setAttribute("label", manualInstallLabel); - myButton.setAttribute("tooltiptext", manualInstallTooltip); - - myRow.appendChild(myButton); - - // XXX: XUL sucks, need to add the listener after it got added into the document - if (aManualUrl) - myButton.addEventListener("command", function() { gPluginInstaller.loadURL(aManualUrl) }, false); - } - - myRows.appendChild(myRow); -} - -nsPluginInstallerWizard.prototype.showPluginResults = function (){ - var notInstalledList = "?action=missingplugins"; - var myRows = document.getElementById("pluginResultList"); - - // clear children - for (var run = myRows.childNodes.length; run--; run > 0) - myRows.removeChild(myRows.childNodes.item(run)); - - for (var pluginInfoItem in this.mPluginInfoArray){ - // [plugin image] [Plugin_Name Plugin_Version] [Success/Failed] [Manual Install (if Failed)] - - var myPluginItem = this.mPluginInfoArray[pluginInfoItem]; - - if (myPluginItem.toBeInstalled) { - var statusMsg; - var statusTooltip; - if (myPluginItem.error){ - statusMsg = this.getString("pluginInstallationSummary.failed"); - statusTooltip = myPluginItem.error; - notInstalledList += "&mimetype=" + pluginInfoItem; - } else if (!myPluginItem.licenseAccepted) { - statusMsg = this.getString("pluginInstallationSummary.licenseNotAccepted"); - } else if (!myPluginItem.XPILocation && !myPluginItem.InstallerLocation) { - statusMsg = this.getString("pluginInstallationSummary.notAvailable"); - notInstalledList += "&mimetype=" + pluginInfoItem; - } else { - this.mSuccessfullPluginInstallation++; - statusMsg = this.getString("pluginInstallationSummary.success"); - - // only check needsRestart if the plugin was successfully installed. - if (myPluginItem.needsRestart) - this.mNeedsRestart = true; - } - - // manual url - either returned from the webservice or the pluginspage attribute - var manualUrl; - if ((myPluginItem.error || (!myPluginItem.XPILocation && !myPluginItem.InstallerLocation)) && - (myPluginItem.manualInstallationURL || this.mPluginRequests.get(myPluginItem.requestedMimetype).pluginsPage)){ - manualUrl = myPluginItem.manualInstallationURL ? myPluginItem.manualInstallationURL : this.mPluginRequests.get(myPluginItem.requestedMimetype).pluginsPage; - } - - this.addPluginResultRow( - myPluginItem.IconUrl, - myPluginItem.name + " " + (myPluginItem.version ? myPluginItem.version : ""), - null, - statusMsg, - statusTooltip, - manualUrl); - } - } - - // handle plugins we couldn't find - for (pluginInfoItem in this.mPluginNotFoundArray){ - var pluginRequest = this.mPluginNotFoundArray[pluginInfoItem]; - - // if there is a pluginspage, show UI - if (pluginRequest.pluginsPage) { - this.addPluginResultRow( - "", - this.getFormattedString("pluginInstallation.unknownPlugin", [pluginInfoItem]), - null, - null, - null, - pluginRequest.pluginsPage); - } - - notInstalledList += "&mimetype=" + pluginInfoItem; - } - - // no plugins were found, so change the description of the final page. - if (this.mPluginInfoArrayLength == 0) { - var noPluginsFound = this.getString("pluginInstallation.noPluginsFound"); - document.getElementById("pluginSummaryDescription").setAttribute("value", noPluginsFound); - } else if (this.mSuccessfullPluginInstallation == 0) { - // plugins found, but none were installed. - var noPluginsInstalled = this.getString("pluginInstallation.noPluginsInstalled"); - document.getElementById("pluginSummaryDescription").setAttribute("value", noPluginsInstalled); - } - - document.getElementById("pluginSummaryRestartNeeded").hidden = !this.mNeedsRestart; - - var app = Components.classes["@mozilla.org/xre/app-info;1"] - .getService(Components.interfaces.nsIXULAppInfo); - - // set the get more info link to contain the mimetypes we couldn't install. - notInstalledList += - "&appID=" + app.ID + - "&appVersion=" + app.platformBuildID + - "&clientOS=" + this.getOS() + - "&chromeLocale=" + this.getChromeLocale() + - "&appRelease=" + app.version; - - document.getElementById("moreInfoLink").addEventListener("click", function() { gPluginInstaller.loadURL("https://pfs.mozilla.org/plugins/" + notInstalledList) }, false); - - if (this.mNeedsRestart) { - var cancel = document.getElementById("plugin-installer-wizard").getButton("cancel"); - cancel.label = this.getString("pluginInstallation.close.label"); - cancel.accessKey = this.getString("pluginInstallation.close.accesskey"); - var finish = document.getElementById("plugin-installer-wizard").getButton("finish"); - finish.label = this.getFormattedString("pluginInstallation.restart.label", [app.name]); - finish.accessKey = this.getString("pluginInstallation.restart.accesskey"); - this.canCancel(true); - } - else { - this.canCancel(false); - } - this.canAdvance(true); - this.canRewind(false); -} - -nsPluginInstallerWizard.prototype.loadURL = function (aUrl){ - // Check if the page where the plugin came from can load aUrl before - // loading it, and do *not* allow loading URIs that would inherit our - // principal. - - var pluginPagePrincipal = - window.opener.content.document.nodePrincipal; - - const nsIScriptSecurityManager = - Components.interfaces.nsIScriptSecurityManager; - var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"] - .getService(nsIScriptSecurityManager); - - secMan.checkLoadURIStrWithPrincipal(pluginPagePrincipal, aUrl, - nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL); - - window.opener.open(aUrl); -} - -nsPluginInstallerWizard.prototype.getString = function (aName){ - return document.getElementById("pluginWizardString").getString(aName); -} - -nsPluginInstallerWizard.prototype.getFormattedString = function (aName, aArray){ - return document.getElementById("pluginWizardString").getFormattedString(aName, aArray); -} - -nsPluginInstallerWizard.prototype.getOS = function (){ - var httpService = Components.classes["@mozilla.org/network/protocol;1?name=http"] - .getService(Components.interfaces.nsIHttpProtocolHandler); - return httpService.oscpu; -} - -nsPluginInstallerWizard.prototype.getChromeLocale = function (){ - var chromeReg = Components.classes["@mozilla.org/chrome/chrome-registry;1"] - .getService(Components.interfaces.nsIXULChromeRegistry); - return chromeReg.getSelectedLocale("global"); -} - -nsPluginInstallerWizard.prototype.getPrefBranch = function (){ - if (!this.prefBranch) - this.prefBranch = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); - return this.prefBranch; -} -function nsPluginRequest(aPlugRequest){ - this.mimetype = encodeURI(aPlugRequest.mimetype); - this.pluginsPage = aPlugRequest.pluginsPage; -} - -function PluginInfo(aResult) { - this.name = aResult.name; - this.pid = aResult.pid; - this.version = aResult.version; - this.IconUrl = aResult.IconUrl; - this.InstallerLocation = aResult.InstallerLocation; - this.InstallerHash = aResult.InstallerHash; - this.XPILocation = aResult.XPILocation; - this.XPIHash = aResult.XPIHash; - this.InstallerShowsUI = aResult.InstallerShowsUI; - this.manualInstallationURL = aResult.manualInstallationURL; - this.requestedMimetype = aResult.requestedMimetype; - this.licenseURL = aResult.licenseURL; - this.needsRestart = (aResult.needsRestart == "true"); - - this.error = null; - this.toBeInstalled = true; - - // no license provided, make it accepted - this.licenseAccepted = this.licenseURL ? false : true; -} - -var gPluginInstaller; - -function wizardInit(){ - gPluginInstaller = new nsPluginInstallerWizard(); - gPluginInstaller.canAdvance(false); - gPluginInstaller.getPluginData(); -} - -function wizardFinish(){ - if (gPluginInstaller.mNeedsRestart) { - // Notify all windows that an application quit has been requested. - var os = Components.classes["@mozilla.org/observer-service;1"] - .getService(Components.interfaces.nsIObserverService); - var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"] - .createInstance(Components.interfaces.nsISupportsPRBool); - os.notifyObservers(cancelQuit, "quit-application-requested", "restart"); - - // Something aborted the quit process. - if (!cancelQuit.data) { - var nsIAppStartup = Components.interfaces.nsIAppStartup; - var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"] - .getService(nsIAppStartup); - appStartup.quit(nsIAppStartup.eAttemptQuit | nsIAppStartup.eRestart); - return true; - } - } - - // don't refresh if no plugins were found or installed - if ((gPluginInstaller.mSuccessfullPluginInstallation > 0) && - (gPluginInstaller.mPluginInfoArray.length != 0)) { - - // reload plugins so JS detection works immediately - try { - var ph = Components.classes["@mozilla.org/plugin/host;1"] - .getService(Components.interfaces.nsIPluginHost); - ph.reloadPlugins(false); - } - catch (e) { - // reloadPlugins throws an exception if there were no plugins to load - } - - if (gPluginInstaller.mBrowser) { - // notify listeners that a plugin is installed, - // so that they can reset the UI and update the browser. - var event = document.createEvent("Events"); - event.initEvent("NewPluginInstalled", true, true); - gPluginInstaller.mBrowser.dispatchEvent(event); - } - } - - return true; -} diff --git a/toolkit/mozapps/plugins/content/pluginInstallerWizard.xul b/toolkit/mozapps/plugins/content/pluginInstallerWizard.xul deleted file mode 100644 index c4158c616e7..00000000000 --- a/toolkit/mozapps/plugins/content/pluginInstallerWizard.xul +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - -%brandDTD; - -%pluginsDTD; -]> - - - -