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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 mach_port_t GetMachPort() const { | 108 mach_port_t GetMachPort() const { |
109 return name; | 109 return name; |
110 } | 110 } |
111 | 111 |
112 mach_msg_type_name_t GetDisposition() const { | 112 mach_msg_type_name_t GetDisposition() const { |
113 return disposition; | 113 return disposition; |
114 } | 114 } |
115 | 115 |
116 // We're just a simple wrapper for mach_msg_port_descriptor_t | 116 // We're just a simple wrapper for mach_msg_port_descriptor_t |
117 // and have the same memory layout | 117 // and have the same memory layout |
118 // FIXME | 118 operator mach_msg_port_descriptor_t&() { |
119 //operator mach_msg_port_descriptor_t&() { | 119 return *this; |
120 //return *this; | 120 } |
121 //} | |
122 | 121 |
123 // For convenience | 122 // For convenience |
124 operator mach_port_t() const { | 123 operator mach_port_t() const { |
125 return GetMachPort(); | 124 return GetMachPort(); |
126 } | 125 } |
127 }; | 126 }; |
128 | 127 |
129 //============================================================================== | 128 //============================================================================== |
130 // MachMessage: a wrapper for a mach message | 129 // MachMessage: a wrapper for a mach message |
131 // (mach_msg_header_t, mach_msg_body_t, extra data) | 130 // (mach_msg_header_t, mach_msg_body_t, extra data) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 private: | 317 private: |
319 mach_port_t send_port_; | 318 mach_port_t send_port_; |
320 kern_return_t init_result_; | 319 kern_return_t init_result_; |
321 | 320 |
322 DISALLOW_COPY_AND_ASSIGN(MachPortSender); | 321 DISALLOW_COPY_AND_ASSIGN(MachPortSender); |
323 }; | 322 }; |
324 | 323 |
325 } // namespace base | 324 } // namespace base |
326 | 325 |
327 #endif // BASE_MACH_IPC_MAC_H_ | 326 #endif // BASE_MACH_IPC_MAC_H_ |
OLD | NEW |