mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
Removes PdfRedirector.js and PlayPreview support.
This commit is contained in:
parent
9e9df5600f
commit
4f3f983a21
4 changed files with 3 additions and 163 deletions
24
extensions/firefox/bootstrap.js
vendored
24
extensions/firefox/bootstrap.js
vendored
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
/* jshint esnext:true */
|
||||
/* globals Components, Services, dump, XPCOMUtils, PdfStreamConverter,
|
||||
PdfRedirector, APP_SHUTDOWN, PdfjsChromeUtils, PdfjsContentUtils,
|
||||
APP_SHUTDOWN, PdfjsChromeUtils, PdfjsContentUtils,
|
||||
DEFAULT_PREFERENCES */
|
||||
|
||||
'use strict';
|
||||
|
@ -33,9 +33,6 @@ const Cr = Components.results;
|
|||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
Cu.import('resource://gre/modules/Services.jsm');
|
||||
|
||||
var Ph = Cc['@mozilla.org/plugin/host;1'].getService(Ci.nsIPluginHost);
|
||||
var registerOverlayPreview = 'getPlayPreviewInfo' in Ph;
|
||||
|
||||
function getBoolPref(pref, def) {
|
||||
try {
|
||||
return Services.prefs.getBoolPref(pref);
|
||||
|
@ -120,7 +117,6 @@ Factory.prototype = {
|
|||
|
||||
var pdfStreamConverterFactory = new Factory();
|
||||
var pdfBaseUrl = null;
|
||||
var pdfRedirectorFactory = new Factory();
|
||||
var e10sEnabled = false;
|
||||
|
||||
// As of Firefox 13 bootstrapped add-ons don't support automatic registering and
|
||||
|
@ -147,15 +143,6 @@ function startup(aData, aReason) {
|
|||
Cu.import(pdfStreamConverterUrl);
|
||||
pdfStreamConverterFactory.register(PdfStreamConverter);
|
||||
|
||||
if (registerOverlayPreview) {
|
||||
var pdfRedirectorUrl = pdfBaseUrl + 'content/PdfRedirector.jsm';
|
||||
Cu.import(pdfRedirectorUrl);
|
||||
pdfRedirectorFactory.register(PdfRedirector);
|
||||
|
||||
Ph.registerPlayPreviewMimeType('application/pdf', true,
|
||||
'data:application/x-moz-playpreview-pdfjs;,');
|
||||
}
|
||||
|
||||
try {
|
||||
let globalMM = Cc['@mozilla.org/globalmessagemanager;1']
|
||||
.getService(Ci.nsIFrameScriptLoader);
|
||||
|
@ -190,15 +177,6 @@ function shutdown(aData, aReason) {
|
|||
var pdfStreamConverterUrl = pdfBaseUrl + 'content/PdfStreamConverter.jsm';
|
||||
Cu.unload(pdfStreamConverterUrl);
|
||||
|
||||
if (registerOverlayPreview) {
|
||||
pdfRedirectorFactory.unregister();
|
||||
var pdfRedirectorUrl = pdfBaseUrl + 'content/PdfRedirector.jsm';
|
||||
Cu.unload(pdfRedirectorUrl);
|
||||
pdfRedirectorUrl = null;
|
||||
|
||||
Ph.unregisterPlayPreviewMimeType('application/pdf');
|
||||
}
|
||||
|
||||
PdfjsContentUtils.uninit();
|
||||
Cu.unload(pdfBaseUrl + 'content/PdfjsContentUtils.jsm');
|
||||
PdfjsChromeUtils.uninit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue