LCOV - code coverage report
Current view: top level - dom/ipc - nsIContentChild.h (source / functions) Hit Total Coverage
Test: output.info Lines: 1 1 100.0 %
Date: 2017-07-14 16:53:18 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       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 file,
       5             :  * You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef mozilla_dom_nsIContentChild_h
       8             : #define mozilla_dom_nsIContentChild_h
       9             : 
      10             : #include "mozilla/dom/ipc/IdType.h"
      11             : 
      12             : #include "nsISupports.h"
      13             : #include "nsTArrayForwardDeclare.h"
      14             : #include "mozilla/dom/CPOWManagerGetter.h"
      15             : #include "mozilla/ipc/Shmem.h"
      16             : #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
      17             : 
      18             : #define NS_ICONTENTCHILD_IID                                    \
      19             :   { 0x4eed2e73, 0x94ba, 0x48a8,                                 \
      20             :     { 0xa2, 0xd1, 0xa5, 0xed, 0x86, 0xd7, 0xbb, 0xe4 } }
      21             : 
      22             : class nsString;
      23             : 
      24             : namespace IPC {
      25             : class Principal;
      26             : } // namespace IPC
      27             : 
      28             : namespace mozilla {
      29             : namespace ipc {
      30             : class FileDescriptor;
      31             : class PFileDescriptorSetChild;
      32             : class PChildToParentStreamChild;
      33             : class PParentToChildStreamChild;
      34             : class Shmem;
      35             : } // namespace ipc
      36             : 
      37             : namespace jsipc {
      38             : class PJavaScriptChild;
      39             : class CpowEntry;
      40             : } // namespace jsipc
      41             : 
      42             : namespace dom {
      43             : 
      44             : class Blob;
      45             : class BlobImpl;
      46             : class BlobConstructorParams;
      47             : class ClonedMessageData;
      48             : class IPCTabContext;
      49             : class PBrowserChild;
      50             : 
      51           2 : class nsIContentChild : public nsISupports
      52             :                       , public CPOWManagerGetter
      53             :                       , public mozilla::ipc::IShmemAllocator
      54             : {
      55             : public:
      56             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTCHILD_IID)
      57             : 
      58             :   virtual bool
      59             :   SendPBrowserConstructor(PBrowserChild* aActor,
      60             :                           const TabId& aTabId,
      61             :                           const TabId& aSameTabGroupAs,
      62             :                           const IPCTabContext& aContext,
      63             :                           const uint32_t& aChromeFlags,
      64             :                           const ContentParentId& aCpID,
      65             :                           const bool& aIsForBrowser) = 0;
      66             : 
      67             :   virtual mozilla::ipc::PFileDescriptorSetChild*
      68             :   SendPFileDescriptorSetConstructor(const mozilla::ipc::FileDescriptor&) = 0;
      69             : 
      70             :   virtual mozilla::ipc::PChildToParentStreamChild*
      71             :   SendPChildToParentStreamConstructor(mozilla::ipc::PChildToParentStreamChild*) = 0;
      72             : 
      73             :   virtual already_AddRefed<nsIEventTarget>
      74             :   GetEventTargetFor(TabChild* aTabChild) = 0;
      75             : 
      76             : protected:
      77             :   virtual jsipc::PJavaScriptChild* AllocPJavaScriptChild();
      78             :   virtual bool DeallocPJavaScriptChild(jsipc::PJavaScriptChild*);
      79             : 
      80             :   virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
      81             :                                             const TabId& aSameTabGroupAs,
      82             :                                             const IPCTabContext& aContext,
      83             :                                             const uint32_t& aChromeFlags,
      84             :                                             const ContentParentId& aCpId,
      85             :                                             const bool& aIsForBrowser);
      86             :   virtual bool DeallocPBrowserChild(PBrowserChild*);
      87             : 
      88             :   virtual mozilla::ipc::IPCResult RecvPBrowserConstructor(PBrowserChild* aActor,
      89             :                                                           const TabId& aTabId,
      90             :                                                           const TabId& aSameTabGroupAs,
      91             :                                                           const IPCTabContext& aContext,
      92             :                                                           const uint32_t& aChromeFlags,
      93             :                                                           const ContentParentId& aCpID,
      94             :                                                           const bool& aIsForBrowse);
      95             : 
      96             :   virtual mozilla::ipc::PIPCBlobInputStreamChild*
      97             :   AllocPIPCBlobInputStreamChild(const nsID& aID, const uint64_t& aSize);
      98             : 
      99             :   virtual bool
     100             :   DeallocPIPCBlobInputStreamChild(mozilla::ipc::PIPCBlobInputStreamChild* aActor);
     101             : 
     102             :   virtual mozilla::ipc::PChildToParentStreamChild* AllocPChildToParentStreamChild();
     103             : 
     104             :   virtual bool
     105             :   DeallocPChildToParentStreamChild(mozilla::ipc::PChildToParentStreamChild* aActor);
     106             : 
     107             :   virtual mozilla::ipc::PParentToChildStreamChild* AllocPParentToChildStreamChild();
     108             : 
     109             :   virtual bool
     110             :   DeallocPParentToChildStreamChild(mozilla::ipc::PParentToChildStreamChild* aActor);
     111             : 
     112             :   virtual mozilla::ipc::PFileDescriptorSetChild*
     113             :   AllocPFileDescriptorSetChild(const mozilla::ipc::FileDescriptor& aFD);
     114             : 
     115             :   virtual bool
     116             :   DeallocPFileDescriptorSetChild(mozilla::ipc::PFileDescriptorSetChild* aActor);
     117             : 
     118             :   virtual mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMsg,
     119             :                                                    InfallibleTArray<jsipc::CpowEntry>&& aCpows,
     120             :                                                    const IPC::Principal& aPrincipal,
     121             :                                                    const ClonedMessageData& aData);
     122             : 
     123             :   static already_AddRefed<nsIEventTarget> GetConstructedEventTarget(const IPC::Message& aMsg);
     124             : };
     125             : 
     126             : NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentChild, NS_ICONTENTCHILD_IID)
     127             : 
     128             : } // namespace dom
     129             : } // namespace mozilla
     130             : 
     131             : #endif /* mozilla_dom_nsIContentChild_h */

Generated by: LCOV version 1.13