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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // Don't care about these events. | 164 // Don't care about these events. |
165 break; | 165 break; |
166 | 166 |
167 case Session::AUTHENTICATED: | 167 case Session::AUTHENTICATED: |
168 video_reader_ = VideoReader::Create(session_->config()); | 168 video_reader_ = VideoReader::Create(session_->config()); |
169 video_reader_->Init(session_.get(), video_stub_, base::Bind( | 169 video_reader_->Init(session_.get(), video_stub_, base::Bind( |
170 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); | 170 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); |
171 | 171 |
172 audio_reader_ = AudioReader::Create(session_->config()); | 172 audio_reader_ = AudioReader::Create(session_->config()); |
173 if (audio_reader_.get()) { | 173 if (audio_reader_.get()) { |
174 audio_reader_->Init(session_.get(), audio_stub_, base::Bind( | 174 audio_reader_->Init(session_.get(), base::Bind( |
175 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); | 175 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); |
| 176 audio_reader_->set_audio_stub(audio_stub_); |
176 } | 177 } |
177 | 178 |
178 control_dispatcher_.reset(new ClientControlDispatcher()); | 179 control_dispatcher_.reset(new ClientControlDispatcher()); |
179 control_dispatcher_->Init(session_.get(), base::Bind( | 180 control_dispatcher_->Init(session_.get(), base::Bind( |
180 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); | 181 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); |
181 control_dispatcher_->set_client_stub(client_stub_); | 182 control_dispatcher_->set_client_stub(client_stub_); |
182 control_dispatcher_->set_clipboard_stub(clipboard_stub_); | 183 control_dispatcher_->set_clipboard_stub(clipboard_stub_); |
183 | 184 |
184 event_dispatcher_.reset(new ClientEventDispatcher()); | 185 event_dispatcher_.reset(new ClientEventDispatcher()); |
185 event_dispatcher_->Init(session_.get(), base::Bind( | 186 event_dispatcher_->Init(session_.get(), base::Bind( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 281 |
281 if (state != state_) { | 282 if (state != state_) { |
282 state_ = state; | 283 state_ = state; |
283 error_ = error; | 284 error_ = error; |
284 event_callback_->OnConnectionState(state_, error_); | 285 event_callback_->OnConnectionState(state_, error_); |
285 } | 286 } |
286 } | 287 } |
287 | 288 |
288 } // namespace protocol | 289 } // namespace protocol |
289 } // namespace remoting | 290 } // namespace remoting |
OLD | NEW |