| 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/access_verifier.h" |
| 13 #include "remoting/host/capturer.h" | 13 #include "remoting/host/capturer.h" |
| 14 #include "remoting/host/event_executor.h" | 14 #include "remoting/host/event_executor.h" |
| 15 #include "remoting/host/heartbeat_sender.h" | 15 #include "remoting/host/heartbeat_sender.h" |
| 16 #include "remoting/jingle_glue/jingle_client.h" | 16 #include "remoting/jingle_glue/jingle_client.h" |
| 17 #include "remoting/jingle_glue/jingle_thread.h" | 17 #include "remoting/jingle_glue/jingle_thread.h" |
| 18 #include "remoting/protocol/session_manager.h" | 18 #include "remoting/protocol/session_manager.h" |
| 19 #include "remoting/protocol/connection_to_client.h" | 19 #include "remoting/protocol/connection_to_client.h" |
| 20 | 20 |
| 21 class Task; | 21 class Task; |
| 22 | 22 |
| 23 namespace remoting { | 23 namespace remoting { |
| 24 | 24 |
| 25 namespace protocol { | 25 namespace protocol { |
| 26 class ConnectionToClient; | 26 class ConnectionToClient; |
| 27 class SessionConfig; |
| 27 } // namespace protocol | 28 } // namespace protocol |
| 28 | 29 |
| 29 class Capturer; | 30 class Capturer; |
| 30 class ChromotingHostContext; | 31 class ChromotingHostContext; |
| 31 class ChromotocolConfig; | |
| 32 class Encoder; | 32 class Encoder; |
| 33 class EventExecutor; | 33 class EventExecutor; |
| 34 class MutableHostConfig; | 34 class MutableHostConfig; |
| 35 class SessionManager; | 35 class SessionManager; |
| 36 | 36 |
| 37 // A class to implement the functionality of a host process. | 37 // A class to implement the functionality of a host process. |
| 38 // | 38 // |
| 39 // Here's the work flow of this class: | 39 // Here's the work flow of this class: |
| 40 // 1. We should load the saved GAIA ID token or if this is the first | 40 // 1. We should load the saved GAIA ID token or if this is the first |
| 41 // time the host process runs we should prompt user for the | 41 // time the host process runs we should prompt user for the |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 // This method connects to the talk network and start listening for incoming | 114 // This method connects to the talk network and start listening for incoming |
| 115 // connections. | 115 // connections. |
| 116 void DoStart(Task* shutdown_task); | 116 void DoStart(Task* shutdown_task); |
| 117 | 117 |
| 118 // Callback for protocol::SessionManager::Close(). | 118 // Callback for protocol::SessionManager::Close(). |
| 119 void OnServerClosed(); | 119 void OnServerClosed(); |
| 120 | 120 |
| 121 // Creates encoder for the specified configuration. | 121 // Creates encoder for the specified configuration. |
| 122 Encoder* CreateEncoder(const ChromotocolConfig* config); | 122 Encoder* CreateEncoder(const protocol::SessionConfig* config); |
| 123 | 123 |
| 124 // The context that the chromoting host runs on. | 124 // The context that the chromoting host runs on. |
| 125 ChromotingHostContext* context_; | 125 ChromotingHostContext* context_; |
| 126 | 126 |
| 127 scoped_refptr<MutableHostConfig> config_; | 127 scoped_refptr<MutableHostConfig> config_; |
| 128 | 128 |
| 129 // Capturer to be used by SessionManager. Once the SessionManager is | 129 // Capturer to be used by SessionManager. Once the SessionManager is |
| 130 // constructed this is set to NULL. | 130 // constructed this is set to NULL. |
| 131 scoped_ptr<Capturer> capturer_; | 131 scoped_ptr<Capturer> capturer_; |
| 132 | 132 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // Lock is to lock the access to |state_|. | 166 // Lock is to lock the access to |state_|. |
| 167 Lock lock_; | 167 Lock lock_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 169 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace remoting | 172 } // namespace remoting |
| 173 | 173 |
| 174 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 174 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |