| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ |
| 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 std::unique_ptr<protocol::CursorShapeStub> cursor_stub, | 51 std::unique_ptr<protocol::CursorShapeStub> cursor_stub, |
| 52 std::unique_ptr<protocol::VideoRenderer> video_renderer, | 52 std::unique_ptr<protocol::VideoRenderer> video_renderer, |
| 53 const std::string& username, | 53 const std::string& username, |
| 54 const std::string& auth_token, | 54 const std::string& auth_token, |
| 55 const std::string& host_jid, | 55 const std::string& host_jid, |
| 56 const std::string& host_id, | 56 const std::string& host_id, |
| 57 const std::string& host_pubkey, | 57 const std::string& host_pubkey, |
| 58 const std::string& pairing_id, | 58 const std::string& pairing_id, |
| 59 const std::string& pairing_secret, | 59 const std::string& pairing_secret, |
| 60 const std::string& capabilities, | 60 const std::string& capabilities, |
| 61 const std::string& flags); | 61 const std::string& flags, |
| 62 const std::string& host_version, |
| 63 const std::string& host_os, |
| 64 const std::string& host_os_version); |
| 62 | 65 |
| 63 ~ChromotingJniInstance() override; | 66 ~ChromotingJniInstance() override; |
| 64 | 67 |
| 65 // Starts the connection. Can be called on any thread. | 68 // Starts the connection. Can be called on any thread. |
| 66 void Connect(); | 69 void Connect(); |
| 67 | 70 |
| 68 // Terminates the current connection (if it hasn't already failed) and cleans | 71 // Terminates the current connection (if it hasn't already failed) and cleans |
| 69 // up. The instance will no longer be valid after calling this function. | 72 // up. The instance will no longer be valid after calling this function. |
| 70 // Must be called before destruction. | 73 // Must be called before destruction. |
| 71 void Disconnect(); | 74 void Disconnect(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 193 |
| 191 // The set of capabilities supported by the client. Accessed on the network | 194 // The set of capabilities supported by the client. Accessed on the network |
| 192 // thread. Once SetCapabilities() is called, this will contain the negotiated | 195 // thread. Once SetCapabilities() is called, this will contain the negotiated |
| 193 // set of capabilities for this remoting session. | 196 // set of capabilities for this remoting session. |
| 194 std::string capabilities_; | 197 std::string capabilities_; |
| 195 | 198 |
| 196 // Indicates whether the client is connected to the host. Used on network | 199 // Indicates whether the client is connected to the host. Used on network |
| 197 // thread. | 200 // thread. |
| 198 bool connected_ = false; | 201 bool connected_ = false; |
| 199 | 202 |
| 203 // TODO(BUG 680752): Remove these. |
| 204 std::string host_version_; |
| 205 std::string host_os_; |
| 206 std::string host_os_version_; |
| 207 |
| 200 base::WeakPtr<ChromotingJniInstance> weak_ptr_; | 208 base::WeakPtr<ChromotingJniInstance> weak_ptr_; |
| 201 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 209 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
| 202 | 210 |
| 203 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 211 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
| 204 }; | 212 }; |
| 205 | 213 |
| 206 } // namespace remoting | 214 } // namespace remoting |
| 207 | 215 |
| 208 #endif // REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ | 216 #endif // REMOTING_CLIENT_JNI_CHROMOTING_JNI_INSTANCE_H_ |
| OLD | NEW |