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

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

Issue 319273003: Third Party Authentication for Android Part II - Java Native Interface plumbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: JNI plumbing Created 6 years, 6 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/chromoting_jni_instance.h
diff --git a/remoting/client/jni/chromoting_jni_instance.h b/remoting/client/jni/chromoting_jni_instance.h
index 126ce18196378ab55cacf69c2a66ebeb7469a16e..6e6612f65d42d31cd029052b5a6dff5af14d5bd4 100644
--- a/remoting/client/jni/chromoting_jni_instance.h
+++ b/remoting/client/jni/chromoting_jni_instance.h
@@ -17,7 +17,6 @@
#include "remoting/client/client_user_interface.h"
#include "remoting/client/frame_consumer_proxy.h"
#include "remoting/client/jni/jni_frame_consumer.h"
-#include "remoting/client/token_fetcher_proxy.h"
#include "remoting/jingle_glue/xmpp_signal_strategy.h"
#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/connection_to_host.h"
@@ -35,6 +34,7 @@ class LogToServer;
}
class VideoRenderer;
+class TokenFetcherProxy;
// ClientUserInterface that indirectly makes and receives JNI calls.
class ChromotingJniInstance
@@ -66,6 +66,10 @@ class ChromotingJniInstance
const std::string& scope,
const base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy);
+ // Called by the android app when the token is fetched.
+ void HandleOnThirdPartyTokenFetched(const std::string& token,
+ const std::string& shared_secret);
+
// Provides the user's PIN and resumes the host authentication attempt. Call
// on the UI thread once the user has finished entering this PIN into the UI,
// but only after the UI has been asked to provide a PIN (via FetchSecret()).
@@ -161,6 +165,7 @@ class ChromotingJniInstance
XmppSignalStrategy::XmppServerConfig xmpp_config_;
scoped_ptr<XmppSignalStrategy> signaling_; // Must outlive client_
scoped_ptr<client::LogToServer> log_to_server_;
+ base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_;
// Pass this the user's PIN once we have it. To be assigned and accessed on
// the UI thread, but must be posted to the network thread to call it.
@@ -182,6 +187,9 @@ class ChromotingJniInstance
friend class base::RefCountedThreadSafe<ChromotingJniInstance>;
+ // Weak reference to this instance, used for task posting.
Sergey Ulanov 2014/06/07 01:32:45 don't need this comment.
kelvinp 2014/06/09 18:42:32 Done.
+ base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
};

Powered by Google App Engine
This is Rietveld 408576698