1 /* -*- Mode: C++; tab-width: 2; 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/. */
5 #ifndef nsDeviceContextAndroid_h__
6 #define nsDeviceContextAndroid_h__
8 #include "nsIDeviceContextSpec.h"
10 #include "mozilla/gfx/Point.h"
11 #include "mozilla/gfx/PrintPromise.h"
13 class nsDeviceContextSpecAndroid final
: public nsIDeviceContextSpec
{
15 virtual ~nsDeviceContextSpecAndroid();
18 using IntSize
= mozilla::gfx::IntSize
;
22 already_AddRefed
<PrintTarget
> MakePrintTarget() final
;
24 NS_IMETHOD
Init(nsIPrintSettings
* aPS
, bool aIsPrintPreview
) override
;
25 NS_IMETHOD
BeginDocument(const nsAString
& aTitle
,
26 const nsAString
& aPrintToFileName
,
27 int32_t aStartPage
, int32_t aEndPage
) override
;
28 RefPtr
<mozilla::gfx::PrintEndDocumentPromise
> EndDocument() override
;
29 NS_IMETHOD
BeginPage(const IntSize
& aSizeInPoints
) override
{ return NS_OK
; }
30 NS_IMETHOD
EndPage() override
{ return NS_OK
; }
33 nsresult
DoEndDocument();
34 nsCOMPtr
<nsIFile
> mTempFile
;
36 #endif // nsDeviceContextAndroid_h__