diff --git a/webshell/tests/viewer/Makefile.in b/webshell/tests/viewer/Makefile.in index d44c089395ef..c0307e5d054e 100644 --- a/webshell/tests/viewer/Makefile.in +++ b/webshell/tests/viewer/Makefile.in @@ -37,6 +37,7 @@ CPPSRCS = \ nsBrowserWindow.cpp \ nsEditorMode.cpp \ nsSetupRegistry.cpp \ + nsThrobber.cpp \ nsViewerApp.cpp \ nsWebCrawler.cpp \ $(NULL) diff --git a/webshell/tests/viewer/makefile.win b/webshell/tests/viewer/makefile.win index 0c7069d86bc9..d980dac64eea 100644 --- a/webshell/tests/viewer/makefile.win +++ b/webshell/tests/viewer/makefile.win @@ -39,6 +39,7 @@ OBJS = \ .\$(OBJDIR)\nsBrowserWindow.obj \ .\$(OBJDIR)\nsEditorMode.obj \ .\$(OBJDIR)\nsSetupRegistry.obj \ + .\$(OBJDIR)\nsThrobber.obj \ .\$(OBJDIR)\nsViewerApp.obj \ .\$(OBJDIR)\nsWebCrawler.obj \ .\$(OBJDIR)\nsWinMain.obj \ diff --git a/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index 378432631e1c..4fb1407ce18c 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -33,7 +33,6 @@ #include "nsIButton.h" #include "nsIImageGroup.h" #include "nsITimer.h" -#include "nsIThrobber.h" #include "nsIDOMDocument.h" #include "nsIURL.h" #include "nsIFileWidget.h" @@ -57,6 +56,7 @@ #include "nsIPresContext.h" #include "nsIDocument.h" #include "nsILayoutDebugger.h" +#include "nsThrobber.h" #include "nsXIFDTD.h" #include "nsIParser.h" @@ -147,7 +147,6 @@ static NS_DEFINE_CID(kBrowserWindowCID, NS_BROWSER_WINDOW_CID); static NS_DEFINE_CID(kButtonCID, NS_BUTTON_CID); static NS_DEFINE_CID(kFileWidgetCID, NS_FILEWIDGET_CID); static NS_DEFINE_CID(kTextFieldCID, NS_TEXTFIELD_CID); -static NS_DEFINE_CID(kThrobberCID, NS_THROBBER_CID); static NS_DEFINE_CID(kWebShellCID, NS_WEB_SHELL_CID); static NS_DEFINE_CID(kWindowCID, NS_WINDOW_CID); static NS_DEFINE_CID(kDialogCID, NS_DIALOG_CID); @@ -165,7 +164,6 @@ static NS_DEFINE_IID(kIFileWidgetIID, NS_IFILEWIDGET_IID); static NS_DEFINE_IID(kIStreamObserverIID, NS_ISTREAMOBSERVER_IID); static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID); static NS_DEFINE_IID(kITextWidgetIID, NS_ITEXTWIDGET_IID); -static NS_DEFINE_IID(kIThrobberIID, NS_ITHROBBER_IID); static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID); static NS_DEFINE_IID(kIWebShellContainerIID, NS_IWEB_SHELL_CONTAINER_IID); static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); @@ -1367,11 +1365,7 @@ nsBrowserWindow::CreateToolBar(PRInt32 aWidth) // Create and place throbber r.SetRect(aWidth - THROBBER_WIDTH, 0, THROBBER_WIDTH, THROBBER_HEIGHT); - rv = nsComponentManager::CreateInstance(kThrobberCID, nsnull, kIThrobberIID, - (void**)&mThrobber); - if (NS_OK != rv) { - return rv; - } + mThrobber = nsThrobber::NewThrobber(); nsString throbberURL(THROBBER_AT); mThrobber->Init(mWindow, r, throbberURL, THROB_NUM); mThrobber->Show(); diff --git a/webshell/tests/viewer/nsBrowserWindow.h b/webshell/tests/viewer/nsBrowserWindow.h index 087355e8d6a7..45000f62816e 100644 --- a/webshell/tests/viewer/nsBrowserWindow.h +++ b/webshell/tests/viewer/nsBrowserWindow.h @@ -47,7 +47,7 @@ class nsICheckButton; class nsIRadioButton; class nsITextWidget; class nsIButton; -class nsIThrobber; +class nsThrobber; class nsViewerApp; class nsIDocumentViewer; class nsIPresContext; @@ -243,7 +243,7 @@ public: nsITextWidget* mLocation; nsIButton* mBack; nsIButton* mForward; - nsIThrobber* mThrobber; + nsThrobber* mThrobber; // "Status bar" nsITextWidget* mStatus;