| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_ | |
| 6 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ipc/attachment_broker_unprivileged.h" | |
| 10 #include "ipc/ipc_export.h" | |
| 11 #include "ipc/mach_port_attachment_mac.h" | |
| 12 | |
| 13 namespace IPC { | |
| 14 | |
| 15 class BrokerableAttachment; | |
| 16 | |
| 17 // This class is an implementation of AttachmentBroker for the OSX platform | |
| 18 // for non-privileged processes. | |
| 19 class IPC_EXPORT AttachmentBrokerUnprivilegedMac | |
| 20 : public IPC::AttachmentBrokerUnprivileged { | |
| 21 public: | |
| 22 AttachmentBrokerUnprivilegedMac(); | |
| 23 ~AttachmentBrokerUnprivilegedMac() override; | |
| 24 | |
| 25 // IPC::AttachmentBroker overrides. | |
| 26 bool SendAttachmentToProcess( | |
| 27 const scoped_refptr<IPC::BrokerableAttachment>& attachment, | |
| 28 base::ProcessId destination_process) override; | |
| 29 | |
| 30 // IPC::Listener overrides. | |
| 31 bool OnMessageReceived(const Message& message) override; | |
| 32 | |
| 33 private: | |
| 34 // IPC message handlers. | |
| 35 void OnMachPortHasBeenDuplicated( | |
| 36 const IPC::internal::MachPortAttachmentMac::WireFormat& wire_format); | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivilegedMac); | |
| 39 }; | |
| 40 | |
| 41 } // namespace IPC | |
| 42 | |
| 43 #endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_MAC_H_ | |
| OLD | NEW |