mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1558210. Make various nsPrintJob methods private. r=bobowen
Also removes two unused (not even defined) method declarations. Differential Revision: https://phabricator.services.mozilla.com/D34357 --HG-- extra : rebase_source : bd03bbe8f6a532aa38f9ae871e0b60ca9fa088a7 extra : amend_source : 758bb89dbe6413116647f78ced8afa41b9ce422e
This commit is contained in:
parent
8359c6b639
commit
48364b8cbb
@ -120,43 +120,20 @@ class nsPrintJob final : public nsIObserver,
|
||||
nsresult GetDocumentName(nsAString& aDocName);
|
||||
already_AddRefed<nsIPrintSettings> GetCurrentPrintSettings();
|
||||
|
||||
// The setters here also update the DocViewer
|
||||
void SetIsPrinting(bool aIsPrinting);
|
||||
bool GetIsPrinting() { return mIsDoingPrinting; }
|
||||
void SetIsPrintPreview(bool aIsPrintPreview);
|
||||
bool GetIsPrintPreview() { return mIsDoingPrintPreview; }
|
||||
bool GetIsCreatingPrintPreview() { return mIsCreatingPrintPreview; }
|
||||
|
||||
// This enum tells indicates what the default should be for the title
|
||||
// if the title from the document is null
|
||||
enum eDocTitleDefault { eDocTitleDefBlank, eDocTitleDefURLDoc };
|
||||
|
||||
void Destroy();
|
||||
void DestroyPrintingData();
|
||||
|
||||
nsresult GetSeqFrameAndCountPages(nsIFrame*& aSeqFrame, int32_t& aCount);
|
||||
|
||||
//
|
||||
// The following three methods are used for printing...
|
||||
//
|
||||
nsresult DocumentReadyForPrinting();
|
||||
nsresult GetSelectionDocument(nsIDeviceContextSpec* aDevSpec,
|
||||
mozilla::dom::Document** aNewDoc);
|
||||
|
||||
nsresult SetupToPrintContent();
|
||||
nsresult EnablePOsForPrinting();
|
||||
nsPrintObject* FindSmallestSTF();
|
||||
|
||||
bool PrintDocContent(const mozilla::UniquePtr<nsPrintObject>& aPO,
|
||||
nsresult& aStatus);
|
||||
nsresult DoPrint(const mozilla::UniquePtr<nsPrintObject>& aPO);
|
||||
|
||||
void SetPrintPO(nsPrintObject* aPO, bool aPrint);
|
||||
|
||||
void TurnScriptingOn(bool aDoTurnOn);
|
||||
bool CheckDocumentForPPCaching();
|
||||
|
||||
/**
|
||||
* Filters out certain user events while Print Preview is open to prevent
|
||||
* the user from interacting with the Print Preview document and breaking
|
||||
* printing invariants.
|
||||
*/
|
||||
void SuppressPrintPreviewUserEvents();
|
||||
|
||||
// nsIDocumentViewerPrint Printing Methods:
|
||||
|
||||
/**
|
||||
* Checks to see if the document this print engine is associated with has any
|
||||
@ -168,7 +145,48 @@ class nsPrintJob final : public nsIObserver,
|
||||
bool PrintPage(nsPrintObject* aPOect, bool& aInRange);
|
||||
bool DonePrintingPages(nsPrintObject* aPO, nsresult aResult);
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
nsresult CleanupOnFailure(nsresult aResult, bool aIsPrinting);
|
||||
// If FinishPrintPreview() fails, caller may need to reset the state of the
|
||||
// object, for example by calling CleanupOnFailure().
|
||||
nsresult FinishPrintPreview();
|
||||
void FirePrintingErrorEvent(nsresult aPrintError);
|
||||
bool CheckBeforeDestroy() const { return mPrt && mPrt->mPreparingForPrint; }
|
||||
|
||||
mozilla::PresShell* GetPrintPreviewPresShell() {
|
||||
return mPrtPreview->mPrintObject->mPresShell;
|
||||
}
|
||||
|
||||
float GetPrintPreviewScale() {
|
||||
return mPrtPreview->mPrintObject->mPresContext->GetPrintPreviewScale();
|
||||
}
|
||||
|
||||
nsresult Cancel();
|
||||
void Destroy();
|
||||
void DestroyPrintingData();
|
||||
|
||||
private:
|
||||
nsPrintJob& operator=(const nsPrintJob& aOther) = delete;
|
||||
|
||||
~nsPrintJob();
|
||||
|
||||
nsresult DocumentReadyForPrinting();
|
||||
nsresult SetupToPrintContent();
|
||||
nsresult EnablePOsForPrinting();
|
||||
nsPrintObject* FindSmallestSTF();
|
||||
|
||||
bool PrintDocContent(const mozilla::UniquePtr<nsPrintObject>& aPO,
|
||||
nsresult& aStatus);
|
||||
nsresult DoPrint(const mozilla::UniquePtr<nsPrintObject>& aPO);
|
||||
|
||||
void SetPrintPO(nsPrintObject* aPO, bool aPrint);
|
||||
|
||||
/**
|
||||
* Filters out certain user events while Print Preview is open to prevent
|
||||
* the user from interacting with the Print Preview document and breaking
|
||||
* printing invariants.
|
||||
*/
|
||||
void SuppressPrintPreviewUserEvents();
|
||||
|
||||
nsresult ReflowDocList(const mozilla::UniquePtr<nsPrintObject>& aPO,
|
||||
bool aSetPixelScale);
|
||||
|
||||
@ -177,10 +195,6 @@ class nsPrintJob final : public nsIObserver,
|
||||
|
||||
void CalcNumPrintablePages(int32_t& aNumPages);
|
||||
void ShowPrintProgress(bool aIsForPrinting, bool& aDoNotify);
|
||||
nsresult CleanupOnFailure(nsresult aResult, bool aIsPrinting);
|
||||
// If FinishPrintPreview() fails, caller may need to reset the state of the
|
||||
// object, for example by calling CleanupOnFailure().
|
||||
nsresult FinishPrintPreview();
|
||||
void SetURLAndTitleOnProgressParams(
|
||||
const mozilla::UniquePtr<nsPrintObject>& aPO,
|
||||
nsIPrintProgressParams* aParams);
|
||||
@ -188,10 +202,6 @@ class nsPrintJob final : public nsIObserver,
|
||||
|
||||
bool IsThereARangeSelection(nsPIDOMWindowOuter* aDOMWin);
|
||||
|
||||
void FirePrintingErrorEvent(nsresult aPrintError);
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
// Timer Methods
|
||||
nsresult StartPagePrintTimer(const mozilla::UniquePtr<nsPrintObject>& aPO);
|
||||
|
||||
bool IsWindowsInOurSubTree(nsPIDOMWindowOuter* aDOMWindow) const;
|
||||
@ -206,30 +216,6 @@ class nsPrintJob final : public nsIObserver,
|
||||
nsAString& aTitle, nsAString& aURLStr,
|
||||
eDocTitleDefault aDefType);
|
||||
|
||||
bool CheckBeforeDestroy() const { return mPrt && mPrt->mPreparingForPrint; }
|
||||
|
||||
nsresult Cancel();
|
||||
|
||||
mozilla::PresShell* GetPrintPreviewPresShell() {
|
||||
return mPrtPreview->mPrintObject->mPresShell;
|
||||
}
|
||||
|
||||
float GetPrintPreviewScale() {
|
||||
return mPrtPreview->mPrintObject->mPresContext->GetPrintPreviewScale();
|
||||
}
|
||||
|
||||
// These calls also update the DocViewer
|
||||
void SetIsPrinting(bool aIsPrinting);
|
||||
bool GetIsPrinting() { return mIsDoingPrinting; }
|
||||
void SetIsPrintPreview(bool aIsPrintPreview);
|
||||
bool GetIsPrintPreview() { return mIsDoingPrintPreview; }
|
||||
bool GetIsCreatingPrintPreview() { return mIsCreatingPrintPreview; }
|
||||
|
||||
private:
|
||||
nsPrintJob& operator=(const nsPrintJob& aOther) = delete;
|
||||
|
||||
~nsPrintJob();
|
||||
|
||||
nsresult CommonPrint(bool aIsPrintPreview, nsIPrintSettings* aPrintSettings,
|
||||
nsIWebProgressListener* aWebProgressListener,
|
||||
mozilla::dom::Document* aSourceDoc);
|
||||
|
Loading…
Reference in New Issue
Block a user