| 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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "remoting/base/capabilities.h" | 8 #include "remoting/base/capabilities.h" |
| 9 #include "remoting/client/audio_decode_scheduler.h" | 9 #include "remoting/client/audio_decode_scheduler.h" |
| 10 #include "remoting/client/audio_player.h" | 10 #include "remoting/client/audio_player.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 video_renderer_(video_renderer), | 34 video_renderer_(video_renderer), |
| 35 host_capabilities_received_(false) { | 35 host_capabilities_received_(false) { |
| 36 if (audio_player) { | 36 if (audio_player) { |
| 37 audio_decode_scheduler_.reset(new AudioDecodeScheduler( | 37 audio_decode_scheduler_.reset(new AudioDecodeScheduler( |
| 38 client_context->main_task_runner(), | 38 client_context->main_task_runner(), |
| 39 client_context->audio_decode_task_runner(), | 39 client_context->audio_decode_task_runner(), |
| 40 audio_player.Pass())); | 40 audio_player.Pass())); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 ChromotingClient::~ChromotingClient() { | 44 ChromotingClient::~ChromotingClient() {} |
| 45 |
| 46 void ChromotingClient::set_candidate_config( |
| 47 scoped_ptr<protocol::CandidateSessionConfig> config) { |
| 48 connection_.set_candidate_config(config.Pass()); |
| 45 } | 49 } |
| 46 | 50 |
| 47 void ChromotingClient::Start( | 51 void ChromotingClient::Start( |
| 48 SignalStrategy* signal_strategy, | 52 SignalStrategy* signal_strategy, |
| 49 scoped_ptr<protocol::Authenticator> authenticator, | 53 scoped_ptr<protocol::Authenticator> authenticator, |
| 50 scoped_ptr<protocol::TransportFactory> transport_factory, | 54 scoped_ptr<protocol::TransportFactory> transport_factory, |
| 51 const std::string& host_jid, | 55 const std::string& host_jid, |
| 52 const std::string& capabilities) { | 56 const std::string& capabilities) { |
| 53 DCHECK(task_runner_->BelongsToCurrentThread()); | 57 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 54 | 58 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 if (connection_.config().SupportsCapabilities()) { | 168 if (connection_.config().SupportsCapabilities()) { |
| 165 VLOG(1) << "Client capabilities: " << local_capabilities_; | 169 VLOG(1) << "Client capabilities: " << local_capabilities_; |
| 166 | 170 |
| 167 protocol::Capabilities capabilities; | 171 protocol::Capabilities capabilities; |
| 168 capabilities.set_capabilities(local_capabilities_); | 172 capabilities.set_capabilities(local_capabilities_); |
| 169 connection_.host_stub()->SetCapabilities(capabilities); | 173 connection_.host_stub()->SetCapabilities(capabilities); |
| 170 } | 174 } |
| 171 } | 175 } |
| 172 | 176 |
| 173 } // namespace remoting | 177 } // namespace remoting |
| OLD | NEW |