Bug 1794292 - [ANGLE] cherry-pick init-gl-point-size. r=gfx-reviewers,bradwerth
[gecko.git] / widget / android / nsDeviceContextAndroid.h
blob1ab3c72c1cd1db5e0023a456f935175b0fc7291e
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"
9 #include "nsCOMPtr.h"
10 #include "mozilla/gfx/PrintPromise.h"
12 class nsDeviceContextSpecAndroid final : public nsIDeviceContextSpec {
13 private:
14 virtual ~nsDeviceContextSpecAndroid();
16 public:
17 NS_DECL_ISUPPORTS
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; }
29 private:
30 nsresult DoEndDocument();
31 nsCOMPtr<nsIFile> mTempFile;
33 #endif // nsDeviceContextAndroid_h__