Bug 1692971 [wpt PR 27638] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / widget / android / nsDeviceContextAndroid.h
blob546f07959411569117e1cb5029d7bec8089b8062
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"
11 class nsDeviceContextSpecAndroid final : public nsIDeviceContextSpec {
12 private:
13 ~nsDeviceContextSpecAndroid() {}
15 public:
16 NS_DECL_ISUPPORTS
18 already_AddRefed<PrintTarget> MakePrintTarget() final;
20 NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS,
21 bool aIsPrintPreview) override;
22 NS_IMETHOD BeginDocument(const nsAString& aTitle,
23 const nsAString& aPrintToFileName,
24 int32_t aStartPage, int32_t aEndPage) override;
25 NS_IMETHOD EndDocument() override;
26 NS_IMETHOD BeginPage() override { return NS_OK; }
27 NS_IMETHOD EndPage() override { return NS_OK; }
29 private:
30 nsCOMPtr<nsIPrintSettings> mPrintSettings;
31 nsCOMPtr<nsIFile> mTempFile;
33 #endif // nsDeviceContextAndroid_h__