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 <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 host_connection_.reset(new WebrtcConnectionToClient( | 119 host_connection_.reset(new WebrtcConnectionToClient( |
120 base::WrapUnique(host_session_), | 120 base::WrapUnique(host_session_), |
121 TransportContext::ForTests(protocol::TransportRole::SERVER), | 121 TransportContext::ForTests(protocol::TransportRole::SERVER), |
122 message_loop_.task_runner())); | 122 message_loop_.task_runner())); |
123 client_connection_.reset(new WebrtcConnectionToHost()); | 123 client_connection_.reset(new WebrtcConnectionToHost()); |
124 | 124 |
125 } else { | 125 } else { |
126 host_connection_.reset(new IceConnectionToClient( | 126 host_connection_.reset(new IceConnectionToClient( |
127 base::WrapUnique(host_session_), | 127 base::WrapUnique(host_session_), |
128 TransportContext::ForTests(protocol::TransportRole::SERVER), | 128 TransportContext::ForTests(protocol::TransportRole::SERVER), |
129 message_loop_.task_runner())); | 129 message_loop_.task_runner(), message_loop_.task_runner())); |
130 client_connection_.reset(new IceConnectionToHost()); | 130 client_connection_.reset(new IceConnectionToHost()); |
131 } | 131 } |
132 | 132 |
133 // Setup host side. | 133 // Setup host side. |
134 host_connection_->SetEventHandler(&host_event_handler_); | 134 host_connection_->SetEventHandler(&host_event_handler_); |
135 host_connection_->set_clipboard_stub(&host_clipboard_stub_); | 135 host_connection_->set_clipboard_stub(&host_clipboard_stub_); |
136 host_connection_->set_host_stub(&host_stub_); | 136 host_connection_->set_host_stub(&host_stub_); |
137 host_connection_->set_input_stub(&host_input_stub_); | 137 host_connection_->set_input_stub(&host_input_stub_); |
138 | 138 |
139 // Setup client side. | 139 // Setup client side. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 QuitRunLoop(&run_loop))); | 364 QuitRunLoop(&run_loop))); |
365 | 365 |
366 // Send key event from the client. | 366 // Send key event from the client. |
367 client_connection_->input_stub()->InjectKeyEvent(event); | 367 client_connection_->input_stub()->InjectKeyEvent(event); |
368 | 368 |
369 run_loop.Run(); | 369 run_loop.Run(); |
370 } | 370 } |
371 | 371 |
372 } // namespace protocol | 372 } // namespace protocol |
373 } // namespace remoting | 373 } // namespace remoting |
OLD | NEW |