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 nsPrintDialog_h__
7 #define nsPrintDialog_h__
8 
9 #include "nsIPrintDialogService.h"
10 
11 #include "nsCOMPtr.h"
12 #include "nsIWindowWatcher.h"
13 
14 class nsIPrintSettings;
15 class nsIDialogParamBlock;
16 
17 class nsPrintDialogServiceWin : public nsIPrintDialogService {
18   virtual ~nsPrintDialogServiceWin();
19 
20  public:
21   nsPrintDialogServiceWin();
22 
23   NS_DECL_ISUPPORTS
24 
25   NS_IMETHOD Init() override;
26   NS_IMETHOD Show(nsPIDOMWindowOuter* aParent,
27                   nsIPrintSettings* aSettings) override;
28   NS_IMETHOD ShowPageSetup(nsPIDOMWindowOuter* aParent,
29                            nsIPrintSettings* aSettings) override;
30 
31  private:
32   nsresult DoDialog(mozIDOMWindowProxy* aParent,
33                     nsIDialogParamBlock* aParamBlock, nsIPrintSettings* aPS,
34                     const char* aChromeURL);
35 
36   HWND GetHWNDForDOMWindow(mozIDOMWindowProxy* aWindow);
37 
38   nsCOMPtr<nsIWindowWatcher> mWatcher;
39 };
40 
41 #endif
42