| 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_MACH_PORT_MAC_H_ | 5 #ifndef IPC_MACH_PORT_MAC_H_ |
| 6 #define IPC_MACH_PORT_MAC_H_ | 6 #define IPC_MACH_PORT_MAC_H_ |
| 7 | 7 |
| 8 #include <mach/mach.h> | 8 #include <mach/mach.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // semantics discussed above, this MachPortAttachmentMac does not take | 64 // semantics discussed above, this MachPortAttachmentMac does not take |
| 65 // ownership of the Mach port, and assumes that the client code which receives | 65 // ownership of the Mach port, and assumes that the client code which receives |
| 66 // the callback will take ownership of the Mach port. | 66 // the callback will take ownership of the Mach port. |
| 67 mach_port_t mach_port_; | 67 mach_port_t mach_port_; |
| 68 DISALLOW_COPY_AND_ASSIGN(MachPortMac); | 68 DISALLOW_COPY_AND_ASSIGN(MachPortMac); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 template <> | 71 template <> |
| 72 struct IPC_EXPORT ParamTraits<MachPortMac> { | 72 struct IPC_EXPORT ParamTraits<MachPortMac> { |
| 73 typedef MachPortMac param_type; | 73 typedef MachPortMac param_type; |
| 74 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 74 static void Write(base::Pickle* m, const param_type& p); | 75 static void Write(base::Pickle* m, const param_type& p); |
| 75 static bool Read(const base::Pickle* m, | 76 static bool Read(const base::Pickle* m, |
| 76 base::PickleIterator* iter, | 77 base::PickleIterator* iter, |
| 77 param_type* p); | 78 param_type* p); |
| 78 static void Log(const param_type& p, std::string* l); | 79 static void Log(const param_type& p, std::string* l); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace IPC | 82 } // namespace IPC |
| 82 | 83 |
| 83 #endif // IPC_MACH_PORT_MAC_H_ | 84 #endif // IPC_MACH_PORT_MAC_H_ |
| OLD | NEW |