Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 MachMsgPortDescriptor(mach_port_t in_name, | 79 MachMsgPortDescriptor(mach_port_t in_name, |
| 80 mach_msg_type_name_t in_disposition) { | 80 mach_msg_type_name_t in_disposition) { |
| 81 name = in_name; | 81 name = in_name; |
| 82 pad1 = 0; | 82 pad1 = 0; |
| 83 pad2 = 0; | 83 pad2 = 0; |
| 84 disposition = in_disposition; | 84 disposition = in_disposition; |
| 85 type = MACH_MSG_PORT_DESCRIPTOR; | 85 type = MACH_MSG_PORT_DESCRIPTOR; |
| 86 } | 86 } |
| 87 | 87 |
| 88 // For passing send rights to a port | 88 // For passing send rights to a port |
| 89 MachMsgPortDescriptor(mach_port_t in_name) { | 89 explicit MachMsgPortDescriptor(mach_port_t in_name) { |
|
Mark Mentovai
2010/01/11 20:22:46
Good catch.
| |
| 90 name = in_name; | 90 name = in_name; |
| 91 pad1 = 0; | 91 pad1 = 0; |
| 92 pad2 = 0; | 92 pad2 = 0; |
| 93 disposition = MACH_MSG_TYPE_PORT_SEND; | 93 disposition = MACH_MSG_TYPE_PORT_SEND; |
| 94 type = MACH_MSG_PORT_DESCRIPTOR; | 94 type = MACH_MSG_PORT_DESCRIPTOR; |
| 95 } | 95 } |
| 96 | 96 |
| 97 // Copy constructor | 97 // Copy constructor |
| 98 MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { | 98 MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { |
| 99 name = desc.name; | 99 name = desc.name; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 mach_msg_timeout_t timeout); | 312 mach_msg_timeout_t timeout); |
| 313 | 313 |
| 314 private: | 314 private: |
| 315 mach_port_t send_port_; | 315 mach_port_t send_port_; |
| 316 kern_return_t init_result_; | 316 kern_return_t init_result_; |
| 317 | 317 |
| 318 DISALLOW_COPY_AND_ASSIGN(MachPortSender); | 318 DISALLOW_COPY_AND_ASSIGN(MachPortSender); |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 #endif // BASE_MACH_IPC_MAC_H_ | 321 #endif // BASE_MACH_IPC_MAC_H_ |
| OLD | NEW |