mirror of
https://github.com/ManchildProductions/UXP-Fixed.git
synced 2026-05-28 01:48:33 +00:00
a680bdc637
Since these are just interpreted comments, there's 0 impact on actual code. This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are a few others scattered around which will be removed manually in a second part.
84 lines
2.6 KiB
C++
84 lines
2.6 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* 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 mozilla_layout_RemotePrintJobParent_h
|
|
#define mozilla_layout_RemotePrintJobParent_h
|
|
|
|
#include "mozilla/layout/PRemotePrintJobParent.h"
|
|
|
|
#include "nsCOMArray.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "mozilla/RefPtr.h"
|
|
#include "mozilla/UniquePtr.h"
|
|
#include "mozilla/layout/PrintTranslator.h"
|
|
|
|
class nsDeviceContext;
|
|
class nsIPrintSettings;
|
|
class nsIWebProgressListener;
|
|
|
|
namespace mozilla {
|
|
namespace layout {
|
|
|
|
class RemotePrintJobParent final : public PRemotePrintJobParent
|
|
{
|
|
public:
|
|
explicit RemotePrintJobParent(nsIPrintSettings* aPrintSettings);
|
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) final;
|
|
|
|
bool RecvInitializePrint(const nsString& aDocumentTitle,
|
|
const nsString& aPrintToFile,
|
|
const int32_t& aStartPage,
|
|
const int32_t& aEndPage) final;
|
|
|
|
bool RecvProcessPage(const nsCString& aPageFileName) final;
|
|
|
|
bool RecvFinalizePrint() final;
|
|
|
|
bool RecvAbortPrint(const nsresult& aRv) final;
|
|
|
|
bool RecvStateChange(const long& aStateFlags,
|
|
const nsresult& aStatus) final;
|
|
|
|
bool RecvProgressChange(const long& aCurSelfProgress,
|
|
const long& aMaxSelfProgress,
|
|
const long& aCurTotalProgress,
|
|
const long& aMaxTotalProgress) final;
|
|
|
|
bool RecvStatusChange(const nsresult& aStatus) final;
|
|
|
|
/**
|
|
* Register a progress listener to receive print progress updates.
|
|
*
|
|
* @param aListener the progress listener to register. Must not be null.
|
|
*/
|
|
void RegisterListener(nsIWebProgressListener* aListener);
|
|
|
|
/**
|
|
* @return the print settings for this remote print job.
|
|
*/
|
|
already_AddRefed<nsIPrintSettings> GetPrintSettings();
|
|
|
|
private:
|
|
~RemotePrintJobParent() final;
|
|
|
|
nsresult InitializePrintDevice(const nsString& aDocumentTitle,
|
|
const nsString& aPrintToFile,
|
|
const int32_t& aStartPage,
|
|
const int32_t& aEndPage);
|
|
|
|
nsresult PrintPage(const nsCString& aPageFileName);
|
|
|
|
nsCOMPtr<nsIPrintSettings> mPrintSettings;
|
|
RefPtr<nsDeviceContext> mPrintDeviceContext;
|
|
UniquePtr<PrintTranslator> mPrintTranslator;
|
|
nsCOMArray<nsIWebProgressListener> mPrintProgressListeners;
|
|
};
|
|
|
|
} // namespace layout
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_layout_RemotePrintJobParent_h
|