Skip to content
Permalink
Browse files

Removes PdfRedirector.js and PlayPreview support.

  • Loading branch information
yurydelendik committed Aug 6, 2015
1 parent 9e9df56 commit 4f3f983a214867011dda8c5597a4d3523c5f1423
Showing with 3 additions and 163 deletions.
  1. +1 −23 extensions/firefox/bootstrap.js
  2. +1 −1 extensions/firefox/content/PdfJs.jsm
  3. +0 −137 extensions/firefox/content/PdfRedirector.jsm
  4. +1 −2 make.js
@@ -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();
@@ -15,7 +15,7 @@
* limitations under the License.
*/
/* jshint esnext:true */
/* globals Components, Services, XPCOMUtils, PdfjsChromeUtils, PdfRedirector,
/* globals Components, Services, XPCOMUtils, PdfjsChromeUtils,
PdfjsContentUtils, DEFAULT_PREFERENCES, PdfStreamConverter */

'use strict';

This file was deleted.

@@ -107,8 +107,7 @@ var COMMON_WEB_FILES =
COMMON_FIREFOX_FILES_PREPROCESS =
[FIREFOX_CONTENT_DIR + 'PdfStreamConverter.jsm',
FIREFOX_CONTENT_DIR + 'PdfjsContentUtils.jsm',
FIREFOX_CONTENT_DIR + 'PdfjsChromeUtils.jsm',
FIREFOX_CONTENT_DIR + 'PdfRedirector.jsm'];
FIREFOX_CONTENT_DIR + 'PdfjsChromeUtils.jsm'];
//
// make generic
// Builds the generic production viewer that should be compatible with most

0 comments on commit 4f3f983

Please sign in to comment.
You can’t perform that action at this time.