| 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 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ | 6 #define REMOTING_HOST_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_vector.h" | |
| 15 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 16 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 17 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
| 18 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 19 #include "net/base/backoff_entry.h" | 18 #include "net/base/backoff_entry.h" |
| 20 #include "remoting/host/client_session.h" | 19 #include "remoting/host/client_session.h" |
| 21 #include "remoting/host/desktop_environment_options.h" | 20 #include "remoting/host/desktop_environment_options.h" |
| 22 #include "remoting/host/host_extension.h" | 21 #include "remoting/host/host_extension.h" |
| 23 #include "remoting/host/host_status_monitor.h" | 22 #include "remoting/host/host_status_monitor.h" |
| 24 #include "remoting/host/host_status_observer.h" | 23 #include "remoting/host/host_status_observer.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 134 |
| 136 const ClientSessions& client_sessions_for_tests() { return clients_; } | 135 const ClientSessions& client_sessions_for_tests() { return clients_; } |
| 137 | 136 |
| 138 base::WeakPtr<ChromotingHost> AsWeakPtr() { | 137 base::WeakPtr<ChromotingHost> AsWeakPtr() { |
| 139 return weak_factory_.GetWeakPtr(); | 138 return weak_factory_.GetWeakPtr(); |
| 140 } | 139 } |
| 141 | 140 |
| 142 private: | 141 private: |
| 143 friend class ChromotingHostTest; | 142 friend class ChromotingHostTest; |
| 144 | 143 |
| 145 typedef ScopedVector<HostExtension> HostExtensionList; | |
| 146 | |
| 147 // Unless specified otherwise all members of this class must be | 144 // Unless specified otherwise all members of this class must be |
| 148 // used on the network thread only. | 145 // used on the network thread only. |
| 149 | 146 |
| 150 // Parameters specified when the host was created. | 147 // Parameters specified when the host was created. |
| 151 DesktopEnvironmentFactory* desktop_environment_factory_; | 148 DesktopEnvironmentFactory* desktop_environment_factory_; |
| 152 std::unique_ptr<protocol::SessionManager> session_manager_; | 149 std::unique_ptr<protocol::SessionManager> session_manager_; |
| 153 scoped_refptr<protocol::TransportContext> transport_context_; | 150 scoped_refptr<protocol::TransportContext> transport_context_; |
| 154 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; | 151 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; |
| 155 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; | 152 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_; |
| 156 | 153 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 169 // Options to initialize a DesktopEnvironment. | 166 // Options to initialize a DesktopEnvironment. |
| 170 const DesktopEnvironmentOptions desktop_environment_options_; | 167 const DesktopEnvironmentOptions desktop_environment_options_; |
| 171 | 168 |
| 172 // The maximum duration of any session. | 169 // The maximum duration of any session. |
| 173 base::TimeDelta max_session_duration_; | 170 base::TimeDelta max_session_duration_; |
| 174 | 171 |
| 175 // The pairing registry for PIN-less authentication. | 172 // The pairing registry for PIN-less authentication. |
| 176 scoped_refptr<protocol::PairingRegistry> pairing_registry_; | 173 scoped_refptr<protocol::PairingRegistry> pairing_registry_; |
| 177 | 174 |
| 178 // List of host extensions. | 175 // List of host extensions. |
| 179 HostExtensionList extensions_; | 176 std::vector<std::unique_ptr<HostExtension>> extensions_; |
| 180 | 177 |
| 181 base::WeakPtrFactory<ChromotingHost> weak_factory_; | 178 base::WeakPtrFactory<ChromotingHost> weak_factory_; |
| 182 | 179 |
| 183 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 180 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 184 }; | 181 }; |
| 185 | 182 |
| 186 } // namespace remoting | 183 } // namespace remoting |
| 187 | 184 |
| 188 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 185 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |