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_CHROMOTING_JNI_INSTANCE_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const std::string& username, | 47 const std::string& username, |
48 const std::string& auth_token, | 48 const std::string& auth_token, |
49 const std::string& host_jid, | 49 const std::string& host_jid, |
50 const std::string& host_id, | 50 const std::string& host_id, |
51 const std::string& host_pubkey, | 51 const std::string& host_pubkey, |
52 const std::string& pairing_id, | 52 const std::string& pairing_id, |
53 const std::string& pairing_secret, | 53 const std::string& pairing_secret, |
54 const std::string& capabilities, | 54 const std::string& capabilities, |
55 const std::string& flags); | 55 const std::string& flags); |
56 | 56 |
| 57 // Starts the connection. Can be called on any thread. |
| 58 void Connect(); |
| 59 |
57 // Terminates the current connection (if it hasn't already failed) and cleans | 60 // Terminates the current connection (if it hasn't already failed) and cleans |
58 // up. The instance will no longer be valid after calling this function. | 61 // up. The instance will no longer be valid after calling this function. |
59 // Must be called before destruction. | 62 // Must be called before destruction. |
60 void Disconnect(); | 63 void Disconnect(); |
61 | 64 |
62 // Requests the android app to fetch a third-party token. | 65 // Requests the android app to fetch a third-party token. |
63 void FetchThirdPartyToken( | 66 void FetchThirdPartyToken( |
64 const std::string& host_public_key, | 67 const std::string& host_public_key, |
65 const std::string& token_url, | 68 const std::string& token_url, |
66 const std::string& scope, | 69 const std::string& scope, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 198 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
196 | 199 |
197 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 200 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
198 | 201 |
199 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 202 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
200 }; | 203 }; |
201 | 204 |
202 } // namespace remoting | 205 } // namespace remoting |
203 | 206 |
204 #endif | 207 #endif |
OLD | NEW |