Bug 1524688: Part 19 - Convert PDF.j to static registration. r=bdahl

--HG--
extra : rebase_source : eaf1366b7a7617b577f0495dc43b6c02ef04023b
This commit is contained in:
Kris Maglione 2019-01-29 20:58:42 -08:00
Родитель 943282a9a0
Коммит 5e63889c06
5 изменённых файлов: 23 добавлений и 16 удалений

Просмотреть файл

@ -0,0 +1,17 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
Classes = [
{
'cid': '{d0c5195d-e798-49d4-b1d3-9324328b2291}',
'contract_ids': [
'@mozilla.org/streamconv;1?from=application/pdf&to=*/*',
'@mozilla.org/streamconv;1?from=application/pdf&to=text/html',
],
'jsm': 'resource:///modules/pdfjs.js',
'constructor': 'StreamConverterFactory',
},
]

Просмотреть файл

@ -11,7 +11,10 @@ BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
JAR_MANIFESTS += ['jar.mn']
EXTRA_COMPONENTS += [
EXTRA_JS_MODULES += [
'pdfjs.js',
'pdfjs.manifest',
]
XPCOM_MANIFESTS += [
'components.conf',
]

Просмотреть файл

@ -16,7 +16,6 @@
"use strict";
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.defineModuleGetter(this, "PdfStreamConverter",
"resource://pdf.js/PdfStreamConverter.jsm");
@ -28,10 +27,5 @@ function StreamConverterFactory() {
}
throw Cr.NS_ERROR_FACTORY_NOT_REGISTERED;
}
StreamConverterFactory.prototype = {
// properties required for XPCOM registration:
classID: Components.ID("{d0c5195d-e798-49d4-b1d3-9324328b2291}"),
classDescription: "pdf.js Component",
};
var NSGetFactory = XPCOMUtils.generateNSGetFactory([StreamConverterFactory]);
var EXPORTED_SYMBOLS = ["StreamConverterFactory"];

Просмотреть файл

@ -1,3 +0,0 @@
component {d0c5195d-e798-49d4-b1d3-9324328b2291} pdfjs.js
contract @mozilla.org/streamconv;1?from=application/pdf&to=*/* {d0c5195d-e798-49d4-b1d3-9324328b2291}
contract @mozilla.org/streamconv;1?from=application/pdf&to=text/html {d0c5195d-e798-49d4-b1d3-9324328b2291}

Просмотреть файл

@ -306,10 +306,6 @@
@RESPATH@/components/shield.manifest
@RESPATH@/components/shield-content-process.js
; [PDF Viewer]
@RESPATH@/browser/components/pdfjs.manifest
@RESPATH@/browser/components/pdfjs.js
; Modules
@RESPATH@/browser/modules/*
@RESPATH@/modules/*