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

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

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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
« no previous file with comments | « remoting/protocol/buffered_socket_writer.cc ('k') | remoting/protocol/client_control_sender.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 // Implementation of ClientStub using sockets created from jingle connection. 5 // Implementation of ClientStub using sockets created from jingle connection.
6 // It sends messages through the socket after serializing it. 6 // It sends messages through the socket after serializing it.
7 // 7 //
8 // Object of this class can only be created by ConnectionToClient. 8 // Object of this class can only be created by ConnectionToClient.
9 // 9 //
10 // This class can be used on any thread. 10 // This class can be used on any thread.
(...skipping 24 matching lines...) Expand all
35 // Implementation of ClientStub that sends commands on a socket. Must 35 // Implementation of ClientStub that sends commands on a socket. Must
36 // be created and closed on the network thread, but can be used on any 36 // be created and closed on the network thread, but can be used on any
37 // other thread. 37 // other thread.
38 class ClientControlSender : public ClientStub { 38 class ClientControlSender : public ClientStub {
39 public: 39 public:
40 explicit ClientControlSender(base::MessageLoopProxy* message_loop, 40 explicit ClientControlSender(base::MessageLoopProxy* message_loop,
41 net::Socket* socket); 41 net::Socket* socket);
42 virtual ~ClientControlSender(); 42 virtual ~ClientControlSender();
43 43
44 virtual void BeginSessionResponse(const LocalLoginStatus* msg, 44 virtual void BeginSessionResponse(const LocalLoginStatus* msg,
45 Task* done) OVERRIDE; 45 const base::Closure& done) OVERRIDE;
46 46
47 // Stop writing. Must be called on the network thread when the 47 // Stop writing. Must be called on the network thread when the
48 // underlying socket is being destroyed. 48 // underlying socket is being destroyed.
49 void Close(); 49 void Close();
50 50
51 private: 51 private:
52 // Buffered socket writer holds the serialized message and send it on the 52 // Buffered socket writer holds the serialized message and send it on the
53 // right thread. 53 // right thread.
54 scoped_refptr<BufferedSocketWriter> buffered_writer_; 54 scoped_refptr<BufferedSocketWriter> buffered_writer_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(ClientControlSender); 56 DISALLOW_COPY_AND_ASSIGN(ClientControlSender);
57 }; 57 };
58 58
59 } // namespace protocol 59 } // namespace protocol
60 } // namespace remoting 60 } // namespace remoting
61 61
62 #endif // REMOTING_PROTOCOL_CLIENT_STUB_IMPL_H_ 62 #endif // REMOTING_PROTOCOL_CLIENT_STUB_IMPL_H_
OLDNEW
« no previous file with comments | « remoting/protocol/buffered_socket_writer.cc ('k') | remoting/protocol/client_control_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698