| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "remoting/protocol/connection_to_client.h" | 5 #include "remoting/protocol/connection_to_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) { | 77 void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) { |
| 78 DCHECK(CalledOnValidThread()); | 78 DCHECK(CalledOnValidThread()); |
| 79 control_dispatcher_->set_host_stub(host_stub); | 79 control_dispatcher_->set_host_stub(host_stub); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) { | 82 void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) { |
| 83 DCHECK(CalledOnValidThread()); | 83 DCHECK(CalledOnValidThread()); |
| 84 event_dispatcher_->set_input_stub(input_stub); | 84 event_dispatcher_->set_input_stub(input_stub); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void ConnectionToClient::set_video_feedback_stub( |
| 88 VideoFeedbackStub* video_feedback_stub) { |
| 89 DCHECK(CalledOnValidThread()); |
| 90 video_dispatcher_->set_video_feedback_stub(video_feedback_stub); |
| 91 } |
| 92 |
| 87 void ConnectionToClient::OnSessionStateChange(Session::State state) { | 93 void ConnectionToClient::OnSessionStateChange(Session::State state) { |
| 88 DCHECK(CalledOnValidThread()); | 94 DCHECK(CalledOnValidThread()); |
| 89 | 95 |
| 90 DCHECK(handler_); | 96 DCHECK(handler_); |
| 91 switch(state) { | 97 switch(state) { |
| 92 case Session::INITIALIZING: | 98 case Session::INITIALIZING: |
| 93 case Session::CONNECTING: | 99 case Session::CONNECTING: |
| 94 case Session::ACCEPTING: | 100 case Session::ACCEPTING: |
| 95 case Session::CONNECTED: | 101 case Session::CONNECTED: |
| 96 // Don't care about these events. | 102 // Don't care about these events. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 187 |
| 182 void ConnectionToClient::CloseChannels() { | 188 void ConnectionToClient::CloseChannels() { |
| 183 control_dispatcher_.reset(); | 189 control_dispatcher_.reset(); |
| 184 event_dispatcher_.reset(); | 190 event_dispatcher_.reset(); |
| 185 video_dispatcher_.reset(); | 191 video_dispatcher_.reset(); |
| 186 audio_writer_.reset(); | 192 audio_writer_.reset(); |
| 187 } | 193 } |
| 188 | 194 |
| 189 } // namespace protocol | 195 } // namespace protocol |
| 190 } // namespace remoting | 196 } // namespace remoting |
| OLD | NEW |