1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * vim: sw=4 ts=4 et : 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef PDFIUMPROCESSPARENT_H 8 #define PDFIUMPROCESSPARENT_H 9 10 #include "chrome/common/child_process_host.h" 11 #include "mozilla/ipc/GeckoChildProcessHost.h" 12 13 class nsIRunnable; 14 class nsDeviceContextSpecWin; 15 16 #ifdef MOZ_ENABLE_SKIA_PDF 17 namespace mozilla { 18 namespace widget { 19 class PDFiumParent; 20 } 21 namespace gfx { 22 class PrintTargetEMF; 23 } 24 } // namespace mozilla 25 #endif 26 27 namespace mozilla { 28 namespace widget { 29 30 class PDFiumProcessParent final : public mozilla::ipc::GeckoChildProcessHost { 31 public: 32 typedef mozilla::gfx::PrintTargetEMF PrintTargetEMF; 33 34 PDFiumProcessParent(); 35 ~PDFiumProcessParent(); 36 37 bool Launch(PrintTargetEMF* aTarget); 38 39 void Delete(); 40 CanShutdown()41 bool CanShutdown() override { return true; } 42 GetActor()43 PDFiumParent* GetActor() const { return mPDFiumParentActor; } 44 45 private: 46 DISALLOW_COPY_AND_ASSIGN(PDFiumProcessParent); 47 48 RefPtr<PDFiumParent> mPDFiumParentActor; 49 nsCOMPtr<nsIThread> mLaunchThread; 50 }; 51 52 } // namespace widget 53 } // namespace mozilla 54 55 #endif // ifndef PDFIUMPROCESSPARENT_H 56