Touch down progress bar changes from PROGRESS_19981006_BRANCH. a=saari.

This commit is contained in:
waterson%netscape.com 1998-10-13 02:53:01 +00:00
parent 6139ccff57
commit be1114ae44
2 changed files with 26 additions and 1 deletions

View File

@ -48,6 +48,11 @@
#include "uapp.h" // for CFrontApp::sHRes and CFrontApp::sVRes
#include "intl_csi.h"
#if defined(SMOOTH_PROGRESS)
#include "progress.h"
#include "nsITransferListener.h"
#endif
#include "mkhelp.h"
// FIX ME -- write a CopyAlloc like function that takes a CString
@ -181,6 +186,12 @@ CNSContext::CNSContext(const CNSContext& inOriginal)
mProgress = inOriginal.mProgress;
if (mProgress != NULL)
mProgress->AddUser(this);
#if defined(SMOOTH_PROGRESS)
mContext.progressManager = inOriginal.mContext.progressManager;
if (mContext.progressManager)
mContext.progressManager->AddRef();
#endif
mRequiresClone = false;
// FIX ME!!! need to make sure all things inited in the default ctor are done here
@ -219,7 +230,10 @@ CNSContext::~CNSContext()
XP_FREE(mContext.name);
mContext.name = NULL;
}
#if defined(SMOOTH_PROGRESS)
PM_ReleaseProgressManager(*this);
#endif
/* EA: Remove any help information associated with this context */
if ((HelpInfoStruct *) mContext.pHelpInfo != NULL) {
@ -1012,6 +1026,10 @@ void CNSContext::AllConnectionsComplete(void)
mProgress = NULL;
}
#if defined(SMOOTH_PROGRESS)
PM_ReleaseProgressManager(*this);
#endif
XP_RefreshAnchors();
BroadcastMessage(msg_NSCAllConnectionsComplete);

View File

@ -33,6 +33,10 @@
// utilities
#include "PascalString.h"
#if defined(SMOOTH_PROGRESS)
#include "progress.h"
#endif
#ifdef JAVA
extern "C" {
#include "nsn.h"
@ -79,6 +83,9 @@ void EarlManager::DoCancelLoad (MWContext *context)
int EarlManager::StartLoadURL (URL_Struct * request, MWContext *context,
FO_Present_Types output_format)
{
#if defined(SMOOTH_PROGRESS)
PM_EnsureProgressManager(context);
#endif
if (request->referer && (strlen(request->referer) == 0))
{
XP_FREE(request->referer);