Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2152)

Unified Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 21554002: Enable Android support for Chromoting PINless (paired) authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prevent future coordinates-related bugs Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_runtime.h
diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h
index ec85d7c6a124f62599c3a4fb307bba63ffb40206..1a6952b56247070363b69824db1eccabe6391e67 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -45,12 +45,15 @@ class ChromotingJniRuntime {
// Initiates a connection with the specified host. Only call when a host
// connection is active (i.e. between a call to Connect() and the
- // corresponding call to Disconnect()).
+ // corresponding call to Disconnect()). To skip the attempt at pair-based
+ // authentication, leave |pairing_id| and |pairing_secret| as empty strings.
void ConnectToHost(const char* username,
const char* auth_token,
const char* host_jid,
const char* host_id,
- const char* host_pubkey);
+ const char* host_pubkey,
+ const char* pairing_id,
+ const char* pairing_secret);
// Terminates any ongoing connection attempt and cleans up by nullifying
// |session_|. This is a no-op unless |session| is currently non-null.
@@ -63,13 +66,18 @@ class ChromotingJniRuntime {
return session_;
}
- // Notifies the user that the connection status has changed.
+ // Notifies the user of the current connection status. Call on UI thread.
void ReportConnectionStatus(protocol::ConnectionToHost::State state,
protocol::ErrorCode error);
- // Pops up a dialog box asking the user to enter a PIN.
+ // Pops up a dialog box asking the user to enter a PIN. Call on UI thread.
void DisplayAuthenticationPrompt();
+ // Saves new pairing credentials to permanent storage. Call on UI thread.
+ void CommitPairingCredentials(const std::string& host,
+ const std::string& id,
+ const std::string& secret);
+
// Updates image dimensions and canvas memory space. Call on display thread.
void UpdateImageBuffer(int width, int height, jobject buffer);
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698