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_client.h" | 5 #include "remoting/protocol/webrtc_connection_to_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 session_(std::move(session)), | 47 session_(std::move(session)), |
48 video_encode_task_runner_(video_encode_task_runner), | 48 video_encode_task_runner_(video_encode_task_runner), |
49 audio_task_runner_(audio_task_runner), | 49 audio_task_runner_(audio_task_runner), |
50 control_dispatcher_(new HostControlDispatcher()), | 50 control_dispatcher_(new HostControlDispatcher()), |
51 event_dispatcher_(new HostEventDispatcher()), | 51 event_dispatcher_(new HostEventDispatcher()), |
52 weak_factory_(this) { | 52 weak_factory_(this) { |
53 session_->SetEventHandler(this); | 53 session_->SetEventHandler(this); |
54 session_->SetTransport(transport_.get()); | 54 session_->SetTransport(transport_.get()); |
55 } | 55 } |
56 | 56 |
57 WebrtcConnectionToClient::~WebrtcConnectionToClient() {} | 57 WebrtcConnectionToClient::~WebrtcConnectionToClient() { |
| 58 DCHECK(thread_checker_.CalledOnValidThread()); |
| 59 } |
58 | 60 |
59 void WebrtcConnectionToClient::SetEventHandler( | 61 void WebrtcConnectionToClient::SetEventHandler( |
60 ConnectionToClient::EventHandler* event_handler) { | 62 ConnectionToClient::EventHandler* event_handler) { |
61 DCHECK(thread_checker_.CalledOnValidThread()); | 63 DCHECK(thread_checker_.CalledOnValidThread()); |
62 event_handler_ = event_handler; | 64 event_handler_ = event_handler; |
63 } | 65 } |
64 | 66 |
65 protocol::Session* WebrtcConnectionToClient::session() { | 67 protocol::Session* WebrtcConnectionToClient::session() { |
66 DCHECK(thread_checker_.CalledOnValidThread()); | 68 DCHECK(thread_checker_.CalledOnValidThread()); |
67 return session_.get(); | 69 return session_.get(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 ChannelDispatcherBase* channel_dispatcher) { | 214 ChannelDispatcherBase* channel_dispatcher) { |
213 DCHECK(thread_checker_.CalledOnValidThread()); | 215 DCHECK(thread_checker_.CalledOnValidThread()); |
214 | 216 |
215 LOG(ERROR) << "Channel " << channel_dispatcher->channel_name() | 217 LOG(ERROR) << "Channel " << channel_dispatcher->channel_name() |
216 << " was closed unexpectedly."; | 218 << " was closed unexpectedly."; |
217 Disconnect(INCOMPATIBLE_PROTOCOL); | 219 Disconnect(INCOMPATIBLE_PROTOCOL); |
218 } | 220 } |
219 | 221 |
220 } // namespace protocol | 222 } // namespace protocol |
221 } // namespace remoting | 223 } // namespace remoting |
OLD | NEW |