Backed out 2 changesets (bug 1879954, bug 1878725) for causing failures on test_deleg...
[gecko.git] / layout / printing / nsPrintData.h
blob5d308fc7af215421d5af72281b41d84a0002aeb8
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPrintData_h___
8 #define nsPrintData_h___
10 #include "mozilla/Attributes.h"
11 #include "mozilla/UniquePtr.h"
13 // Interfaces
14 #include "nsDeviceContext.h"
15 #include "nsIPrintSettings.h"
16 #include "nsISupportsImpl.h"
17 #include "nsCOMArray.h"
19 class nsPrintObject;
20 class nsIWebProgressListener;
22 class nsPrintData {
23 public:
24 typedef enum { eIsPrinting, eIsPrintPreview } ePrintDataType;
26 explicit nsPrintData(ePrintDataType aType);
28 NS_INLINE_DECL_REFCOUNTING(nsPrintData)
30 // Listener Helper Methods
31 void OnEndPrinting();
32 void OnStartPrinting();
33 void DoOnProgressChange(int32_t aProgress, int32_t aMaxProgress,
34 bool aDoStartStop, int32_t aFlag);
36 void DoOnStatusChange(nsresult aStatus);
38 ePrintDataType mType; // the type of data this is (Printing or Print Preview)
39 RefPtr<nsDeviceContext> mPrintDC;
41 nsCOMArray<nsIWebProgressListener> mPrintProgressListeners;
43 bool mOnStartSent;
44 bool mIsAborted; // tells us the document is being aborted
46 private:
47 nsPrintData() = delete;
48 nsPrintData& operator=(const nsPrintData& aOther) = delete;
50 ~nsPrintData(); // non-virtual
53 #endif /* nsPrintData_h___ */