1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/components/printingui/src/win/nsPrintingPromptService.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef __nsPrintingPromptService_h 1.10 +#define __nsPrintingPromptService_h 1.11 + 1.12 +#include <windows.h> 1.13 + 1.14 +// {E042570C-62DE-4bb6-A6E0-798E3C07B4DF} 1.15 +#define NS_PRINTINGPROMPTSERVICE_CID \ 1.16 + {0xe042570c, 0x62de, 0x4bb6, { 0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf}} 1.17 +#define NS_PRINTINGPROMPTSERVICE_CONTRACTID \ 1.18 + "@mozilla.org/embedcomp/printingprompt-service;1" 1.19 + 1.20 +#include "nsCOMPtr.h" 1.21 +#include "nsIPrintingPromptService.h" 1.22 +#include "nsPIPromptService.h" 1.23 +#include "nsIWindowWatcher.h" 1.24 + 1.25 +// Printing Progress Includes 1.26 +#include "nsPrintProgress.h" 1.27 +#include "nsPrintProgressParams.h" 1.28 +#include "nsIWebProgressListener.h" 1.29 + 1.30 +class nsIDOMWindow; 1.31 +class nsIDialogParamBlock; 1.32 + 1.33 +class nsPrintingPromptService: public nsIPrintingPromptService, 1.34 + public nsIWebProgressListener 1.35 +{ 1.36 +public: 1.37 + nsPrintingPromptService(); 1.38 + virtual ~nsPrintingPromptService(); 1.39 + 1.40 + nsresult Init(); 1.41 + 1.42 + NS_DECL_ISUPPORTS 1.43 + NS_DECL_NSIPRINTINGPROMPTSERVICE 1.44 + NS_DECL_NSIWEBPROGRESSLISTENER 1.45 + 1.46 +private: 1.47 + HWND GetHWNDForDOMWindow(nsIDOMWindow *parent); 1.48 + nsresult DoDialog(nsIDOMWindow *aParent, 1.49 + nsIDialogParamBlock *aParamBlock, 1.50 + nsIPrintSettings* aPS, 1.51 + const char *aChromeURL); 1.52 + 1.53 + nsCOMPtr<nsIWindowWatcher> mWatcher; 1.54 + nsCOMPtr<nsIPrintProgress> mPrintProgress; 1.55 + nsCOMPtr<nsIWebProgressListener> mWebProgressListener; 1.56 + 1.57 +}; 1.58 + 1.59 +#endif 1.60 +