Bug 1648064 - Remove some includes from nsPrintJob.h. r=jwatt

I had needed this before to export that header, and it's no longer
needed, but it seems useful anyways.

Depends on D81989

Differential Revision: https://phabricator.services.mozilla.com/D84252
This commit is contained in:
Emilio Cobos Álvarez 2020-07-22 14:16:14 +00:00
Родитель a54994480c
Коммит f87a5320b9
2 изменённых файлов: 25 добавлений и 13 удалений

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

@ -451,11 +451,21 @@ NS_IMPL_ISUPPORTS(nsPrintJob, nsIWebProgressListener, nsISupportsWeakReference,
nsIObserver)
//-------------------------------------------------------
nsPrintJob::nsPrintJob() = default;
nsPrintJob::~nsPrintJob() {
Destroy(); // for insurance
DisconnectPagePrintTimer();
}
bool nsPrintJob::CheckBeforeDestroy() const {
return mPrt && mPrt->mPreparingForPrint;
}
PresShell* nsPrintJob::GetPrintPreviewPresShell() {
return mPrtPreview->mPrintObject->mPresShell;
}
//-------------------------------------------------------
void nsPrintJob::Destroy() {
if (mIsDestroying) {

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

@ -11,19 +11,22 @@
#include "nsCOMPtr.h"
#include "nsPrintObject.h"
#include "nsPrintData.h"
#include "nsFrameList.h"
#include "nsIWebProgress.h"
#include "mozilla/dom/HTMLCanvasElement.h"
#include "nsIFrame.h" // for WeakFrame only
#include "nsIWebProgressListener.h"
#include "nsHashKeys.h"
#include "nsIFrame.h" // For WeakFrame
#include "nsSize.h"
#include "nsTHashtable.h"
#include "nsWeakReference.h"
// Interfaces
#include "nsIObserver.h"
#include "nsIWebProgress.h"
#include "nsIWebProgressListener.h"
// Classes
class nsIFrame;
class nsIPrintProgressParams;
class nsIPrintSettings;
class nsPrintData;
class nsPagePrintTimer;
class nsIDocShell;
class nsIDocumentViewerPrint;
@ -31,6 +34,8 @@ class nsIFrame;
class nsPrintObject;
class nsIDocShell;
class nsPageSequenceFrame;
class nsPIDOMWindowOuter;
class nsView;
namespace mozilla {
class PresShell;
@ -49,7 +54,7 @@ class nsPrintJob final : public nsIObserver,
public:
static void CloseProgressDialog(nsIWebProgressListener* aWebProgressListener);
nsPrintJob() = default;
nsPrintJob();
// nsISupports interface...
NS_DECL_ISUPPORTS
@ -140,12 +145,9 @@ class nsPrintJob final : public nsIObserver,
// object, for example by calling CleanupOnFailure().
MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult FinishPrintPreview();
void FirePrintingErrorEvent(nsresult aPrintError);
bool CheckBeforeDestroy() const { return mPrt && mPrt->mPreparingForPrint; }
mozilla::PresShell* GetPrintPreviewPresShell() {
return mPrtPreview->mPrintObject->mPresShell;
}
bool CheckBeforeDestroy() const;
mozilla::PresShell* GetPrintPreviewPresShell();
nsresult Cancel();
void Destroy();
void DestroyPrintingData();