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

Side by Side Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 407403002: Chromoting: Synchronize connected/disconnected state between Java/C++ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 const char* host_jid, 56 const char* host_jid,
57 const char* host_id, 57 const char* host_id,
58 const char* host_pubkey, 58 const char* host_pubkey,
59 const char* pairing_id, 59 const char* pairing_id,
60 const char* pairing_secret); 60 const char* pairing_secret);
61 61
62 // Terminates any ongoing connection attempt and cleans up by nullifying 62 // Terminates any ongoing connection attempt and cleans up by nullifying
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.
67 // |session| is null.
68 scoped_refptr<ChromotingJniInstance> session() { 67 scoped_refptr<ChromotingJniInstance> session() {
69 DCHECK(session_);
70 return session_; 68 return session_;
71 } 69 }
72 70
73 // Notifies the user of the current connection status. Call on UI thread. 71 // Notifies the user of the current connection status. Call on UI thread.
74 void ReportConnectionStatus(protocol::ConnectionToHost::State state, 72 void ReportConnectionStatus(protocol::ConnectionToHost::State state,
75 protocol::ErrorCode error); 73 protocol::ErrorCode error);
76 74
77 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. 75 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread.
78 void DisplayAuthenticationPrompt(bool pairing_supported); 76 void DisplayAuthenticationPrompt(bool pairing_supported);
79 77
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 scoped_refptr<ChromotingJniInstance> session_; 131 scoped_refptr<ChromotingJniInstance> session_;
134 132
135 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; 133 friend struct DefaultSingletonTraits<ChromotingJniRuntime>;
136 134
137 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); 135 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime);
138 }; 136 };
139 137
140 } // namespace remoting 138 } // namespace remoting
141 139
142 #endif 140 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698