| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_MACH_IPC_MAC_H_ | 5 #ifndef BASE_MACH_IPC_MAC_H_ |
| 6 #define BASE_MACH_IPC_MAC_H_ | 6 #define BASE_MACH_IPC_MAC_H_ |
| 7 | 7 |
| 8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
| 9 #include <mach/message.h> | 9 #include <mach/message.h> |
| 10 #include <servers/bootstrap.h> | 10 #include <servers/bootstrap.h> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 MachMsgPortDescriptor(mach_port_t in_name, | 82 MachMsgPortDescriptor(mach_port_t in_name, |
| 83 mach_msg_type_name_t in_disposition) { | 83 mach_msg_type_name_t in_disposition) { |
| 84 name = in_name; | 84 name = in_name; |
| 85 pad1 = 0; | 85 pad1 = 0; |
| 86 pad2 = 0; | 86 pad2 = 0; |
| 87 disposition = in_disposition; | 87 disposition = in_disposition; |
| 88 type = MACH_MSG_PORT_DESCRIPTOR; | 88 type = MACH_MSG_PORT_DESCRIPTOR; |
| 89 } | 89 } |
| 90 | 90 |
| 91 // For passing send rights to a port | 91 // For passing send rights to a port |
| 92 MachMsgPortDescriptor(mach_port_t in_name) { | 92 explicit MachMsgPortDescriptor(mach_port_t in_name) { |
| 93 name = in_name; | 93 name = in_name; |
| 94 pad1 = 0; | 94 pad1 = 0; |
| 95 pad2 = 0; | 95 pad2 = 0; |
| 96 disposition = MACH_MSG_TYPE_PORT_SEND; | 96 disposition = MACH_MSG_TYPE_PORT_SEND; |
| 97 type = MACH_MSG_PORT_DESCRIPTOR; | 97 type = MACH_MSG_PORT_DESCRIPTOR; |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Copy constructor | 100 // Copy constructor |
| 101 MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { | 101 MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { |
| 102 name = desc.name; | 102 name = desc.name; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // Note that unless the calling task has send rights to the passed task port, | 317 // Note that unless the calling task has send rights to the passed task port, |
| 318 // this will fail unless the calling task is running as root. | 318 // this will fail unless the calling task is running as root. |
| 319 kern_return_t BASE_EXPORT GetNumberOfMachPorts(mach_port_t task_port, | 319 kern_return_t BASE_EXPORT GetNumberOfMachPorts(mach_port_t task_port, |
| 320 int* port_count); | 320 int* port_count); |
| 321 | 321 |
| 322 } // namespace mac | 322 } // namespace mac |
| 323 | 323 |
| 324 } // namespace base | 324 } // namespace base |
| 325 | 325 |
| 326 #endif // BASE_MACH_IPC_MAC_H_ | 326 #endif // BASE_MACH_IPC_MAC_H_ |
| OLD | NEW |