Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/browser/extensions/api/messaging/native_message_process_host.h

Issue 24409004: Disconnect native messaging port on read pipe EOF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698