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/PrintPromise.h"
12 class nsDeviceContextSpecAndroid final
: public nsIDeviceContextSpec
{
14 virtual ~nsDeviceContextSpecAndroid();
19 already_AddRefed
<PrintTarget
> MakePrintTarget() final
;
21 NS_IMETHOD
Init(nsIPrintSettings
* aPS
, bool aIsPrintPreview
) override
;
22 NS_IMETHOD
BeginDocument(const nsAString
& aTitle
,
23 const nsAString
& aPrintToFileName
,
24 int32_t aStartPage
, int32_t aEndPage
) override
;
25 RefPtr
<mozilla::gfx::PrintEndDocumentPromise
> EndDocument() override
;
26 NS_IMETHOD
BeginPage() override
{ return NS_OK
; }
27 NS_IMETHOD
EndPage() override
{ return NS_OK
; }
30 nsresult
DoEndDocument();
31 nsCOMPtr
<nsIFile
> mTempFile
;
33 #endif // nsDeviceContextAndroid_h__