| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "remoting/base/capabilities.h" | 9 #include "remoting/base/capabilities.h" |
| 10 #include "remoting/client/audio_decode_scheduler.h" | 10 #include "remoting/client/audio_decode_scheduler.h" |
| 11 #include "remoting/client/audio_player.h" | 11 #include "remoting/client/audio_player.h" |
| 12 #include "remoting/client/client_context.h" | 12 #include "remoting/client/client_context.h" |
| 13 #include "remoting/client/client_user_interface.h" | 13 #include "remoting/client/client_user_interface.h" |
| 14 #include "remoting/client/video_renderer.h" | |
| 15 #include "remoting/protocol/authenticator.h" | 14 #include "remoting/protocol/authenticator.h" |
| 16 #include "remoting/protocol/connection_to_host.h" | 15 #include "remoting/protocol/connection_to_host.h" |
| 17 #include "remoting/protocol/host_stub.h" | 16 #include "remoting/protocol/host_stub.h" |
| 18 #include "remoting/protocol/ice_connection_to_host.h" | 17 #include "remoting/protocol/ice_connection_to_host.h" |
| 19 #include "remoting/protocol/ice_transport.h" | 18 #include "remoting/protocol/ice_transport.h" |
| 20 #include "remoting/protocol/jingle_session_manager.h" | 19 #include "remoting/protocol/jingle_session_manager.h" |
| 21 #include "remoting/protocol/session_config.h" | 20 #include "remoting/protocol/session_config.h" |
| 22 #include "remoting/protocol/transport_context.h" | 21 #include "remoting/protocol/transport_context.h" |
| 22 #include "remoting/protocol/video_renderer.h" |
| 23 | 23 |
| 24 namespace remoting { | 24 namespace remoting { |
| 25 | 25 |
| 26 ChromotingClient::ChromotingClient(ClientContext* client_context, | 26 ChromotingClient::ChromotingClient(ClientContext* client_context, |
| 27 ClientUserInterface* user_interface, | 27 ClientUserInterface* user_interface, |
| 28 VideoRenderer* video_renderer, | 28 protocol::VideoRenderer* video_renderer, |
| 29 scoped_ptr<AudioPlayer> audio_player) | 29 scoped_ptr<AudioPlayer> audio_player) |
| 30 : user_interface_(user_interface), | 30 : user_interface_(user_interface), |
| 31 video_renderer_(video_renderer), | 31 video_renderer_(video_renderer), |
| 32 connection_(new protocol::IceConnectionToHost()) { | 32 connection_(new protocol::IceConnectionToHost()) { |
| 33 DCHECK(client_context->main_task_runner()->BelongsToCurrentThread()); | 33 DCHECK(client_context->main_task_runner()->BelongsToCurrentThread()); |
| 34 if (audio_player) { | 34 if (audio_player) { |
| 35 audio_decode_scheduler_.reset(new AudioDecodeScheduler( | 35 audio_decode_scheduler_.reset(new AudioDecodeScheduler( |
| 36 client_context->main_task_runner(), | 36 client_context->main_task_runner(), |
| 37 client_context->audio_decode_task_runner(), std::move(audio_player))); | 37 client_context->audio_decode_task_runner(), std::move(audio_player))); |
| 38 } | 38 } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 // Negotiate capabilities with the host. | 220 // Negotiate capabilities with the host. |
| 221 VLOG(1) << "Client capabilities: " << local_capabilities_; | 221 VLOG(1) << "Client capabilities: " << local_capabilities_; |
| 222 | 222 |
| 223 protocol::Capabilities capabilities; | 223 protocol::Capabilities capabilities; |
| 224 capabilities.set_capabilities(local_capabilities_); | 224 capabilities.set_capabilities(local_capabilities_); |
| 225 connection_->host_stub()->SetCapabilities(capabilities); | 225 connection_->host_stub()->SetCapabilities(capabilities); |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace remoting | 228 } // namespace remoting |
| OLD | NEW |