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

Side by Side Diff: remoting/protocol/message_reader.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years 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
« no previous file with comments | « remoting/protocol/jingle_stream_connector.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 REMOTING_PROTOCOL_MESSAGE_READER_H_ 5 #ifndef REMOTING_PROTOCOL_MESSAGE_READER_H_
6 #define REMOTING_PROTOCOL_MESSAGE_READER_H_ 6 #define REMOTING_PROTOCOL_MESSAGE_READER_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // OnRead() to be called when new data is received. 66 // OnRead() to be called when new data is received.
67 bool read_pending_; 67 bool read_pending_;
68 68
69 // Number of messages that we received, but haven't finished 69 // Number of messages that we received, but haven't finished
70 // processing yet, i.e. |done_task| hasn't been called for these 70 // processing yet, i.e. |done_task| hasn't been called for these
71 // messages. 71 // messages.
72 int pending_messages_; 72 int pending_messages_;
73 73
74 bool closed_; 74 bool closed_;
75 scoped_refptr<net::IOBuffer> read_buffer_; 75 scoped_refptr<net::IOBuffer> read_buffer_;
76 net::OldCompletionCallbackImpl<MessageReader> read_callback_;
77 76
78 MessageDecoder message_decoder_; 77 MessageDecoder message_decoder_;
79 78
80 // Callback is called when a message is received. 79 // Callback is called when a message is received.
81 MessageReceivedCallback message_received_callback_; 80 MessageReceivedCallback message_received_callback_;
82 }; 81 };
83 82
84 // Version of MessageReader for protocol buffer messages, that parses 83 // Version of MessageReader for protocol buffer messages, that parses
85 // each incoming message. 84 // each incoming message.
86 template <class T> 85 template <class T>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 121 }
123 122
124 scoped_refptr<MessageReader> message_reader_; 123 scoped_refptr<MessageReader> message_reader_;
125 MessageReceivedCallback message_received_callback_; 124 MessageReceivedCallback message_received_callback_;
126 }; 125 };
127 126
128 } // namespace protocol 127 } // namespace protocol
129 } // namespace remoting 128 } // namespace remoting
130 129
131 #endif // REMOTING_PROTOCOL_MESSAGE_READER_H_ 130 #endif // REMOTING_PROTOCOL_MESSAGE_READER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/jingle_stream_connector.cc ('k') | remoting/protocol/message_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698