| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "google/protobuf/message.h" | 10 #include "google/protobuf/message.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 control_dispatcher_->set_clipboard_stub(clipboard_stub_); | 111 control_dispatcher_->set_clipboard_stub(clipboard_stub_); |
| 112 control_dispatcher_->set_host_stub(host_stub_); | 112 control_dispatcher_->set_host_stub(host_stub_); |
| 113 | 113 |
| 114 event_dispatcher_.reset(new HostEventDispatcher()); | 114 event_dispatcher_.reset(new HostEventDispatcher()); |
| 115 event_dispatcher_->Init(session_.get(), base::Bind( | 115 event_dispatcher_->Init(session_.get(), base::Bind( |
| 116 &ConnectionToClient::OnChannelInitialized, base::Unretained(this))); | 116 &ConnectionToClient::OnChannelInitialized, base::Unretained(this))); |
| 117 event_dispatcher_->set_input_stub(input_stub_); | 117 event_dispatcher_->set_input_stub(input_stub_); |
| 118 event_dispatcher_->set_sequence_number_callback(base::Bind( | 118 event_dispatcher_->set_sequence_number_callback(base::Bind( |
| 119 &ConnectionToClient::UpdateSequenceNumber, base::Unretained(this))); | 119 &ConnectionToClient::UpdateSequenceNumber, base::Unretained(this))); |
| 120 | 120 |
| 121 video_writer_.reset(VideoWriter::Create( | 121 video_writer_.reset(VideoWriter::Create(session_->config())); |
| 122 base::MessageLoopProxy::current(), session_->config())); | |
| 123 video_writer_->Init(session_.get(), base::Bind( | 122 video_writer_->Init(session_.get(), base::Bind( |
| 124 &ConnectionToClient::OnChannelInitialized, base::Unretained(this))); | 123 &ConnectionToClient::OnChannelInitialized, base::Unretained(this))); |
| 125 | 124 |
| 126 break; | 125 break; |
| 127 | 126 |
| 128 case Session::CLOSED: | 127 case Session::CLOSED: |
| 129 Close(OK); | 128 Close(OK); |
| 130 break; | 129 break; |
| 131 | 130 |
| 132 case Session::FAILED: | 131 case Session::FAILED: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 168 } |
| 170 | 169 |
| 171 void ConnectionToClient::CloseChannels() { | 170 void ConnectionToClient::CloseChannels() { |
| 172 control_dispatcher_.reset(); | 171 control_dispatcher_.reset(); |
| 173 event_dispatcher_.reset(); | 172 event_dispatcher_.reset(); |
| 174 video_writer_.reset(); | 173 video_writer_.reset(); |
| 175 } | 174 } |
| 176 | 175 |
| 177 } // namespace protocol | 176 } // namespace protocol |
| 178 } // namespace remoting | 177 } // namespace remoting |
| OLD | NEW |