Changeset 856
- Timestamp:
- 2008-03-06 21:17:16 (9 months ago)
- Files:
-
- branches/1.0.x/chrome/content/dta/manager.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0.x/chrome/content/dta/manager.js
r838 r856 1733 1733 Ci.nsIProgressEventSink, 1734 1734 Ci.nsIChannelEventSink, 1735 Ci.nsIAuthPrompt,1736 1735 Ci.nsIFTPEventSink 1737 1736 ], … … 1771 1770 // nsIInterfaceRequestor 1772 1771 getInterface: function DL_getInterface(iid) { 1773 try { 1774 return this.QueryInterface(iid); 1772 if (this._interfaces.some(function(i) { return iid.equals(i); })) { 1773 return this; 1774 } 1775 if (iid.equals(Ci.nsIAuthPrompt)) { 1776 return this.authPrompter; 1777 } 1778 if (iid.equals(Ci.nsIPrompt)) { 1779 return this.prompter; 1780 } 1781 throw Components.results.NS_ERROR_NO_INTERFACE; 1782 }, 1783 get authPrompter() { 1784 try { 1785 return WindowWatcherService.getNewAuthPrompter(window) 1786 .QueryInterface(Ci.nsIAuthPrompt); 1775 1787 } 1776 1788 catch (ex) { 1777 Debug. dump("interface not implemented: " + iid, ex);1789 Debug.log("authPrompter", ex); 1778 1790 throw ex; 1779 1791 } 1780 1792 }, 1781 get authPrompter() { 1782 try { 1783 return WindowWatcherService.getNewAuthPrompter(null) 1784 .QueryInterface(Ci.nsIAuthPrompt); 1785 } catch (ex) { 1786 Debug.dump("authPrompter", ex); 1793 get prompter() { 1794 try { 1795 return WindowWatcherService.getNewPrompter(window) 1796 .QueryInterface(Ci.nsIPrompt); 1797 } 1798 catch (ex) { 1799 Debug.log("prompter", ex); 1787 1800 throw ex; 1788 1801 } 1789 },1790 // nsIAuthPrompt1791 prompt: function DL_prompt(aDialogTitle, aText, aPasswordRealm, aSavePassword, aDefaultText, aResult) {1792 return this.authPrompter.prompt(1793 aDialogTitle,1794 aText,1795 aPasswordRealm,1796 aSavePassword,1797 aDefaultText,1798 aResult1799 );1800 },1801 1802 promptUsernameAndPassword: function DL_promptUaP(aDialogTitle, aText, aPasswordRealm, aSavePassword, aUser, aPwd) {1803 return this.authPrompter.promptUsernameAndPassword(1804 aDialogTitle,1805 aText,1806 aPasswordRealm,1807 aSavePassword,1808 aUser,1809 aPwd1810 );1811 },1812 promptPassword: function DL_promptPassword(aDialogTitle, aText, aPasswordRealm, aSavePassword, aPwd) {1813 return this.authPrompter.promptPassword(1814 aDialogTitle,1815 aText,1816 aPasswordRealm,1817 aSavePassword,1818 aPwd1819 );1820 1802 }, 1821 1803
