set our status feedback object as the web progress listener

for the content docshell for the message pane.
This commit is contained in:
mscott%netscape.com 2000-05-03 21:15:28 +00:00
Родитель 1fbcaa1e55
Коммит f318a954f6
1 изменённых файлов: 28 добавлений и 12 удалений

Просмотреть файл

@ -35,6 +35,8 @@
#include "nsILoadGroup.h" #include "nsILoadGroup.h"
#include "nsIMsgMailNewsUrl.h" #include "nsIMsgMailNewsUrl.h"
#include "nsIInterfaceRequestor.h" #include "nsIInterfaceRequestor.h"
#include "nsIWebProgress.h"
#include "nsIWebProgressListener.h"
#include "nsPIDOMWindow.h" #include "nsPIDOMWindow.h"
@ -99,6 +101,7 @@ NS_IMETHODIMP nsMsgWindow::CloseWindow()
// make sure the status feedback object // make sure the status feedback object
// knows the window is going away... // knows the window is going away...
if (mStatusFeedback) if (mStatusFeedback)
mStatusFeedback->CloseWindow(); mStatusFeedback->CloseWindow();
@ -117,7 +120,19 @@ NS_IMETHODIMP nsMsgWindow::GetStatusFeedback(nsIMsgStatusFeedback * *aStatusFeed
NS_IMETHODIMP nsMsgWindow::SetStatusFeedback(nsIMsgStatusFeedback * aStatusFeedback) NS_IMETHODIMP nsMsgWindow::SetStatusFeedback(nsIMsgStatusFeedback * aStatusFeedback)
{ {
nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mMessageWindowWebShell));
nsCOMPtr<nsIWebProgressListener> webProgressListener(do_QueryInterface(mStatusFeedback));
mStatusFeedback = aStatusFeedback; mStatusFeedback = aStatusFeedback;
// register our status feedback object
if (mStatusFeedback && mMessageWindowWebShell)
{
webProgressListener = do_QueryInterface(mStatusFeedback);
webProgress->AddProgressListener(webProgressListener);
}
return NS_OK; return NS_OK;
} }
@ -245,6 +260,7 @@ NS_IMETHODIMP nsMsgWindow::SetDOMWindow(nsIDOMWindow *aWindow)
nsCOMPtr<nsIWebShell> msgWebShell(do_QueryInterface(msgDocShellItem)); nsCOMPtr<nsIWebShell> msgWebShell(do_QueryInterface(msgDocShellItem));
// we don't own mMessageWindowWebShell so don't try to keep a reference to it! // we don't own mMessageWindowWebShell so don't try to keep a reference to it!
mMessageWindowWebShell = msgWebShell; mMessageWindowWebShell = msgWebShell;
SetStatusFeedback(mStatusFeedback);
} }
//Get nsIMsgWindowCommands object //Get nsIMsgWindowCommands object