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_PrintProgressDialogParent_h 6 #define mozilla_embedding_PrintProgressDialogParent_h 7 8 #include "mozilla/embedding/PPrintProgressDialogParent.h" 9 #include "nsIObserver.h" 10 11 class nsIPrintProgressParams; 12 class nsIWebProgressListener; 13 14 namespace mozilla { 15 namespace embedding { 16 class PrintProgressDialogParent final : public PPrintProgressDialogParent, 17 public nsIObserver 18 { 19 public: 20 NS_DECL_ISUPPORTS 21 NS_DECL_NSIOBSERVER 22 23 MOZ_IMPLICIT PrintProgressDialogParent(); 24 25 void SetWebProgressListener(nsIWebProgressListener* aListener); 26 27 void SetPrintProgressParams(nsIPrintProgressParams* aParams); 28 29 virtual bool 30 RecvStateChange( 31 const long& stateFlags, 32 const nsresult& status) override; 33 34 virtual bool 35 RecvProgressChange( 36 const long& curSelfProgress, 37 const long& maxSelfProgress, 38 const long& curTotalProgress, 39 const long& maxTotalProgress) override; 40 41 virtual bool 42 RecvDocTitleChange(const nsString& newTitle) override; 43 44 virtual bool 45 RecvDocURLChange(const nsString& newURL) override; 46 47 virtual void 48 ActorDestroy(ActorDestroyReason aWhy) override; 49 50 virtual bool 51 Recv__delete__() override; 52 53 private: 54 virtual ~PrintProgressDialogParent(); 55 56 nsCOMPtr<nsIWebProgressListener> mWebProgressListener; 57 nsCOMPtr<nsIPrintProgressParams> mPrintProgressParams; 58 bool mActive; 59 }; 60 61 } // namespace embedding 62 } // namespace mozilla 63 64 #endif 65