| 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/host/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 DCHECK(CalledOnValidThread()); | 118 DCHECK(CalledOnValidThread()); |
| 119 status_observers_.AddObserver(observer); | 119 status_observers_.AddObserver(observer); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void ChromotingHost::RemoveStatusObserver(HostStatusObserver* observer) { | 122 void ChromotingHost::RemoveStatusObserver(HostStatusObserver* observer) { |
| 123 DCHECK(CalledOnValidThread()); | 123 DCHECK(CalledOnValidThread()); |
| 124 status_observers_.RemoveObserver(observer); | 124 status_observers_.RemoveObserver(observer); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void ChromotingHost::AddExtension(std::unique_ptr<HostExtension> extension) { | 127 void ChromotingHost::AddExtension(std::unique_ptr<HostExtension> extension) { |
| 128 extensions_.push_back(extension.release()); | 128 extensions_.push_back(std::move(extension)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ChromotingHost::SetAuthenticatorFactory( | 131 void ChromotingHost::SetAuthenticatorFactory( |
| 132 std::unique_ptr<protocol::AuthenticatorFactory> authenticator_factory) { | 132 std::unique_ptr<protocol::AuthenticatorFactory> authenticator_factory) { |
| 133 DCHECK(CalledOnValidThread()); | 133 DCHECK(CalledOnValidThread()); |
| 134 session_manager_->set_authenticator_factory(std::move(authenticator_factory)); | 134 session_manager_->set_authenticator_factory(std::move(authenticator_factory)); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void ChromotingHost::SetMaximumSessionDuration( | 137 void ChromotingHost::SetMaximumSessionDuration( |
| 138 const base::TimeDelta& max_session_duration) { | 138 const base::TimeDelta& max_session_duration) { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 connection.reset(new protocol::IceConnectionToClient( | 254 connection.reset(new protocol::IceConnectionToClient( |
| 255 base::WrapUnique(session), transport_context_, | 255 base::WrapUnique(session), transport_context_, |
| 256 video_encode_task_runner_, audio_task_runner_)); | 256 video_encode_task_runner_, audio_task_runner_)); |
| 257 } | 257 } |
| 258 | 258 |
| 259 DesktopEnvironmentOptions options = desktop_environment_options_; | 259 DesktopEnvironmentOptions options = desktop_environment_options_; |
| 260 // TODO(zijiehe): Apply HostSessionOptions to options. | 260 // TODO(zijiehe): Apply HostSessionOptions to options. |
| 261 // Create a ClientSession object. | 261 // Create a ClientSession object. |
| 262 clients_.push_back(base::MakeUnique<ClientSession>( | 262 clients_.push_back(base::MakeUnique<ClientSession>( |
| 263 this, std::move(connection), desktop_environment_factory_, options, | 263 this, std::move(connection), desktop_environment_factory_, options, |
| 264 max_session_duration_, pairing_registry_, extensions_.get())); | 264 max_session_duration_, pairing_registry_, extensions_)); |
| 265 } | 265 } |
| 266 | 266 |
| 267 } // namespace remoting | 267 } // namespace remoting |
| OLD | NEW |