| 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_MESSAGE_PIPE_READER_H_ | 5 #ifndef IPC_IPC_MESSAGE_PIPE_READER_H_ |
| 6 #define IPC_IPC_MESSAGE_PIPE_READER_H_ | 6 #define IPC_IPC_MESSAGE_PIPE_READER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 bool Send(scoped_ptr<Message> message); | 86 bool Send(scoped_ptr<Message> message); |
| 87 | 87 |
| 88 base::ProcessId GetPeerPid() const { return peer_pid_; } | 88 base::ProcessId GetPeerPid() const { return peer_pid_; } |
| 89 | 89 |
| 90 protected: | 90 protected: |
| 91 void OnPipeClosed(); | 91 void OnPipeClosed(); |
| 92 void OnPipeError(MojoResult error); | 92 void OnPipeError(MojoResult error); |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 void Receive(mojom::MessagePtr message) override; | 95 void Receive(mojo::Array<uint8_t> data, |
| 96 mojo::Array<mojom::SerializedHandlePtr> handles) override; |
| 96 | 97 |
| 97 // |delegate_| is null once the message pipe is closed. | 98 // |delegate_| is null once the message pipe is closed. |
| 98 Delegate* delegate_; | 99 Delegate* delegate_; |
| 99 base::ProcessId peer_pid_; | 100 base::ProcessId peer_pid_; |
| 100 mojom::ChannelAssociatedPtr sender_; | 101 mojom::ChannelAssociatedPtr sender_; |
| 101 mojo::AssociatedBinding<mojom::Channel> binding_; | 102 mojo::AssociatedBinding<mojom::Channel> binding_; |
| 102 base::ThreadChecker thread_checker_; | 103 base::ThreadChecker thread_checker_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(MessagePipeReader); | 105 DISALLOW_COPY_AND_ASSIGN(MessagePipeReader); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace internal | 108 } // namespace internal |
| 108 } // namespace IPC | 109 } // namespace IPC |
| 109 | 110 |
| 110 #endif // IPC_IPC_MESSAGE_PIPE_READER_H_ | 111 #endif // IPC_IPC_MESSAGE_PIPE_READER_H_ |
| OLD | NEW |