|
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 |
|
6 #ifndef __nsPrintingPromptService_h |
|
7 #define __nsPrintingPromptService_h |
|
8 |
|
9 #include <windows.h> |
|
10 |
|
11 // {E042570C-62DE-4bb6-A6E0-798E3C07B4DF} |
|
12 #define NS_PRINTINGPROMPTSERVICE_CID \ |
|
13 {0xe042570c, 0x62de, 0x4bb6, { 0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf}} |
|
14 #define NS_PRINTINGPROMPTSERVICE_CONTRACTID \ |
|
15 "@mozilla.org/embedcomp/printingprompt-service;1" |
|
16 |
|
17 #include "nsCOMPtr.h" |
|
18 #include "nsIPrintingPromptService.h" |
|
19 #include "nsPIPromptService.h" |
|
20 #include "nsIWindowWatcher.h" |
|
21 |
|
22 // Printing Progress Includes |
|
23 #include "nsPrintProgress.h" |
|
24 #include "nsPrintProgressParams.h" |
|
25 #include "nsIWebProgressListener.h" |
|
26 |
|
27 class nsIDOMWindow; |
|
28 class nsIDialogParamBlock; |
|
29 |
|
30 class nsPrintingPromptService: public nsIPrintingPromptService, |
|
31 public nsIWebProgressListener |
|
32 { |
|
33 public: |
|
34 nsPrintingPromptService(); |
|
35 virtual ~nsPrintingPromptService(); |
|
36 |
|
37 nsresult Init(); |
|
38 |
|
39 NS_DECL_ISUPPORTS |
|
40 NS_DECL_NSIPRINTINGPROMPTSERVICE |
|
41 NS_DECL_NSIWEBPROGRESSLISTENER |
|
42 |
|
43 private: |
|
44 HWND GetHWNDForDOMWindow(nsIDOMWindow *parent); |
|
45 nsresult DoDialog(nsIDOMWindow *aParent, |
|
46 nsIDialogParamBlock *aParamBlock, |
|
47 nsIPrintSettings* aPS, |
|
48 const char *aChromeURL); |
|
49 |
|
50 nsCOMPtr<nsIWindowWatcher> mWatcher; |
|
51 nsCOMPtr<nsIPrintProgress> mPrintProgress; |
|
52 nsCOMPtr<nsIWebProgressListener> mWebProgressListener; |
|
53 |
|
54 }; |
|
55 |
|
56 #endif |
|
57 |