| 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/test/test_chromoting_client.h" | 5 #include "remoting/test/test_chromoting_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 13 #include "jingle/glue/thread_wrapper.h" | 13 #include "jingle/glue/thread_wrapper.h" |
| 14 #include "net/base/request_priority.h" | 14 #include "net/base/request_priority.h" |
| 15 #include "net/socket/client_socket_factory.h" | 15 #include "net/socket/client_socket_factory.h" |
| 16 #include "remoting/base/chromium_url_request.h" | 16 #include "remoting/base/chromium_url_request.h" |
| 17 #include "remoting/base/service_urls.h" |
| 17 #include "remoting/base/url_request_context_getter.h" | 18 #include "remoting/base/url_request_context_getter.h" |
| 18 #include "remoting/client/audio_player.h" | 19 #include "remoting/client/audio_player.h" |
| 19 #include "remoting/client/chromoting_client.h" | 20 #include "remoting/client/chromoting_client.h" |
| 20 #include "remoting/client/client_context.h" | 21 #include "remoting/client/client_context.h" |
| 21 #include "remoting/protocol/chromium_port_allocator_factory.h" | 22 #include "remoting/protocol/chromium_port_allocator_factory.h" |
| 22 #include "remoting/protocol/host_stub.h" | 23 #include "remoting/protocol/host_stub.h" |
| 23 #include "remoting/protocol/negotiating_client_authenticator.h" | 24 #include "remoting/protocol/negotiating_client_authenticator.h" |
| 24 #include "remoting/protocol/network_settings.h" | 25 #include "remoting/protocol/network_settings.h" |
| 25 #include "remoting/protocol/session_config.h" | 26 #include "remoting/protocol/session_config.h" |
| 26 #include "remoting/protocol/third_party_client_authenticator.h" | 27 #include "remoting/protocol/third_party_client_authenticator.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 protocol::NetworkSettings network_settings( | 119 protocol::NetworkSettings network_settings( |
| 119 protocol::NetworkSettings::NAT_TRAVERSAL_FULL); | 120 protocol::NetworkSettings::NAT_TRAVERSAL_FULL); |
| 120 | 121 |
| 121 scoped_refptr<protocol::TransportContext> transport_context( | 122 scoped_refptr<protocol::TransportContext> transport_context( |
| 122 new protocol::TransportContext( | 123 new protocol::TransportContext( |
| 123 signal_strategy_.get(), | 124 signal_strategy_.get(), |
| 124 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), | 125 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), |
| 125 make_scoped_ptr( | 126 make_scoped_ptr( |
| 126 new ChromiumUrlRequestFactory(request_context_getter)), | 127 new ChromiumUrlRequestFactory(request_context_getter)), |
| 127 network_settings, protocol::TransportRole::CLIENT)); | 128 network_settings, protocol::TransportRole::CLIENT)); |
| 129 transport_context->set_ice_config_url( |
| 130 ServiceUrls::GetInstance()->ice_config_url()); |
| 128 | 131 |
| 129 protocol::ClientAuthenticationConfig client_auth_config; | 132 protocol::ClientAuthenticationConfig client_auth_config; |
| 130 client_auth_config.host_id = connection_setup_info.host_id; | 133 client_auth_config.host_id = connection_setup_info.host_id; |
| 131 client_auth_config.pairing_client_id = connection_setup_info.pairing_id; | 134 client_auth_config.pairing_client_id = connection_setup_info.pairing_id; |
| 132 client_auth_config.pairing_secret = connection_setup_info.shared_secret; | 135 client_auth_config.pairing_secret = connection_setup_info.shared_secret; |
| 133 | 136 |
| 134 if (!connection_setup_info.pin.empty()) { | 137 if (!connection_setup_info.pin.empty()) { |
| 135 client_auth_config.fetch_secret_callback = | 138 client_auth_config.fetch_secret_callback = |
| 136 base::Bind(&FetchSecret, connection_setup_info.pin); | 139 base::Bind(&FetchSecret, connection_setup_info.pin); |
| 137 } | 140 } |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 VLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called"; | 268 VLOG(1) << "TestChromotingClient::InjectClipboardEvent() Called"; |
| 266 } | 269 } |
| 267 | 270 |
| 268 void TestChromotingClient::SetCursorShape( | 271 void TestChromotingClient::SetCursorShape( |
| 269 const protocol::CursorShapeInfo& cursor_shape) { | 272 const protocol::CursorShapeInfo& cursor_shape) { |
| 270 VLOG(1) << "TestChromotingClient::SetCursorShape() Called"; | 273 VLOG(1) << "TestChromotingClient::SetCursorShape() Called"; |
| 271 } | 274 } |
| 272 | 275 |
| 273 } // namespace test | 276 } // namespace test |
| 274 } // namespace remoting | 277 } // namespace remoting |
| OLD | NEW |