Chromium Code Reviews| Index: remoting/protocol/connection_to_client.cc |
| diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc |
| index 3b4bd3f21684e35bef56f69c552a46883ad4a9d6..5749a93fa99a8d48ba681292c9ffa8a280756378 100644 |
| --- a/remoting/protocol/connection_to_client.cc |
| +++ b/remoting/protocol/connection_to_client.cc |
| @@ -8,6 +8,8 @@ |
| #include "net/base/io_buffer.h" |
| #include "remoting/protocol/client_control_sender.h" |
| #include "remoting/protocol/host_message_dispatcher.h" |
| +#include "remoting/protocol/host_stub.h" |
| +#include "remoting/protocol/input_stub.h" |
| // TODO(hclam): Remove this header once MessageDispatcher is used. |
| #include "remoting/base/compound_buffer.h" |
| @@ -23,7 +25,8 @@ ConnectionToClient::ConnectionToClient(MessageLoop* message_loop, |
| EventHandler* handler, |
| HostStub* host_stub, |
| InputStub* input_stub) |
| - : loop_(message_loop), |
| + : client_authenticated_(false), |
| + loop_(message_loop), |
| handler_(handler), |
| host_stub_(host_stub), |
| input_stub_(input_stub) { |
| @@ -73,8 +76,8 @@ ClientStub* ConnectionToClient::client_stub() { |
| return client_stub_.get(); |
| } |
| -ConnectionToClient::ConnectionToClient() { |
| -} |
| +//ConnectionToClient::ConnectionToClient() { |
|
dmac
2011/03/04 01:36:27
get rid of this then?
garykac
2011/03/04 05:33:24
oops
|
| +//} |
| void ConnectionToClient::OnSessionStateChange(protocol::Session::State state) { |
| if (state == protocol::Session::CONNECTED) { |
| @@ -123,5 +126,17 @@ void ConnectionToClient::StateChangeTask(protocol::Session::State state) { |
| void ConnectionToClient::OnClosed() { |
| } |
| +void ConnectionToClient::SetClientAuthenticated(bool auth) { |
| + client_authenticated_ = auth; |
| + |
| + // Enable/disable each of the channels. |
| + if (input_stub_) |
| + input_stub_->SetEnable(auth); |
| + if (host_stub_) |
| + host_stub_->SetEnable(auth); |
| + if(client_stub_.get()) |
| + client_stub_->SetEnable(auth); |
| +} |
| + |
| } // namespace protocol |
| } // namespace remoting |