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

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

Issue 2753963002: Refactoring and rewriting the chromoting jni instance to be chromoting session. (Closed)
Patch Set: JNI client is the session delegate. Created 3 years, 9 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
Index: remoting/client/jni/jni_client.h
diff --git a/remoting/client/jni/jni_client.h b/remoting/client/jni/jni_client.h
index 4428091c7513216a3c972cb1cd89f4ea63508acf..8c74cff61394f96af2102aadcd2447161fff1064 100644
--- a/remoting/client/jni/jni_client.h
+++ b/remoting/client/jni/jni_client.h
@@ -15,8 +15,10 @@
namespace remoting {
+class AudioPlayerAndroid;
class ChromotingClientRuntime;
-class ChromotingJniInstance;
+class ChromotingSession::Delegate;
+class ChromotingSession;
class JniGlDisplayHandler;
class JniPairingSecretFetcher;
@@ -25,7 +27,7 @@ struct ConnectToHostInfo;
// Houses resources scoped to a session and exposes JNI interface to the
// Java client during a session. All its methods should be invoked exclusively
// from the UI thread unless otherwise noted.
-class JniClient {
+class JniClient : public ChromotingSession::Delegate {
public:
JniClient(base::android::ScopedJavaGlobalRef<jobject> java_client);
virtual ~JniClient();
@@ -154,12 +156,13 @@ class JniClient {
base::android::ScopedJavaGlobalRef<jobject> java_client_;
std::unique_ptr<JniGlDisplayHandler> display_handler_;
+ std::unique_ptr<AudioPlayerAndroid> audio_player_;
// Deleted on UI thread.
std::unique_ptr<JniPairingSecretFetcher> secret_fetcher_;
// Deleted on Network thread.
- std::unique_ptr<ChromotingJniInstance> session_;
+ std::unique_ptr<ChromotingSession> session_;
// Holds pointer for the UI thread.
base::WeakPtr<JniClient> weak_ptr_;

Powered by Google App Engine
This is Rietveld 408576698