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
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "FileDescriptorSetParent.h"
8 :
9 : namespace mozilla {
10 : namespace ipc {
11 :
12 0 : FileDescriptorSetParent::FileDescriptorSetParent(
13 0 : const FileDescriptor& aFileDescriptor)
14 : {
15 0 : mFileDescriptors.AppendElement(aFileDescriptor);
16 0 : }
17 :
18 : FileDescriptorSetParent::~FileDescriptorSetParent() = default;
19 :
20 : void
21 0 : FileDescriptorSetParent::ForgetFileDescriptors(
22 : nsTArray<FileDescriptor>& aFileDescriptors)
23 : {
24 0 : aFileDescriptors.Clear();
25 0 : mFileDescriptors.SwapElements(aFileDescriptors);
26 0 : }
27 :
28 : void
29 0 : FileDescriptorSetParent::ActorDestroy(ActorDestroyReason aWhy)
30 : {
31 : // Implement me! Bug 1005157
32 0 : }
33 :
34 : mozilla::ipc::IPCResult
35 0 : FileDescriptorSetParent::RecvAddFileDescriptor(
36 : const FileDescriptor& aFileDescriptor)
37 : {
38 0 : mFileDescriptors.AppendElement(aFileDescriptor);
39 0 : return IPC_OK();
40 : }
41 :
42 : } // namespace ipc
43 : } // namespace mozilla
|