| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/webrtc_transport.h" | 5 #include "remoting/protocol/webrtc_transport.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 StreamChannelFactory* WebrtcTransport::GetStreamChannelFactory() { | 237 StreamChannelFactory* WebrtcTransport::GetStreamChannelFactory() { |
| 238 DCHECK(thread_checker_.CalledOnValidThread()); | 238 DCHECK(thread_checker_.CalledOnValidThread()); |
| 239 return &data_stream_adapter_; | 239 return &data_stream_adapter_; |
| 240 } | 240 } |
| 241 | 241 |
| 242 StreamChannelFactory* WebrtcTransport::GetMultiplexedChannelFactory() { | 242 StreamChannelFactory* WebrtcTransport::GetMultiplexedChannelFactory() { |
| 243 DCHECK(thread_checker_.CalledOnValidThread()); | 243 DCHECK(thread_checker_.CalledOnValidThread()); |
| 244 return GetStreamChannelFactory(); | 244 return GetStreamChannelFactory(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 WebrtcTransport* WebrtcTransport::AsWebrtcTransport() { |
| 248 return this; |
| 249 } |
| 250 |
| 247 void WebrtcTransport::OnLocalSessionDescriptionCreated( | 251 void WebrtcTransport::OnLocalSessionDescriptionCreated( |
| 248 scoped_ptr<webrtc::SessionDescriptionInterface> description, | 252 scoped_ptr<webrtc::SessionDescriptionInterface> description, |
| 249 const std::string& error) { | 253 const std::string& error) { |
| 250 DCHECK(thread_checker_.CalledOnValidThread()); | 254 DCHECK(thread_checker_.CalledOnValidThread()); |
| 251 | 255 |
| 252 if (!peer_connection_) | 256 if (!peer_connection_) |
| 253 return; | 257 return; |
| 254 | 258 |
| 255 if (!description) { | 259 if (!description) { |
| 256 LOG(ERROR) << "PeerConnection offer creation failed: " << error; | 260 LOG(ERROR) << "PeerConnection offer creation failed: " << error; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 498 |
| 495 WebrtcTransportFactory::~WebrtcTransportFactory() {} | 499 WebrtcTransportFactory::~WebrtcTransportFactory() {} |
| 496 | 500 |
| 497 scoped_ptr<Transport> WebrtcTransportFactory::CreateTransport() { | 501 scoped_ptr<Transport> WebrtcTransportFactory::CreateTransport() { |
| 498 return make_scoped_ptr( | 502 return make_scoped_ptr( |
| 499 new WebrtcTransport(worker_thread_, port_allocator_factory_, role_)); | 503 new WebrtcTransport(worker_thread_, port_allocator_factory_, role_)); |
| 500 } | 504 } |
| 501 | 505 |
| 502 } // namespace protocol | 506 } // namespace protocol |
| 503 } // namespace remoting | 507 } // namespace remoting |
| OLD | NEW |