mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
This method captures all application/pdf streams, loads the viewer and passes the stream to the PDF.js viewer. This commit shows a proof of concept using the chrome.streamsPrivate API. Advantages of new method: - Access to the response body of the original request, thus fewer network requests. - PDFs from non-GET requests (e.g. POST) are now supported. - FTP files are also supported. Possible improvements: - Use declared content scripts instead of dynamic chrome.tabs.executeScript. This allows the extension to render the viewer in frames when the extension is disallowed to run executeScript for the top URL. - Use chrome.declarativeWebRequest instead of webRequest, and replace background page with event page (don't forget to profile the difference & will the background/event page still work as intended?). |
||
---|---|---|
.. | ||
images | ||
.gitignore | ||
chromecom.js | ||
compatibility.js | ||
compressed.tracemonkey-pldi-09.pdf | ||
debugger.js | ||
default_preferences.js | ||
download_manager.js | ||
firefoxcom.js | ||
grab_to_pan.js | ||
hand_tool.js | ||
index.html.template | ||
mozPrintCallback_polyfill.js | ||
page_view.js | ||
password_prompt.js | ||
pdf_find_bar.js | ||
pdf_find_controller.js | ||
pdf_history.js | ||
preferences.js | ||
presentation_mode.js | ||
secondary_toolbar.js | ||
text_layer_builder.js | ||
thumbnail_view.js | ||
ui_utils.js | ||
view_history.js | ||
viewer-snippet-b2g-activity-header.html | ||
viewer-snippet-chrome-extension.html | ||
viewer-snippet-firefox-extension.html | ||
viewer-snippet-mozPrintCallback-polyfill.html | ||
viewer-snippet.html | ||
viewer.css | ||
viewer.html | ||
viewer.js |