-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactors dependencies of PDFViewerApplication on external services #7202
Conversation
@@ -150,6 +163,7 @@ var PDFViewerApplication = { | |||
pdfOutlineViewer: null, | |||
/** @type {PDFAttachmentViewer} */ | |||
pdfAttachmentViewer: null, | |||
donwloadManager: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: spelling downloadManager
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
0032c4d
to
34ef359
Compare
length: response.contentLength | ||
}); | ||
PDFViewerApplication.setTitleUsingUrl(file); | ||
callback(streamUrl, response.contentLength, file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callback received three parameters here, but at line 369 only two parameters are used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks.
34ef359
to
374f88e
Compare
Also disconnected 'app.js' from 'mozPrintCallback_polyfill.js'. |
4646bfb
to
34c814f
Compare
Looks good to me, can we merge it? The Chrome extension doesn't load any PDF at the moment because Line 1516 in ff6669d
|
'findhighlightallchange', | ||
'findcasesensitivitychange' | ||
]; | ||
this.handleEvent = this.handleEvent.bind(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering, do we actually need the this.handleEvent
method now, since it's basically just a wrapper around this.executeCommand
?
Couldn't we simply remove the method, and use a local function here instead, e.g. something like this:
var handleEvent = function (e) {
this.executeCommand(e.type, e.detail);
}.bind(this);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was preserving that for the solutions that might use it. But looks like it will be wrong to provide this as an API in the future.
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/224c591229ad9d8/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/224c591229ad9d8/output.txt Total script time: 1.46 mins Published |
@yurydelendik This looks really good, thank you! |
34c814f
to
3132941
Compare
... such as FirefoxCom and ChromeCom. It mostly moves external services code into appropriate files. The preprocessor directives will be easier to remove (see #7192).
PDFFindController does not depend on PDFFindBar or FirefoxCom (not tested, but looks like it can be used by third party apps).
@Rob--W, can you review Chromium part?