From 8acf2a00ccedefcc2e9ecb305bb29f0b80cf84af Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Fri, 7 Dec 2001 00:37:26 +0000 Subject: [PATCH] Bugzilla Bug 113827 nsDSWebProgressListener.cpp This file is now longer used... r=adamlock sr=darin git-svn-id: svn://10.0.0.236/trunk@109916 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/Makefile.in | 1 - mozilla/docshell/base/makefile.win | 1 - .../docshell/base/nsDSWebProgressListener.cpp | 154 ------------------ .../docshell/base/nsDSWebProgressListener.h | 57 ------- 4 files changed, 213 deletions(-) delete mode 100644 mozilla/docshell/base/nsDSWebProgressListener.cpp delete mode 100644 mozilla/docshell/base/nsDSWebProgressListener.h diff --git a/mozilla/docshell/base/Makefile.in b/mozilla/docshell/base/Makefile.in index d77d47b1702..abeb3b2ffa8 100644 --- a/mozilla/docshell/base/Makefile.in +++ b/mozilla/docshell/base/Makefile.in @@ -83,7 +83,6 @@ CPPSRCS = \ nsDocShellEnumerator.cpp \ nsDSURIContentListener.cpp \ nsDefaultURIFixup.cpp \ -# nsDSWebProgressListener.cpp \ $(NULL) # we don't want the shared lib, but we want to force the creation of a diff --git a/mozilla/docshell/base/makefile.win b/mozilla/docshell/base/makefile.win index 6425a9811f9..a0fbe48ab54 100644 --- a/mozilla/docshell/base/makefile.win +++ b/mozilla/docshell/base/makefile.win @@ -81,7 +81,6 @@ CPP_OBJS= \ .\$(OBJDIR)\nsDocShellLoadInfo.obj \ .\$(OBJDIR)\nsDSURIContentListener.obj \ .\$(OBJDIR)\nsDefaultURIFixup.obj \ -# .\$(OBJDIR)\nsDSWebProgressListener.obj \ $(NULL) include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/docshell/base/nsDSWebProgressListener.cpp b/mozilla/docshell/base/nsDSWebProgressListener.cpp deleted file mode 100644 index e717b17a24b..00000000000 --- a/mozilla/docshell/base/nsDSWebProgressListener.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Mozilla browser. - * - * The Initial Developer of the Original Code is Netscape - * Communications, Inc. Portions created by Netscape are - * Copyright (C) 1999, Mozilla. All Rights Reserved. - * - * Contributor(s): - * Travis Bogard - */ -#if 0 /* This file is now longer used... */ - -// Local Includes -#include "nsDocShell.h" -#include "nsDSWebProgressListener.h" - -// Interfaces Needed -#include "nsIChannel.h" - -//***************************************************************************** -//*** nsDSWebProgressListener: Object Management -//***************************************************************************** - -nsDSWebProgressListener::nsDSWebProgressListener() : mDocShell(nsnull), - mProgressStatusFlags(0), mCurSelfProgress(0), mMaxSelfProgress(0), - mCurTotalProgress(0), mMaxTotalProgress(0) - -{ - NS_INIT_REFCNT(); -} - -nsDSWebProgressListener::~nsDSWebProgressListener() -{ -} - -//***************************************************************************** -// nsDSWebProgressListener::nsISupports -//***************************************************************************** - -NS_IMPL_ADDREF(nsDSWebProgressListener) -NS_IMPL_RELEASE(nsDSWebProgressListener) - -NS_INTERFACE_MAP_BEGIN(nsDSWebProgressListener) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebProgressListener) - NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener) -NS_INTERFACE_MAP_END - -//***************************************************************************** -// nsDSWebProgressListener::nsIWebProgressListener -//***************************************************************************** - -NS_IMETHODIMP nsDSWebProgressListener::OnProgressChange(nsIChannel* aChannel, - PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress, - PRInt32 aCurTotalProgress, PRInt32 aMaxTotalProgress) -{ - mCurSelfProgress = aCurSelfProgress; - mMaxSelfProgress = aMaxSelfProgress; - mCurTotalProgress = aCurTotalProgress; - mMaxTotalProgress = aMaxTotalProgress; - - if(mDocShell) - mDocShell->FireOnProgressChange(aChannel, aCurSelfProgress, - aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); - - return NS_OK; -} - -NS_IMETHODIMP nsDSWebProgressListener::OnChildProgressChange(nsIChannel* aChannel, - PRInt32 aCurSelfProgress, PRInt32 aMaxSelfProgress) -{ - if(mDocShell) - mDocShell->FireOnChildProgressChange(aChannel, aCurSelfProgress, - aMaxSelfProgress); - - return NS_OK; -} - -NS_IMETHODIMP nsDSWebProgressListener::OnStatusChange(nsIChannel* aChannel, - PRInt32 aProgressStatusFlags) -{ - mProgressStatusFlags = aProgressStatusFlags; - //XXX Need to mask in flag_windowActivity when animation is occuring in the - // window - if(mDocShell) - { - if(aProgressStatusFlags & nsIWebProgress::flag_net_start && - PR_TRUE /*XXX Eventually check some flag to make sure there is not - already window activity. If there is don't add the window start*/) - aProgressStatusFlags |= nsIWebProgress::flag_win_start; - else if(aProgressStatusFlags & nsIWebProgress::flag_net_stop && - PR_TRUE /*XXX Eventually check some flag to see if there is animation - going if there is don't add in the window stop flag*/) - aProgressStatusFlags |= nsIWebProgress::flag_win_stop; - - mDocShell->FireOnStatusChange(aChannel, aProgressStatusFlags); - } - - return NS_OK; -} - -NS_IMETHODIMP nsDSWebProgressListener::OnChildStatusChange(nsIChannel* aChannel, - PRInt32 aProgressStatusFlags) -{ - if(mDocShell) - mDocShell->FireOnChildStatusChange(aChannel, aProgressStatusFlags); - - return NS_OK; -} - -NS_IMETHODIMP nsDSWebProgressListener::OnLocationChange(nsIURI* aLocation) -{ - NS_ERROR("DocShell should be the only one generating this message"); - return NS_OK; -} - -NS_IMETHODIMP -nsDSWebProgressListener::OnSecurityChange(nsIWebProgress *aWebProgress, - nsIRequest *aRequest, - PRInt32 state) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - - -//***************************************************************************** -// nsDSWebProgressListener: Helpers -//***************************************************************************** - -//***************************************************************************** -// nsDSWebProgressListener: Accessors -//***************************************************************************** - -void nsDSWebProgressListener::DocShell(nsDocShell* aDocShell) -{ - mDocShell = aDocShell; -} - -nsDocShell* nsDSWebProgressListener::DocShell() -{ - return mDocShell; -} - -#endif /* 0 */ diff --git a/mozilla/docshell/base/nsDSWebProgressListener.h b/mozilla/docshell/base/nsDSWebProgressListener.h deleted file mode 100644 index d454b14ad1a..00000000000 --- a/mozilla/docshell/base/nsDSWebProgressListener.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Mozilla browser. - * - * The Initial Developer of the Original Code is Netscape - * Communications, Inc. Portions created by Netscape are - * Copyright (C) 1999, Mozilla. All Rights Reserved. - * - * Contributor(s): - * Travis Bogard - */ - -#ifndef nsDSWebProgressListener_h__ -#define nsDSWebProgressListener_h__ - -#include "nsCOMPtr.h" -#include "nsString.h" -#include "nsIWebProgressListener.h" - -class nsDocShell; - -class nsDSWebProgressListener : public nsIWebProgressListener -{ -friend class nsDocShell; -public: - NS_DECL_ISUPPORTS - - NS_DECL_NSIWEBPROGRESSLISTENER - -protected: - nsDSWebProgressListener(); - virtual ~nsDSWebProgressListener(); - - void DocShell(nsDocShell* aDocShell); - nsDocShell* DocShell(); - -protected: - nsDocShell* mDocShell; - - PRInt32 mProgressStatusFlags; - PRInt32 mCurSelfProgress; - PRInt32 mMaxSelfProgress; - PRInt32 mCurTotalProgress; - PRInt32 mMaxTotalProgress; -}; - -#endif /* nsDSWebProgressListener_h__ */