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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // |session_|. This is a no-op unless |session| is currently non-null. | 63 // |session_|. This is a no-op unless |session| is currently non-null. |
64 void DisconnectFromHost(); | 64 void DisconnectFromHost(); |
65 | 65 |
66 // Returns the client for the currently-active session. Do not call if | 66 // Returns the client for the currently-active session. Do not call if |
67 // |session| is null. | 67 // |session| is null. |
68 scoped_refptr<ChromotingJniInstance> session() { | 68 scoped_refptr<ChromotingJniInstance> session() { |
69 DCHECK(session_); | 69 DCHECK(session_); |
70 return session_; | 70 return session_; |
71 } | 71 } |
72 | 72 |
73 // Notifies the user of the current connection status. Call on UI thread. | 73 // Notifies Java code of the current connection status. Call on UI thread. |
74 void ReportConnectionStatus(protocol::ConnectionToHost::State state, | 74 void OnConnectionState(protocol::ConnectionToHost::State state, |
75 protocol::ErrorCode error); | 75 protocol::ErrorCode error); |
76 | 76 |
77 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. | 77 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. |
78 void DisplayAuthenticationPrompt(bool pairing_supported); | 78 void DisplayAuthenticationPrompt(bool pairing_supported); |
79 | 79 |
80 // Saves new pairing credentials to permanent storage. Call on UI thread. | 80 // Saves new pairing credentials to permanent storage. Call on UI thread. |
81 void CommitPairingCredentials(const std::string& host, | 81 void CommitPairingCredentials(const std::string& host, |
82 const std::string& id, | 82 const std::string& id, |
83 const std::string& secret); | 83 const std::string& secret); |
84 | 84 |
85 // Pops up a third party login page to fetch token required for | 85 // Pops up a third party login page to fetch token required for |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 scoped_refptr<ChromotingJniInstance> session_; | 133 scoped_refptr<ChromotingJniInstance> session_; |
134 | 134 |
135 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; | 135 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; |
136 | 136 |
137 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); | 137 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace remoting | 140 } // namespace remoting |
141 | 141 |
142 #endif | 142 #endif |
OLD | NEW |