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 nsDeviceContextSpecProxy_h
8 #define nsDeviceContextSpecProxy_h
10 #include "nsIDeviceContextSpec.h"
13 #include "mozilla/layout/printing/DrawEventRecorder.h"
16 class nsIPrintSession
;
17 class nsIUUIDGenerator
;
21 class RemotePrintJobChild
;
23 } // namespace mozilla
25 class nsDeviceContextSpecProxy final
: public nsIDeviceContextSpec
{
29 NS_IMETHOD
Init(nsIWidget
* aWidget
, nsIPrintSettings
* aPrintSettings
,
30 bool aIsPrintPreview
) final
;
32 already_AddRefed
<PrintTarget
> MakePrintTarget() final
;
34 NS_IMETHOD
GetDrawEventRecorder(
35 mozilla::gfx::DrawEventRecorder
** aDrawEventRecorder
) final
;
39 float GetPrintingScale() final
;
41 gfxPoint
GetPrintingTranslate() final
;
43 NS_IMETHOD
BeginDocument(const nsAString
& aTitle
,
44 const nsAString
& aPrintToFileName
,
45 int32_t aStartPage
, int32_t aEndPage
) final
;
47 NS_IMETHOD
EndDocument() final
;
49 NS_IMETHOD
AbortDocument() final
;
51 NS_IMETHOD
BeginPage() final
;
53 NS_IMETHOD
EndPage() final
;
55 nsDeviceContextSpecProxy();
58 ~nsDeviceContextSpecProxy();
60 nsCOMPtr
<nsIPrintSettings
> mPrintSettings
;
61 nsCOMPtr
<nsIPrintSession
> mPrintSession
;
62 nsCOMPtr
<nsIDeviceContextSpec
> mRealDeviceContextSpec
;
63 RefPtr
<mozilla::layout::RemotePrintJobChild
> mRemotePrintJob
;
64 RefPtr
<mozilla::layout::DrawEventRecorderPRFileDesc
> mRecorder
;
67 #endif // nsDeviceContextSpecProxy_h