Replaces all preprocessor directives with PDFJSDev calls.
This commit is contained in:
parent
bf52ff156d
commit
0576c9c6c6
32 changed files with 1145 additions and 904 deletions
|
@ -30,7 +30,11 @@
|
|||
root.pdfjsWebPDFJS);
|
||||
}
|
||||
}(this, function (exports, app, overlayManager, preferences, pdfjsLib) {
|
||||
//#if CHROME
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('CHROME')) {
|
||||
throw new Error('Module "pdfjs-web/chromecom" shall not be used outside ' +
|
||||
'CHROME build.');
|
||||
}
|
||||
|
||||
var PDFViewerApplication = app.PDFViewerApplication;
|
||||
var DefaultExernalServices = app.DefaultExernalServices;
|
||||
var OverlayManager = overlayManager.OverlayManager;
|
||||
|
@ -198,7 +202,7 @@
|
|||
// because the shown string should match the UI at chrome://extensions.
|
||||
// These strings are from chrome/app/resources/generated_resources_*.xtb.
|
||||
var i18nFileAccessLabel =
|
||||
//#include $ROOT/web/chrome-i18n-allow-access-to-file-urls.json
|
||||
PDFJSDev.json('$ROOT/web/chrome-i18n-allow-access-to-file-urls.json')
|
||||
[chrome.i18n.getUILanguage && chrome.i18n.getUILanguage()];
|
||||
|
||||
if (i18nFileAccessLabel) {
|
||||
|
@ -352,5 +356,4 @@
|
|||
PDFViewerApplication.externalServices = ChromeExternalServices;
|
||||
|
||||
exports.ChromeCom = ChromeCom;
|
||||
//#endif
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue