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 CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // Write stream. | 142 // Write stream. |
143 scoped_ptr<net::FileStream> write_stream_; | 143 scoped_ptr<net::FileStream> write_stream_; |
144 | 144 |
145 // Read buffer passed to FileStream::Read(). | 145 // Read buffer passed to FileStream::Read(). |
146 scoped_refptr<net::IOBuffer> read_buffer_; | 146 scoped_refptr<net::IOBuffer> read_buffer_; |
147 | 147 |
148 // Set to true when a read is pending. | 148 // Set to true when a read is pending. |
149 bool read_pending_; | 149 bool read_pending_; |
150 | 150 |
151 // Set to true once we've read EOF from the child process. | |
152 bool read_eof_; | |
153 | |
154 // Buffer for incomplete incoming messages. | 151 // Buffer for incomplete incoming messages. |
155 std::string incoming_data_; | 152 std::string incoming_data_; |
156 | 153 |
157 // Queue for outgoing messages. | 154 // Queue for outgoing messages. |
158 std::queue<scoped_refptr<net::IOBufferWithSize> > write_queue_; | 155 std::queue<scoped_refptr<net::IOBufferWithSize> > write_queue_; |
159 | 156 |
160 // The message that's currently being sent. | 157 // The message that's currently being sent. |
161 scoped_refptr<net::DrainableIOBuffer> current_write_buffer_; | 158 scoped_refptr<net::DrainableIOBuffer> current_write_buffer_; |
162 | 159 |
163 // Set to true when a write is pending. | 160 // Set to true when a write is pending. |
164 bool write_pending_; | 161 bool write_pending_; |
165 | 162 |
166 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost); | 163 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost); |
167 }; | 164 }; |
168 | 165 |
169 } // namespace extensions | 166 } // namespace extensions |
170 | 167 |
171 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H
_ | 168 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H
_ |
OLD | NEW |