| 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 <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 // SessionManager::Listener implementation. | 128 // SessionManager::Listener implementation. |
| 129 virtual void OnSessionManagerReady() OVERRIDE; | 129 virtual void OnSessionManagerReady() OVERRIDE; |
| 130 virtual void OnIncomingSession( | 130 virtual void OnIncomingSession( |
| 131 protocol::Session* session, | 131 protocol::Session* session, |
| 132 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; | 132 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; |
| 133 | 133 |
| 134 // Sets desired configuration for the protocol. Must be called before Start(). | 134 // Sets desired configuration for the protocol. Must be called before Start(). |
| 135 void set_protocol_config(scoped_ptr<protocol::CandidateSessionConfig> config); | 135 void set_protocol_config(scoped_ptr<protocol::CandidateSessionConfig> config); |
| 136 | 136 |
| 137 // Pause or unpause the session. While the session is paused, remote input | |
| 138 // is ignored. Can be called from any thread. | |
| 139 void PauseSession(bool pause); | |
| 140 | |
| 141 // Disconnects all active clients. Clients are disconnected | 137 // Disconnects all active clients. Clients are disconnected |
| 142 // asynchronously when this method is called on a thread other than | 138 // asynchronously when this method is called on a thread other than |
| 143 // the network thread. Potentically this may cause disconnection of | 139 // the network thread. Potentically this may cause disconnection of |
| 144 // clients that were not connected when this method is called. | 140 // clients that were not connected when this method is called. |
| 145 void DisconnectAllClients(); | 141 void DisconnectAllClients(); |
| 146 | 142 |
| 147 base::WeakPtr<ChromotingHost> AsWeakPtr() { | 143 base::WeakPtr<ChromotingHost> AsWeakPtr() { |
| 148 return weak_factory_.GetWeakPtr(); | 144 return weak_factory_.GetWeakPtr(); |
| 149 } | 145 } |
| 150 | 146 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 base::TimeDelta max_session_duration_; | 205 base::TimeDelta max_session_duration_; |
| 210 | 206 |
| 211 base::WeakPtrFactory<ChromotingHost> weak_factory_; | 207 base::WeakPtrFactory<ChromotingHost> weak_factory_; |
| 212 | 208 |
| 213 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 209 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 214 }; | 210 }; |
| 215 | 211 |
| 216 } // namespace remoting | 212 } // namespace remoting |
| 217 | 213 |
| 218 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 214 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |