| 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 <memory> | 10 #include <memory> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 ~ChannelMojo() override; | 57 ~ChannelMojo() override; |
| 58 | 58 |
| 59 // Channel implementation | 59 // Channel implementation |
| 60 bool Connect() override; | 60 bool Connect() override; |
| 61 void Close() override; | 61 void Close() override; |
| 62 bool Send(Message* message) override; | 62 bool Send(Message* message) override; |
| 63 bool IsSendThreadSafe() const override; | 63 bool IsSendThreadSafe() const override; |
| 64 base::ProcessId GetPeerPID() const override; | 64 base::ProcessId GetPeerPID() const override; |
| 65 base::ProcessId GetSelfPID() const override; | 65 base::ProcessId GetSelfPID() const override; |
| 66 | 66 |
| 67 #if defined(OS_POSIX) && !defined(OS_NACL) | 67 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) |
| 68 int GetClientFileDescriptor() const override; | 68 int GetClientFileDescriptor() const override; |
| 69 base::ScopedFD TakeClientFileDescriptor() override; | 69 base::ScopedFD TakeClientFileDescriptor() override; |
| 70 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 70 #endif // defined(OS_POSIX) && !defined(OS_NACL_SFI) |
| 71 | 71 |
| 72 // These access protected API of IPC::Message, which has ChannelMojo | 72 // These access protected API of IPC::Message, which has ChannelMojo |
| 73 // as a friend class. | 73 // as a friend class. |
| 74 static MojoResult WriteToMessageAttachmentSet( | 74 static MojoResult WriteToMessageAttachmentSet( |
| 75 mojo::Array<mojom::SerializedHandlePtr> handle_buffer, | 75 mojo::Array<mojom::SerializedHandlePtr> handle_buffer, |
| 76 Message* message); | 76 Message* message); |
| 77 static MojoResult ReadFromMessageAttachmentSet( | 77 static MojoResult ReadFromMessageAttachmentSet( |
| 78 Message* message, | 78 Message* message, |
| 79 mojo::Array<mojom::SerializedHandlePtr>* handles); | 79 mojo::Array<mojom::SerializedHandlePtr>* handles); |
| 80 | 80 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 bool waiting_connect_; | 116 bool waiting_connect_; |
| 117 | 117 |
| 118 base::WeakPtrFactory<ChannelMojo> weak_factory_; | 118 base::WeakPtrFactory<ChannelMojo> weak_factory_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); | 120 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace IPC | 123 } // namespace IPC |
| 124 | 124 |
| 125 #endif // IPC_IPC_CHANNEL_MOJO_H_ | 125 #endif // IPC_IPC_CHANNEL_MOJO_H_ |
| OLD | NEW |