OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ | 5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ |
6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ | 6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ |
7 | 7 |
8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 : public AttachmentBrokerPrivileged { | 22 : public AttachmentBrokerPrivileged { |
23 public: | 23 public: |
24 AttachmentBrokerPrivilegedMac(); | 24 AttachmentBrokerPrivilegedMac(); |
25 ~AttachmentBrokerPrivilegedMac() override; | 25 ~AttachmentBrokerPrivilegedMac() override; |
26 | 26 |
27 // The port provider must live as long as the AttachmentBrokerPrivilegedMac. A | 27 // The port provider must live as long as the AttachmentBrokerPrivilegedMac. A |
28 // port provider must be set before any attachment brokering occurs. | 28 // port provider must be set before any attachment brokering occurs. |
29 void SetPortProvider(base::PortProvider* port_provider); | 29 void SetPortProvider(base::PortProvider* port_provider); |
30 | 30 |
31 // IPC::AttachmentBroker overrides. | 31 // IPC::AttachmentBroker overrides. |
32 bool SendAttachmentToProcess(const BrokerableAttachment* attachment, | 32 bool SendAttachmentToProcess(BrokerableAttachment* attachment, |
33 base::ProcessId destination_process) override; | 33 base::ProcessId destination_process) override; |
34 | 34 |
35 // IPC::Listener overrides. | 35 // IPC::Listener overrides. |
36 bool OnMessageReceived(const Message& message) override; | 36 bool OnMessageReceived(const Message& message) override; |
37 | 37 |
38 private: | 38 private: |
39 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest, | 39 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest, |
40 InsertRight); | 40 InsertRight); |
41 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest, | 41 FRIEND_TEST_ALL_PREFIXES(AttachmentBrokerPrivilegedMacMultiProcessTest, |
42 InsertSameRightTwice); | 42 InsertSameRightTwice); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void RouteDuplicatedMachPort(const MachPortWireFormat& wire_format); | 78 void RouteDuplicatedMachPort(const MachPortWireFormat& wire_format); |
79 | 79 |
80 base::PortProvider* port_provider_; | 80 base::PortProvider* port_provider_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedMac); | 82 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivilegedMac); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace IPC | 85 } // namespace IPC |
86 | 86 |
87 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ | 87 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_MAC_H_ |
OLD | NEW |