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_host.h" | 5 #include "remoting/protocol/connection_to_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "remoting/base/constants.h" | 10 #include "remoting/base/constants.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 base::Unretained(this))); | 190 base::Unretained(this))); |
191 control_dispatcher_->set_client_stub(client_stub_); | 191 control_dispatcher_->set_client_stub(client_stub_); |
192 control_dispatcher_->set_clipboard_stub(clipboard_stub_); | 192 control_dispatcher_->set_clipboard_stub(clipboard_stub_); |
193 | 193 |
194 event_dispatcher_.reset(new ClientEventDispatcher()); | 194 event_dispatcher_.reset(new ClientEventDispatcher()); |
195 event_dispatcher_->Init( | 195 event_dispatcher_->Init( |
196 session_.get(), session_->config().event_config(), | 196 session_.get(), session_->config().event_config(), |
197 base::Bind(&ConnectionToHost::OnChannelInitialized, | 197 base::Bind(&ConnectionToHost::OnChannelInitialized, |
198 base::Unretained(this))); | 198 base::Unretained(this))); |
199 | 199 |
200 video_reader_ = VideoReader::Create(session_->config()); | 200 video_reader_.reset(new VideoReader()); |
201 video_reader_->Init(session_.get(), monitored_video_stub_.get(), | 201 video_reader_->Init(session_.get(), session_->config().video_config(), |
202 base::Bind(&ConnectionToHost::OnChannelInitialized, | 202 base::Bind(&ConnectionToHost::OnChannelInitialized, |
203 base::Unretained(this))); | 203 base::Unretained(this))); |
| 204 video_reader_->set_video_stub(monitored_video_stub_.get()); |
204 | 205 |
205 audio_reader_ = AudioReader::Create(session_->config()); | 206 audio_reader_ = AudioReader::Create(session_->config()); |
206 if (audio_reader_.get()) { | 207 if (audio_reader_.get()) { |
207 audio_reader_->Init(session_.get(), session_->config().audio_config(), | 208 audio_reader_->Init(session_.get(), session_->config().audio_config(), |
208 base::Bind(&ConnectionToHost::OnChannelInitialized, | 209 base::Bind(&ConnectionToHost::OnChannelInitialized, |
209 base::Unretained(this))); | 210 base::Unretained(this))); |
210 audio_reader_->set_audio_stub(audio_stub_); | 211 audio_reader_->set_audio_stub(audio_stub_); |
211 } | 212 } |
212 break; | 213 break; |
213 | 214 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 300 |
300 if (state != state_) { | 301 if (state != state_) { |
301 state_ = state; | 302 state_ = state; |
302 error_ = error; | 303 error_ = error; |
303 event_callback_->OnConnectionState(state_, error_); | 304 event_callback_->OnConnectionState(state_, error_); |
304 } | 305 } |
305 } | 306 } |
306 | 307 |
307 } // namespace protocol | 308 } // namespace protocol |
308 } // namespace remoting | 309 } // namespace remoting |
OLD | NEW |