| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_NACL_H_ | 5 #ifndef IPC_IPC_CHANNEL_NACL_H_ |
| 6 #define IPC_IPC_CHANNEL_NACL_H_ | 6 #define IPC_IPC_CHANNEL_NACL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 bool CreatePipe(const IPC::ChannelHandle& channel_handle); | 54 bool CreatePipe(const IPC::ChannelHandle& channel_handle); |
| 55 bool ProcessOutgoingMessages(); | 55 bool ProcessOutgoingMessages(); |
| 56 | 56 |
| 57 // ChannelReader implementation. | 57 // ChannelReader implementation. |
| 58 virtual ReadState ReadData(char* buffer, | 58 virtual ReadState ReadData(char* buffer, |
| 59 int buffer_len, | 59 int buffer_len, |
| 60 int* bytes_read) OVERRIDE; | 60 int* bytes_read) OVERRIDE; |
| 61 virtual bool WillDispatchInputMessage(Message* msg) OVERRIDE; | 61 virtual bool WillDispatchInputMessage(Message* msg) OVERRIDE; |
| 62 virtual bool DidEmptyInputBuffers() OVERRIDE; | 62 virtual bool DidEmptyInputBuffers() OVERRIDE; |
| 63 virtual void HandleHelloMessage(const Message& msg) OVERRIDE; | 63 virtual void HandleInternalMessage(const Message& msg) OVERRIDE; |
| 64 | 64 |
| 65 Mode mode_; | 65 Mode mode_; |
| 66 bool waiting_connect_; | 66 bool waiting_connect_; |
| 67 | 67 |
| 68 // The pipe used for communication. | 68 // The pipe used for communication. |
| 69 int pipe_; | 69 int pipe_; |
| 70 | 70 |
| 71 // The "name" of our pipe. On Windows this is the global identifier for | 71 // The "name" of our pipe. On Windows this is the global identifier for |
| 72 // the pipe. On POSIX it's used as a key in a local map of file descriptors. | 72 // the pipe. On POSIX it's used as a key in a local map of file descriptors. |
| 73 // For NaCl, we don't actually support looking up file descriptors by name, | 73 // For NaCl, we don't actually support looking up file descriptors by name, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 std::deque<linked_ptr<Message> > output_queue_; | 109 std::deque<linked_ptr<Message> > output_queue_; |
| 110 | 110 |
| 111 base::WeakPtrFactory<ChannelImpl> weak_ptr_factory_; | 111 base::WeakPtrFactory<ChannelImpl> weak_ptr_factory_; |
| 112 | 112 |
| 113 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl); | 113 DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelImpl); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace IPC | 116 } // namespace IPC |
| 117 | 117 |
| 118 #endif // IPC_IPC_CHANNEL_NACL_H_ | 118 #endif // IPC_IPC_CHANNEL_NACL_H_ |
| OLD | NEW |