tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsPrintData.h (1425B)


      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/. */
      6 
      7 #ifndef nsPrintData_h___
      8 #define nsPrintData_h___
      9 
     10 // Interfaces
     11 #include "nsCOMArray.h"
     12 #include "nsDeviceContext.h"
     13 #include "nsIPrintSettings.h"
     14 #include "nsISupportsImpl.h"
     15 
     16 class nsPrintObject;
     17 class nsIWebProgressListener;
     18 
     19 class nsPrintData {
     20 public:
     21  typedef enum { eIsPrinting, eIsPrintPreview } ePrintDataType;
     22 
     23  explicit nsPrintData(ePrintDataType aType);
     24 
     25  NS_INLINE_DECL_REFCOUNTING(nsPrintData)
     26 
     27  // Listener Helper Methods
     28  void OnEndPrinting();
     29  void OnStartPrinting();
     30  void DoOnProgressChange(int32_t aProgress, int32_t aMaxProgress,
     31                          bool aDoStartStop, int32_t aFlag);
     32 
     33  void DoOnStatusChange(nsresult aStatus);
     34 
     35  ePrintDataType mType;  // the type of data this is (Printing or Print Preview)
     36  RefPtr<nsDeviceContext> mPrintDC;
     37 
     38  nsCOMArray<nsIWebProgressListener> mPrintProgressListeners;
     39 
     40  bool mOnStartSent;
     41  bool mIsAborted;  // tells us the document is being aborted
     42 
     43 private:
     44  nsPrintData() = delete;
     45  nsPrintData& operator=(const nsPrintData& aOther) = delete;
     46 
     47  ~nsPrintData();  // non-virtual
     48 };
     49 
     50 #endif /* nsPrintData_h___ */