| 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_RUNTIME_H_ | 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
| 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ | 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 const char* pairing_secret, | 60 const char* pairing_secret, |
| 61 const char* capabilities); | 61 const char* capabilities); |
| 62 | 62 |
| 63 // Terminates any ongoing connection attempt and cleans up by nullifying | 63 // Terminates any ongoing connection attempt and cleans up by nullifying |
| 64 // |session_|. This is a no-op unless |session| is currently non-null. | 64 // |session_|. This is a no-op unless |session| is currently non-null. |
| 65 void DisconnectFromHost(); | 65 void DisconnectFromHost(); |
| 66 | 66 |
| 67 // Returns the client for the currently-active session. Do not call if | 67 // Returns the client for the currently-active session. Do not call if |
| 68 // |session| is null. | 68 // |session| is null. |
| 69 scoped_refptr<ChromotingJniInstance> session() { | 69 scoped_refptr<ChromotingJniInstance> session() { |
| 70 DCHECK(session_); | 70 DCHECK(session_.get()); |
| 71 return session_; | 71 return session_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 // Notifies Java code of the current connection status. Call on UI thread. | 74 // Notifies Java code of the current connection status. Call on UI thread. |
| 75 void OnConnectionState(protocol::ConnectionToHost::State state, | 75 void OnConnectionState(protocol::ConnectionToHost::State state, |
| 76 protocol::ErrorCode error); | 76 protocol::ErrorCode error); |
| 77 | 77 |
| 78 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. | 78 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. |
| 79 void DisplayAuthenticationPrompt(bool pairing_supported); | 79 void DisplayAuthenticationPrompt(bool pairing_supported); |
| 80 | 80 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 scoped_refptr<ChromotingJniInstance> session_; | 142 scoped_refptr<ChromotingJniInstance> session_; |
| 143 | 143 |
| 144 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; | 144 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; |
| 145 | 145 |
| 146 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); | 146 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace remoting | 149 } // namespace remoting |
| 150 | 150 |
| 151 #endif | 151 #endif |
| OLD | NEW |