| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Terminates the current connection (if it hasn't already failed) and cleans | 57 // Terminates the current connection (if it hasn't already failed) and cleans |
| 58 // up. Must be called before destruction. | 58 // up. The instance will no longer be valid after calling this function. |
| 59 // Must be called before destruction. |
| 59 void Disconnect(); | 60 void Disconnect(); |
| 60 | 61 |
| 61 // Requests the android app to fetch a third-party token. | 62 // Requests the android app to fetch a third-party token. |
| 62 void FetchThirdPartyToken( | 63 void FetchThirdPartyToken( |
| 63 const std::string& host_public_key, | 64 const std::string& host_public_key, |
| 64 const std::string& token_url, | 65 const std::string& token_url, |
| 65 const std::string& scope, | 66 const std::string& scope, |
| 66 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback); | 67 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback); |
| 67 | 68 |
| 68 // Called by the android app when the token is fetched. | 69 // Called by the android app when the token is fetched. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; | 195 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; |
| 195 | 196 |
| 196 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; | 197 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; |
| 197 | 198 |
| 198 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); | 199 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 } // namespace remoting | 202 } // namespace remoting |
| 202 | 203 |
| 203 #endif | 204 #endif |
| OLD | NEW |