diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/ProgressListener.cpp | 55 | ||||
-rw-r--r-- | embed/mozilla/ProgressListener.h | 5 |
2 files changed, 15 insertions, 45 deletions
diff --git a/embed/mozilla/ProgressListener.cpp b/embed/mozilla/ProgressListener.cpp index 643764982..b5ed9815c 100644 --- a/embed/mozilla/ProgressListener.cpp +++ b/embed/mozilla/ProgressListener.cpp @@ -22,7 +22,6 @@ #include "ProgressListener.h" -#include "eel-gconf-extensions.h" #include "ephy-file-helpers.h" #include "mozilla-embed-persist.h" @@ -35,11 +34,11 @@ #include "nsCOMPtr.h" static void -download_remove_cb (DownloaderView *dv, GProgressListener *Progress); +download_remove_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress); static void -download_resume_cb (DownloaderView *dv, GProgressListener *Progress); +download_resume_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress); static void -download_pause_cb (DownloaderView *dv, GProgressListener *Progress); +download_pause_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress); NS_IMPL_ISUPPORTS4 (GProgressListener, nsIDownload, nsIWebProgressListener, nsIProgressDialog, nsISupportsWeakReference) @@ -73,7 +72,6 @@ NS_METHOD GProgressListener::InitForPersist (nsIWebBrowserPersist *aPersist, PRInt64 aTimeDownloadStarted) { nsresult rv; - /* fill in download details */ mAction = aAction; mParent = aParent; @@ -94,35 +92,6 @@ NS_METHOD GProgressListener::InitForPersist (nsIWebBrowserPersist *aPersist, return rv; } -NS_METHOD GProgressListener::InitForDownload (nsIHelperAppLauncher *aLauncher, - nsISupports *aContext, - GContentHandler *aHandler, - DownloadAction aAction) -{ - nsresult rv; - - mNoDialog = 0; - - /* fill in download details */ - mAction = aAction; - mParent = do_QueryInterface (aContext); - mNoDialog = PR_TRUE; - mHandler = aHandler; - mLauncher = aLauncher; - rv = mLauncher->GetDownloadInfo (getter_AddRefs (mUri), - &mTimeDownloadStarted, - getter_AddRefs (mFile)); - - /* do remaining init */ - rv = PrivateInit (); - - /* pick up progress messages */ - mLauncher->SetWebProgressListener (this); - - /* done */ - return rv; -} - NS_METHOD GProgressListener::PrivateInit (void) { nsresult rv; @@ -673,19 +642,25 @@ nsresult GProgressListener::Abort (void) } static void -download_remove_cb (DownloaderView *dv, GProgressListener *Progress) +download_remove_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress) { - Progress->Abort(); + if (Changed == Progress){ + Progress->Abort(); + } } static void -download_resume_cb (DownloaderView *dv, GProgressListener *Progress) +download_resume_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress) { - Progress->Resume(); + if (Changed == Progress) { + Progress->Resume(); + } } static void -download_pause_cb (DownloaderView *dv, GProgressListener *Progress) +download_pause_cb (DownloaderView *dv, GProgressListener *Changed, GProgressListener *Progress) { - Progress->Pause(); + if (Changed == Progress) { + Progress->Pause(); + } } diff --git a/embed/mozilla/ProgressListener.h b/embed/mozilla/ProgressListener.h index 7d5ba62b0..19b3836c4 100644 --- a/embed/mozilla/ProgressListener.h +++ b/embed/mozilla/ProgressListener.h @@ -73,11 +73,6 @@ class GProgressListener : public nsIProgressDialog, EphyEmbedPersist *ephyPersist, PRBool noDialog, PRInt64 aTimeDownloadStarted = 0); - NS_METHOD InitForDownload (nsIHelperAppLauncher *aLauncher, - nsISupports *aContext, - GContentHandler *aHandler, - DownloadAction aDownload); - nsresult Pause (void); nsresult Resume (void); nsresult Abort (void); |