OLD | NEW |
1 // Copyright (c) 2010 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 HostStub using sockets created from jingle connection. | 5 // Implementation of HostStub 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 ConnectionToHost. | 8 // Object of this class can only be created by ConnectionToHost. |
9 // | 9 // |
10 // This class can be used on any thread. | 10 // This class can be used on any thread. |
11 | 11 |
(...skipping 17 matching lines...) Expand all Loading... |
29 | 29 |
30 class HostControlSender : public HostStub { | 30 class HostControlSender : public HostStub { |
31 public: | 31 public: |
32 // Create a stub using a socket. | 32 // Create a stub using a socket. |
33 explicit HostControlSender(net::Socket* socket); | 33 explicit HostControlSender(net::Socket* socket); |
34 virtual ~HostControlSender(); | 34 virtual ~HostControlSender(); |
35 | 35 |
36 virtual void SuggestResolution( | 36 virtual void SuggestResolution( |
37 const SuggestResolutionRequest* msg, Task* done); | 37 const SuggestResolutionRequest* msg, Task* done); |
38 virtual void BeginSessionRequest( | 38 virtual void BeginSessionRequest( |
| 39 ConnectionToClient* connection, |
39 const LocalLoginCredentials* credentials, Task* done); | 40 const LocalLoginCredentials* credentials, Task* done); |
40 | 41 |
41 private: | 42 private: |
42 // Buffered socket writer holds the serialized message and send it on the | 43 // Buffered socket writer holds the serialized message and send it on the |
43 // right thread. | 44 // right thread. |
44 scoped_refptr<BufferedSocketWriter> buffered_writer_; | 45 scoped_refptr<BufferedSocketWriter> buffered_writer_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(HostControlSender); | 47 DISALLOW_COPY_AND_ASSIGN(HostControlSender); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace protocol | 50 } // namespace protocol |
50 } // namespace remoting | 51 } // namespace remoting |
51 | 52 |
52 #endif // REMOTING_PROTOCOL_HOST_STUB_IMPL_H_ | 53 #endif // REMOTING_PROTOCOL_HOST_STUB_IMPL_H_ |
OLD | NEW |