Changeset 855
- Timestamp:
- 2008-03-06 21:11:31 (10 months ago)
- Files:
-
- trunk/chrome/content/dta/manager.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/chrome/content/dta/manager.js
r853 r855 1863 1863 Ci.nsIProgressEventSink, 1864 1864 Ci.nsIChannelEventSink, 1865 Ci.nsIAuthPrompt,1866 1865 Ci.nsIFTPEventSink 1867 1866 ], … … 1902 1901 // nsIInterfaceRequestor 1903 1902 getInterface: function DL_getInterface(iid) { 1903 if (this._interfaces.some(function(i) { return iid.equals(i); })) { 1904 return this; 1905 } 1906 if (iid.equals(Ci.nsIAuthPrompt)) { 1907 return this.authPrompter; 1908 } 1909 if (iid.equals(Ci.nsIPrompt)) { 1910 return this.prompter; 1911 } 1904 1912 try { 1905 1913 return this.QueryInterface(iid); … … 1912 1920 get authPrompter() { 1913 1921 try { 1914 return WindowWatcherService.getNewAuthPrompter( null)1922 return WindowWatcherService.getNewAuthPrompter(window) 1915 1923 .QueryInterface(Ci.nsIAuthPrompt); 1916 1924 } … … 1920 1928 } 1921 1929 }, 1922 // nsIAuthPrompt 1923 prompt: function DL_prompt(aDialogTitle, aText, aPasswordRealm, aSavePassword, aDefaultText, aResult) { 1924 return this.authPrompter.prompt( 1925 aDialogTitle, 1926 aText, 1927 aPasswordRealm, 1928 aSavePassword, 1929 aDefaultText, 1930 aResult 1931 ); 1932 }, 1933 1934 promptUsernameAndPassword: function DL_promptUaP(aDialogTitle, aText, aPasswordRealm, aSavePassword, aUser, aPwd) { 1935 return this.authPrompter.promptUsernameAndPassword( 1936 aDialogTitle, 1937 aText, 1938 aPasswordRealm, 1939 aSavePassword, 1940 aUser, 1941 aPwd 1942 ); 1943 }, 1944 promptPassword: function DL_promptPassword(aDialogTitle, aText, aPasswordRealm, aSavePassword, aPwd) { 1945 return this.authPrompter.promptPassword( 1946 aDialogTitle, 1947 aText, 1948 aPasswordRealm, 1949 aSavePassword, 1950 aPwd 1951 ); 1952 }, 1953 1930 get prompter() { 1931 try { 1932 return WindowWatcherService.getNewPrompter(window) 1933 .QueryInterface(Ci.nsIPrompt); 1934 } 1935 catch (ex) { 1936 Debug.log("prompter", ex); 1937 throw ex; 1938 } 1939 }, 1954 1940 // nsIChannelEventSink 1955 1941 onChannelRedirect: function DL_onChannelRedirect(oldChannel, newChannel, flags) {
