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 PDFIUMCHILD_H_
7 #define PDFIUMCHILD_H_
8 
9 #include "mozilla/widget/PPDFiumChild.h"
10 
11 namespace mozilla {
12 namespace widget {
13 
14 class PDFiumChild final : public PPDFiumChild,
15                           public mozilla::ipc::IShmemAllocator {
16  public:
17   PDFiumChild();
18   virtual ~PDFiumChild();
19 
20   bool Init(base::ProcessId aParentPid, MessageLoop* aIOLoop,
21             IPC::Channel* aChannel);
22 
23   FORWARD_SHMEM_ALLOCATOR_TO(PPDFiumChild)
24 
25  private:
26   // PPDFiumChild functions.
27   mozilla::ipc::IPCResult RecvConvertToEMF(const FileDescriptor& aFD,
28                                            const int& aPageWidth,
29                                            const int& aPageHeight) override;
30   void ActorDestroy(ActorDestroyReason aWhy) override;
31   void OnChannelConnected(int32_t pid) override;
32 };
33 
34 }  // namespace widget
35 }  // namespace mozilla
36 
37 #endif  // PDFIUMCHILD_H_