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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "remoting/base/capabilities.h" | 9 #include "remoting/base/capabilities.h" |
10 #include "remoting/client/audio_decode_scheduler.h" | 10 #include "remoting/client/audio_decode_scheduler.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 local_capabilities_ = capabilities; | 65 local_capabilities_ = capabilities; |
66 | 66 |
67 if (!protocol_config_) | 67 if (!protocol_config_) |
68 protocol_config_ = protocol::CandidateSessionConfig::CreateDefault(); | 68 protocol_config_ = protocol::CandidateSessionConfig::CreateDefault(); |
69 if (!audio_decode_scheduler_) | 69 if (!audio_decode_scheduler_) |
70 protocol_config_->DisableAudioChannel(); | 70 protocol_config_->DisableAudioChannel(); |
71 | 71 |
72 if (!connection_) { | 72 if (!connection_) { |
73 if (protocol_config_->webrtc_supported()) { | 73 if (protocol_config_->webrtc_supported()) { |
74 DCHECK(!protocol_config_->ice_supported()); | 74 DCHECK(!protocol_config_->ice_supported()); |
75 #if defined(OS_NACL) | 75 #if !defined(ENABLE_WEBRTC_REMOTING_CLIENT) |
76 LOG(FATAL) << "WebRTC is not supported in webapp."; | 76 LOG(FATAL) << "WebRTC is not supported."; |
77 #else // defined(OS_NACL) | 77 #else |
78 connection_.reset(new protocol::WebrtcConnectionToHost()); | 78 connection_.reset(new protocol::WebrtcConnectionToHost()); |
79 #endif // !defined(OS_NACL) | 79 #endif |
80 } else { | 80 } else { |
81 DCHECK(protocol_config_->ice_supported()); | 81 DCHECK(protocol_config_->ice_supported()); |
82 connection_.reset(new protocol::IceConnectionToHost()); | 82 connection_.reset(new protocol::IceConnectionToHost()); |
83 } | 83 } |
84 } | 84 } |
85 connection_->set_client_stub(this); | 85 connection_->set_client_stub(this); |
86 connection_->set_clipboard_stub(this); | 86 connection_->set_clipboard_stub(this); |
87 connection_->set_video_renderer(video_renderer_); | 87 connection_->set_video_renderer(video_renderer_); |
88 connection_->set_audio_stub(audio_decode_scheduler_.get()); | 88 connection_->set_audio_stub(audio_decode_scheduler_.get()); |
89 | 89 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 // Negotiate capabilities with the host. | 235 // Negotiate capabilities with the host. |
236 VLOG(1) << "Client capabilities: " << local_capabilities_; | 236 VLOG(1) << "Client capabilities: " << local_capabilities_; |
237 | 237 |
238 protocol::Capabilities capabilities; | 238 protocol::Capabilities capabilities; |
239 capabilities.set_capabilities(local_capabilities_); | 239 capabilities.set_capabilities(local_capabilities_); |
240 connection_->host_stub()->SetCapabilities(capabilities); | 240 connection_->host_stub()->SetCapabilities(capabilities); |
241 } | 241 } |
242 | 242 |
243 } // namespace remoting | 243 } // namespace remoting |
OLD | NEW |