2016-01-05 13:08:57 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef nsDeviceContextSpecProxy_h
|
|
|
|
#define nsDeviceContextSpecProxy_h
|
|
|
|
|
|
|
|
#include "nsIDeviceContextSpec.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2016-11-22 17:06:46 +03:00
|
|
|
#include "nsString.h"
|
2017-10-03 19:29:15 +03:00
|
|
|
#include "mozilla/layout/printing/DrawEventRecorder.h"
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2016-11-22 17:06:46 +03:00
|
|
|
class nsIFile;
|
2016-01-05 13:08:57 +03:00
|
|
|
class nsIPrintSession;
|
2016-11-22 17:06:46 +03:00
|
|
|
class nsIUUIDGenerator;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layout {
|
|
|
|
class RemotePrintJobChild;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2016-08-08 03:54:50 +03:00
|
|
|
NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
|
2018-02-06 09:46:57 +03:00
|
|
|
bool aIsPrintPreview) final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-09 08:22:43 +03:00
|
|
|
already_AddRefed<PrintTarget> MakePrintTarget() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
float GetDPI() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
float GetPrintingScale() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2016-11-22 17:06:46 +03:00
|
|
|
|
2016-08-08 03:54:50 +03:00
|
|
|
NS_IMETHOD BeginDocument(const nsAString& aTitle,
|
|
|
|
const nsAString& aPrintToFileName,
|
2018-02-06 09:46:57 +03:00
|
|
|
int32_t aStartPage, int32_t aEndPage) final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD EndDocument() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD AbortDocument() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD BeginPage() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
NS_IMETHOD EndPage() final;
|
2016-01-05 13:08:57 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
~nsDeviceContextSpecProxy() {}
|
|
|
|
|
|
|
|
nsCOMPtr<nsIPrintSettings> mPrintSettings;
|
|
|
|
nsCOMPtr<nsIPrintSession> mPrintSession;
|
|
|
|
nsCOMPtr<nsIDeviceContextSpec> mRealDeviceContextSpec;
|
|
|
|
RefPtr<mozilla::layout::RemotePrintJobChild> mRemotePrintJob;
|
2017-10-03 19:29:15 +03:00
|
|
|
RefPtr<mozilla::layout::DrawEventRecorderPRFileDesc> mRecorder;
|
2016-01-05 13:08:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsDeviceContextSpecProxy_h
|