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

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

Issue 19967007: Various improvements to the Chromoting Android app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to clarify ChromotingJniRuntime pointer lifetimes Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/chromoting_jni.cc ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_instance.h
diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h
index 1c113cfd9e08358c3a0a847cd3187af249f8f230..6b332e407cb895ea4b1261d33711b081c60db1db 100644
--- a/remoting/client/jni/chromoting_jni_instance.h
+++ b/remoting/client/jni/chromoting_jni_instance.h
@@ -37,12 +37,13 @@ class ChromotingJniInstance
public base::RefCountedThreadSafe<ChromotingJniInstance> {
public:
// Initiates a connection with the specified host. Call from the UI thread.
- ChromotingJniInstance(
- const char* username,
- const char* auth_token,
- const char* host_jid,
- const char* host_id,
- const char* host_pubkey);
+ // The instance does not take ownership of |jni_runtime|.
+ ChromotingJniInstance(ChromotingJniRuntime* jni_runtime,
+ const char* username,
+ const char* auth_token,
+ const char* host_jid,
+ const char* host_id,
+ const char* host_pubkey);
// Terminates the current connection (if it hasn't already failed) and cleans
// up. Must be called before destruction.
@@ -97,6 +98,9 @@ class ChromotingJniInstance
void FetchSecret(bool pairable,
const protocol::SecretFetchedCallback& callback);
+ // Used to obtain task runner references and make calls to Java methods.
+ ChromotingJniRuntime* jni_runtime_;
+
// This group of variables is to be used on the display thread.
scoped_refptr<FrameConsumerProxy> frame_consumer_;
scoped_ptr<JniFrameConsumer> view_;
« no previous file with comments | « remoting/client/jni/chromoting_jni.cc ('k') | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698