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 // This stub is thread safe because of the use of BufferedSocketWriter. | 5 // This stub is thread safe because of the use of BufferedSocketWriter. |
6 // BufferedSocketWriter buffers messages and send them on them right thread. | 6 // BufferedSocketWriter buffers messages and send them on them right thread. |
7 | 7 |
8 #include "remoting/protocol/host_control_sender.h" | 8 #include "remoting/protocol/host_control_sender.h" |
9 | 9 |
10 #include "base/task.h" | 10 #include "base/task.h" |
11 #include "remoting/protocol/buffered_socket_writer.h" | 11 #include "remoting/protocol/buffered_socket_writer.h" |
(...skipping 12 matching lines...) Expand all Loading... | |
24 HostControlSender::~HostControlSender() { | 24 HostControlSender::~HostControlSender() { |
25 } | 25 } |
26 | 26 |
27 void HostControlSender::SuggestResolution( | 27 void HostControlSender::SuggestResolution( |
28 const SuggestResolutionRequest* msg, Task* done) { | 28 const SuggestResolutionRequest* msg, Task* done) { |
29 protocol::ControlMessage message; | 29 protocol::ControlMessage message; |
30 message.mutable_suggest_resolution()->CopyFrom(*msg); | 30 message.mutable_suggest_resolution()->CopyFrom(*msg); |
31 buffered_writer_->Write(SerializeAndFrameMessage(message), done); | 31 buffered_writer_->Write(SerializeAndFrameMessage(message), done); |
32 } | 32 } |
33 | 33 |
34 void HostControlSender::BeginSessionRequest(const LocalLoginCredentials* msg, | 34 void HostControlSender::BeginSessionRequest(ConnectionToClient* /*connection*/, |
Sergey Ulanov
2011/03/18 18:12:21
Why is it commented?
simonmorris
2011/03/22 13:09:10
Done.
| |
35 const LocalLoginCredentials* msg, | |
35 Task* done) { | 36 Task* done) { |
36 protocol::ControlMessage message; | 37 protocol::ControlMessage message; |
37 message.mutable_begin_session_request()->mutable_credentials()->CopyFrom( | 38 message.mutable_begin_session_request()->mutable_credentials()->CopyFrom( |
38 *msg); | 39 *msg); |
39 buffered_writer_->Write(SerializeAndFrameMessage(message), done); | 40 buffered_writer_->Write(SerializeAndFrameMessage(message), done); |
40 } | 41 } |
41 | 42 |
42 } // namespace protocol | 43 } // namespace protocol |
43 } // namespace remoting | 44 } // namespace remoting |
OLD | NEW |