Bug 1776444 [wpt PR 34582] - Revert "Add TimedHTMLParserBudget to fieldtrial_testing_...
[gecko.git] / widget / cocoa / nsDeviceContextSpecX.h
blobe0d11c12e08f84edfbde58531d4e0d7838c073c8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsDeviceContextSpecX_h_
7 #define nsDeviceContextSpecX_h_
9 #include "nsIDeviceContextSpec.h"
10 #include "nsIPrinter.h"
11 #include "nsIPrinterList.h"
13 #include "nsCOMPtr.h"
15 #include <ApplicationServices/ApplicationServices.h>
17 class nsDeviceContextSpecX : public nsIDeviceContextSpec {
18 public:
19 NS_DECL_ISUPPORTS
21 nsDeviceContextSpecX();
23 NS_IMETHOD Init(nsIPrintSettings* aPS, bool aIsPrintPreview) override;
24 already_AddRefed<PrintTarget> MakePrintTarget() final;
25 NS_IMETHOD BeginDocument(const nsAString& aTitle,
26 const nsAString& aPrintToFileName,
27 int32_t aStartPage, int32_t aEndPage) override;
28 NS_IMETHOD EndDocument() override;
29 NS_IMETHOD BeginPage() override { return NS_OK; };
30 NS_IMETHOD EndPage() override { return NS_OK; };
32 void GetPaperRect(double* aTop, double* aLeft, double* aBottom,
33 double* aRight);
35 protected:
36 virtual ~nsDeviceContextSpecX();
38 protected:
39 PMPrintSession mPrintSession = nullptr;
40 PMPageFormat mPageFormat = nullptr;
41 PMPrintSettings mPMPrintSettings = nullptr;
42 nsCOMPtr<nsIOutputStream> mOutputStream; // Output stream from settings.
43 #ifdef MOZ_ENABLE_SKIA_PDF
44 // file "print" output generated if printing via PDF
45 nsCOMPtr<nsIFile> mTempFile;
46 #endif
49 #endif // nsDeviceContextSpecX_h_