mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-28 23:28:16 +02:00
Merge branch 'master' of git://github.com/mozilla/pdf.js.git into loadingbychrome
Conflicts: web/viewer.js
This commit is contained in:
commit
9cc5fc4e38
30 changed files with 839 additions and 430 deletions
|
@ -281,9 +281,26 @@ ChromeActions.prototype = {
|
|||
var strings = getLocalizedStrings('chrome.properties');
|
||||
var message = getLocalizedString(strings, 'unsupported_feature');
|
||||
|
||||
var win = Services.wm.getMostRecentWindow('navigator:browser');
|
||||
var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document);
|
||||
var notificationBox = win.gBrowser.getNotificationBox(browser);
|
||||
var notificationBox = null;
|
||||
// Multiple browser windows can be opened, finding one for notification box
|
||||
var windowsEnum = Services.wm
|
||||
.getZOrderDOMWindowEnumerator('navigator:browser', true);
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var win = windowsEnum.getNext();
|
||||
if (win.closed)
|
||||
continue;
|
||||
var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document);
|
||||
if (browser) {
|
||||
// right window/browser is found, getting the notification box
|
||||
notificationBox = win.gBrowser.getNotificationBox(browser);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!notificationBox) {
|
||||
log('Unable to get a notification box for the fallback message');
|
||||
return;
|
||||
}
|
||||
|
||||
// Flag so we don't call the response callback twice, since if the user
|
||||
// clicks open with different viewer both the button callback and
|
||||
// eventCallback will be called.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
|
||||
<em:minVersion>6.0</em:minVersion>
|
||||
<em:minVersion>10.0</em:minVersion>
|
||||
<em:maxVersion>15.0a1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
|
||||
<em:minVersion>2.1.*</em:minVersion>
|
||||
<em:minVersion>2.7</em:minVersion>
|
||||
<em:maxVersion>2.12a1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue