1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
5 #ifndef mozilla_embedding_PrintProgressDialogChild_h
6 #define mozilla_embedding_PrintProgressDialogChild_h
7 
8 #include "mozilla/embedding/PPrintProgressDialogChild.h"
9 #include "nsIPrintProgressParams.h"
10 #include "nsIPrintSettings.h"
11 #include "nsIWebProgressListener.h"
12 
13 class nsIObserver;
14 
15 namespace mozilla {
16 namespace embedding {
17 
18 class PrintProgressDialogChild final : public PPrintProgressDialogChild,
19                                        public nsIWebProgressListener,
20                                        public nsIPrintProgressParams {
21   NS_DECL_ISUPPORTS
22   NS_DECL_NSIWEBPROGRESSLISTENER
23   NS_DECL_NSIPRINTPROGRESSPARAMS
24 
25  public:
26   MOZ_IMPLICIT PrintProgressDialogChild(nsIObserver* aOpenObserver,
27                                         nsIPrintSettings* aPrintSettings);
28 
29   virtual mozilla::ipc::IPCResult RecvDialogOpened() override;
30 
31   virtual mozilla::ipc::IPCResult RecvCancelledCurrentJob() override;
32 
33  private:
34   virtual ~PrintProgressDialogChild();
35   nsCOMPtr<nsIObserver> mOpenObserver;
36   nsString mDocTitle;
37   nsString mDocURL;
38   nsCOMPtr<nsIPrintSettings> mPrintSettings;
39 };
40 
41 }  // namespace embedding
42 }  // namespace mozilla
43 
44 #endif
45