| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_IPC_CHANNEL_MOJO_H_ | 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_ |
| 6 #define IPC_IPC_CHANNEL_MOJO_H_ | 6 #define IPC_IPC_CHANNEL_MOJO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 Channel::AssociatedInterfaceSupport* GetAssociatedInterfaceSupport() override; | 76 Channel::AssociatedInterfaceSupport* GetAssociatedInterfaceSupport() override; |
| 77 | 77 |
| 78 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) | 78 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) |
| 79 int GetClientFileDescriptor() const override; | 79 int GetClientFileDescriptor() const override; |
| 80 base::ScopedFD TakeClientFileDescriptor() override; | 80 base::ScopedFD TakeClientFileDescriptor() override; |
| 81 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI) | 81 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI) |
| 82 | 82 |
| 83 // These access protected API of IPC::Message, which has ChannelMojo | 83 // These access protected API of IPC::Message, which has ChannelMojo |
| 84 // as a friend class. | 84 // as a friend class. |
| 85 static MojoResult WriteToMessageAttachmentSet( | 85 static MojoResult WriteToMessageAttachmentSet( |
| 86 mojo::Array<mojom::SerializedHandlePtr> handle_buffer, | 86 base::Optional<std::vector<mojom::SerializedHandlePtr>> handle_buffer, |
| 87 Message* message); | 87 Message* message); |
| 88 static MojoResult ReadFromMessageAttachmentSet( | 88 static MojoResult ReadFromMessageAttachmentSet( |
| 89 Message* message, | 89 Message* message, |
| 90 mojo::Array<mojom::SerializedHandlePtr>* handles); | 90 base::Optional<std::vector<mojom::SerializedHandlePtr>>* handles); |
| 91 | 91 |
| 92 // MojoBootstrapDelegate implementation | 92 // MojoBootstrapDelegate implementation |
| 93 void OnPipesAvailable(mojom::ChannelAssociatedPtr sender, | 93 void OnPipesAvailable(mojom::ChannelAssociatedPtr sender, |
| 94 mojom::ChannelAssociatedRequest receiver) override; | 94 mojom::ChannelAssociatedRequest receiver) override; |
| 95 | 95 |
| 96 // MessagePipeReader::Delegate | 96 // MessagePipeReader::Delegate |
| 97 void OnPeerPidReceived() override; | 97 void OnPeerPidReceived() override; |
| 98 void OnMessageReceived(const Message& message) override; | 98 void OnMessageReceived(const Message& message) override; |
| 99 void OnPipeError() override; | 99 void OnPipeError() override; |
| 100 void OnAssociatedInterfaceRequest( | 100 void OnAssociatedInterfaceRequest( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 131 associated_interfaces_; | 131 associated_interfaces_; |
| 132 | 132 |
| 133 base::WeakPtrFactory<ChannelMojo> weak_factory_; | 133 base::WeakPtrFactory<ChannelMojo> weak_factory_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); | 135 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace IPC | 138 } // namespace IPC |
| 139 | 139 |
| 140 #endif // IPC_IPC_CHANNEL_MOJO_H_ | 140 #endif // IPC_IPC_CHANNEL_MOJO_H_ |
| OLD | NEW |