| 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_connection_to_host.h" | 5 #include "remoting/protocol/webrtc_connection_to_host.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" | 
| 10 #include "jingle/glue/thread_wrapper.h" | 10 #include "jingle/glue/thread_wrapper.h" | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 30 void WebrtcConnectionToHost::Connect( | 30 void WebrtcConnectionToHost::Connect( | 
| 31     std::unique_ptr<Session> session, | 31     std::unique_ptr<Session> session, | 
| 32     scoped_refptr<TransportContext> transport_context, | 32     scoped_refptr<TransportContext> transport_context, | 
| 33     HostEventCallback* event_callback) { | 33     HostEventCallback* event_callback) { | 
| 34   DCHECK(client_stub_); | 34   DCHECK(client_stub_); | 
| 35   DCHECK(clipboard_stub_); | 35   DCHECK(clipboard_stub_); | 
| 36 | 36 | 
| 37   transport_.reset(new WebrtcTransport( | 37   transport_.reset(new WebrtcTransport( | 
| 38       jingle_glue::JingleThreadWrapper::current(), transport_context, this)); | 38       jingle_glue::JingleThreadWrapper::current(), transport_context, this)); | 
| 39 | 39 | 
| 40   transport_->audio_module()->SetAudioTaskRunner(audio_decode_task_runner_); | 40   if (audio_decode_task_runner_) | 
|  | 41     transport_->audio_module()->SetAudioTaskRunner(audio_decode_task_runner_); | 
| 41 | 42 | 
| 42   session_ = std::move(session); | 43   session_ = std::move(session); | 
| 43   session_->SetEventHandler(this); | 44   session_->SetEventHandler(this); | 
| 44   session_->SetTransport(transport_.get()); | 45   session_->SetTransport(transport_.get()); | 
| 45 | 46 | 
| 46   event_callback_ = event_callback; | 47   event_callback_ = event_callback; | 
| 47 | 48 | 
| 48   SetState(CONNECTING, OK); | 49   SetState(CONNECTING, OK); | 
| 49 } | 50 } | 
| 50 | 51 | 
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 218 | 219 | 
| 219   if (state != state_) { | 220   if (state != state_) { | 
| 220     state_ = state; | 221     state_ = state; | 
| 221     error_ = error; | 222     error_ = error; | 
| 222     event_callback_->OnConnectionState(state_, error_); | 223     event_callback_->OnConnectionState(state_, error_); | 
| 223   } | 224   } | 
| 224 } | 225 } | 
| 225 | 226 | 
| 226 }  // namespace protocol | 227 }  // namespace protocol | 
| 227 }  // namespace remoting | 228 }  // namespace remoting | 
| OLD | NEW | 
|---|