| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_CHROMOTING_HOST_H_ | 6 #define REMOTING_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/thread.h" | 10 #include "base/thread.h" |
| 11 #include "remoting/base/encoder.h" | 11 #include "remoting/base/encoder.h" |
| 12 #include "remoting/host/access_verifier.h" |
| 12 #include "remoting/host/capturer.h" | 13 #include "remoting/host/capturer.h" |
| 13 #include "remoting/host/client_connection.h" | 14 #include "remoting/host/client_connection.h" |
| 14 #include "remoting/host/event_executor.h" | 15 #include "remoting/host/event_executor.h" |
| 15 #include "remoting/host/heartbeat_sender.h" | 16 #include "remoting/host/heartbeat_sender.h" |
| 16 #include "remoting/jingle_glue/jingle_client.h" | 17 #include "remoting/jingle_glue/jingle_client.h" |
| 17 #include "remoting/jingle_glue/jingle_thread.h" | 18 #include "remoting/jingle_glue/jingle_thread.h" |
| 18 | 19 |
| 19 class Task; | 20 class Task; |
| 20 | 21 |
| 21 namespace remoting { | 22 namespace remoting { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // EventExecutor executes input events received from the client. | 127 // EventExecutor executes input events received from the client. |
| 127 scoped_ptr<EventExecutor> executor_; | 128 scoped_ptr<EventExecutor> executor_; |
| 128 | 129 |
| 129 // The libjingle client. This is used to connect to the talk network to | 130 // The libjingle client. This is used to connect to the talk network to |
| 130 // receive connection requests from chromoting client. | 131 // receive connection requests from chromoting client. |
| 131 scoped_refptr<JingleClient> jingle_client_; | 132 scoped_refptr<JingleClient> jingle_client_; |
| 132 | 133 |
| 133 // Objects that takes care of sending heartbeats to the chromoting bot. | 134 // Objects that takes care of sending heartbeats to the chromoting bot. |
| 134 scoped_refptr<HeartbeatSender> heartbeat_sender_; | 135 scoped_refptr<HeartbeatSender> heartbeat_sender_; |
| 135 | 136 |
| 137 AccessVerifier access_verifier_; |
| 138 |
| 136 // A ClientConnection manages the connectino to a remote client. | 139 // A ClientConnection manages the connectino to a remote client. |
| 137 // TODO(hclam): Expand this to a list of clients. | 140 // TODO(hclam): Expand this to a list of clients. |
| 138 scoped_refptr<ClientConnection> client_; | 141 scoped_refptr<ClientConnection> client_; |
| 139 | 142 |
| 140 // Session manager for the host process. | 143 // Session manager for the host process. |
| 141 scoped_refptr<SessionManager> session_; | 144 scoped_refptr<SessionManager> session_; |
| 142 | 145 |
| 143 // This task gets executed when this object fails to connect to the | 146 // This task gets executed when this object fails to connect to the |
| 144 // talk network or Shutdown() is called. | 147 // talk network or Shutdown() is called. |
| 145 scoped_ptr<Task> shutdown_task_; | 148 scoped_ptr<Task> shutdown_task_; |
| 146 | 149 |
| 147 // Tracks the internal state of the host. | 150 // Tracks the internal state of the host. |
| 148 // This variable is written on the main thread of ChromotingHostContext | 151 // This variable is written on the main thread of ChromotingHostContext |
| 149 // and read by jingle thread. | 152 // and read by jingle thread. |
| 150 State state_; | 153 State state_; |
| 151 | 154 |
| 152 // Lock is to lock the access to |state_|. | 155 // Lock is to lock the access to |state_|. |
| 153 Lock lock_; | 156 Lock lock_; |
| 154 | 157 |
| 155 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 158 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 } // namespace remoting | 161 } // namespace remoting |
| 159 | 162 |
| 160 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 163 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |