| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ | 5 #ifndef MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ |
| 6 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ | 6 #define MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 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 | 64 |
| 65 handle->reset(MessageHandle(raw_handle)); | 65 handle->reset(MessageHandle(raw_handle)); |
| 66 return MOJO_RESULT_OK; | 66 return MOJO_RESULT_OK; |
| 67 } | 67 } |
| 68 | 68 |
| 69 inline MojoResult GetMessageBuffer(MessageHandle message, void** buffer) { | 69 inline MojoResult GetMessageBuffer(MessageHandle message, void** buffer) { |
| 70 DCHECK(message.is_valid()); | 70 DCHECK(message.is_valid()); |
| 71 return MojoGetMessageBuffer(message.value(), buffer); | 71 return MojoGetMessageBuffer(message.value(), buffer); |
| 72 } | 72 } |
| 73 | 73 |
| 74 inline MojoResult NotifyBadMessage(MessageHandle message) { |
| 75 DCHECK(message.is_valid()); |
| 76 return MojoNotifyBadMessage(message.value()); |
| 77 } |
| 78 |
| 74 } // namespace mojo | 79 } // namespace mojo |
| 75 | 80 |
| 76 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ | 81 #endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_ |
| OLD | NEW |