A user reported that the PDF Viewer is not rendered on Dropbox,
(Chrome on Mac OS X). This is apparently caused by the fact that the
PDF file is loaded in an iframe in such a way that the tabs.onUpdated
event is not triggered.
This patch switches to the webNavigation event API, which improves the
reliability of the navigation detection.
Unfortunately Opera 15 does not support the webNavigation API, so the
old (tabs.onUpdated) method is used (feature-detection is used, so
whenever Opera decides to implement this API, it will profit from it).
Full list feature changes in this commit:
- Support for iframes
- Switched to content-type (MIME) detection instead of hard-coding a
case-sensitive check for the .PDF extension
- The PDF's original URL is visible in the omnibox
- Support for incognito mode
Note: PDF viewer is disabled for the file:// + incognito
combination, because it's currently impossible to get the combination
to work.
See https://github.com/mozilla/pdf.js/pull/3017#issuecomment-15693432