Bug 1758688 [wpt PR 33067] - [FedCM] Make revoke a non-static method, a=testonly
[gecko.git] / gfx / thebes / PrintTargetCG.h
blob23d369bf27ce8a68c3764d0f1a37f463192cf7e5
1 /* -*- Mode: C++; tab-width: 20; 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 MOZILLA_GFX_PRINTTARGETCG_H
7 #define MOZILLA_GFX_PRINTTARGETCG_H
9 #include <Carbon/Carbon.h>
10 #include "PrintTarget.h"
12 namespace mozilla {
13 namespace gfx {
15 /**
16 * CoreGraphics printing target.
18 class PrintTargetCG final : public PrintTarget {
19 public:
20 static already_AddRefed<PrintTargetCG> CreateOrNull(
21 PMPrintSession aPrintSession, PMPageFormat aPageFormat,
22 PMPrintSettings aPrintSettings, const IntSize& aSize);
24 nsresult BeginPrinting(const nsAString& aTitle,
25 const nsAString& aPrintToFileName, int32_t aStartPage,
26 int32_t aEndPage) final;
27 nsresult EndPrinting() final;
28 nsresult AbortPrinting() final;
29 nsresult BeginPage() final;
30 nsresult EndPage() final;
32 already_AddRefed<DrawTarget> GetReferenceDrawTarget() final;
34 private:
35 PrintTargetCG(PMPrintSession aPrintSession, PMPageFormat aPageFormat,
36 PMPrintSettings aPrintSettings, const IntSize& aSize);
37 ~PrintTargetCG();
39 PMPrintSession mPrintSession;
40 PMPageFormat mPageFormat;
41 PMPrintSettings mPrintSettings;
44 } // namespace gfx
45 } // namespace mozilla
47 #endif /* MOZILLA_GFX_PRINTTARGETCG_H */