2014-03-25 11:37:28 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
#ifndef mozilla_ipc_FileDescriptorSetParent_h__
|
|
|
|
#define mozilla_ipc_FileDescriptorSetParent_h__
|
2014-03-25 11:37:28 -07:00
|
|
|
|
|
|
|
#include "mozilla/Assertions.h"
|
|
|
|
#include "mozilla/Attributes.h"
|
2014-09-26 16:21:57 -07:00
|
|
|
#include "mozilla/ipc/PFileDescriptorSetParent.h"
|
2014-03-25 11:37:28 -07:00
|
|
|
#include "nsTArray.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
namespace dom {
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
class ContentParent;
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
} // namespace dom
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
namespace ipc {
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
class BackgroundParentImpl;
|
|
|
|
class FileDescriptor;
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
class FileDescriptorSetParent MOZ_FINAL
|
|
|
|
: public PFileDescriptorSetParent
|
2014-03-25 11:37:28 -07:00
|
|
|
{
|
2014-09-26 16:21:57 -07:00
|
|
|
friend class BackgroundParentImpl;
|
|
|
|
friend class mozilla::dom::ContentParent;
|
2014-03-25 11:37:28 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
nsTArray<FileDescriptor> mFileDescriptors;
|
2014-09-17 16:36:01 -07:00
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
public:
|
2014-03-25 11:37:28 -07:00
|
|
|
void
|
|
|
|
ForgetFileDescriptors(nsTArray<FileDescriptor>& aFileDescriptors);
|
|
|
|
|
|
|
|
private:
|
2014-08-08 06:49:39 -07:00
|
|
|
explicit FileDescriptorSetParent(const FileDescriptor& aFileDescriptor);
|
2014-03-25 11:37:28 -07:00
|
|
|
~FileDescriptorSetParent();
|
|
|
|
|
2014-05-02 11:44:13 -07:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
|
|
|
|
2014-03-25 11:37:28 -07:00
|
|
|
virtual bool
|
|
|
|
RecvAddFileDescriptor(const FileDescriptor& aFileDescriptor) MOZ_OVERRIDE;
|
|
|
|
};
|
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
} // namespace ipc
|
2014-03-25 11:37:28 -07:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-09-26 16:21:57 -07:00
|
|
|
#endif // mozilla_ipc_FileDescriptorSetParent_h__
|