Closed Rob--W closed 8 years ago
Rebased to master, successfully tested in Chrome/Chromium 28, 29, 30 and 31.
Created new ticket to request streamsPrivate permission at https://code.google.com/p/chromium/issues/detail?id=326949.
chrome.streamsPrivate
API is now supported in Opera Next, and the PDF.js (PDF Viewer) extension is whitelisted.
@andreasbovens Nice! Are the extension IDs of the PDF Viewer from the Chrome Web Store AND the one from addons.opera.com whitelisted?
oemmndcbldboiebfnladdacbdfmadadm (in the Chrome Web Store)
encfpfilknmenlmjemepncnlbbjlabkc (in the Opera Add-on Gallery)
Also, what is the Opera version that supports streamsPrivate?
No, only the one in the Opera addons gallery is whitelisted, as that's the one we can review.
The Opera version that supports streamsPrivate is Opera 19 (for now, that's http://www.opera.com/computer/next).
I tested Version PDF.js version 0.8.877 with Opera 20.0.1380.1 YES!!!!!
Now let's make it faster! ;)
Created separate issue on Mozilla's bug tracker for whitelist request at Chromium (because code is now upstream, it's relevant to Mozilla's repository as well).
The streamsPrivate API is not needed any more for getting FTP access, because extensions can now request FTP data using plain XMLHttpRequest.
This feature was added with https://codereview.chromium.org/166793003/, and will be available from Chrome 35.0.1888.0.
Once if I figure out a way to get the data from a POST request, the streamsPrivate API will not be needed any more (API proposal: https://docs.google.com/document/d/1iE6M-YSmPtMOsec7pR-ILWveQie8JQQXTm15JKEcUT8/edit)
The streams API allows the extension to directly capture the binary data of all PDF files, which results in support of POST and FTP requests.
The progress is recorded at https://github.com/Rob--W/pdf.js/tree/crx-using-streams-api, and each commit message contains an explanation of the changes made by that commit.
List of new commits: https://github.com/Rob--W/pdf.js/compare/crx-using-streams-api.
Testing
(adjust the last command to your needs, e.g.
chrome.exe
and/or--user-data-dir=%TMP%\whatever
)Progress
chrome.streamsPrivate
APIEnhancements (nice to have, not critical)
Cache PDF blobs in HTML5 fileSystem (toggleable via options page?)(Firefox doesn't cache either)