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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java

Issue 337013002: Third Party Authentication for Android Part III - Android OAuth2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation 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
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/ThirdPartyTokenFetcher.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
index 81e94ccd9de4202caf5cedb919bfd7be3986b894..6691e4f5774ca3978e2f3030d5a929d2a9f1e651 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -21,6 +21,7 @@ import android.widget.TextView;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
+import org.chromium.chromoting.Chromoting;
import org.chromium.chromoting.R;
import java.nio.ByteBuffer;
@@ -434,16 +435,19 @@ public class JniInterface {
/** Returns the current cursor shape. Called on the graphics thread. */
public static Bitmap getCursorBitmap() { return sCursorBitmap; }
- /**
- * Third Party Authentication
- */
- /** Pops up a third party login page to fetch the token required for authentication.*/
+ //
+ // Third Party Authentication
+ //
+
+ /** Pops up a third party login page to fetch the token required for authentication. */
@CalledByNative
public static void fetchThirdPartyToken(String tokenUrl, String clientId, String scope) {
- // TODO(kelvinp): Create a intent to fetch the token from the browser
- // (Android Third Party Auth - Part III)
+ Chromoting app = (Chromoting) sContext;
+ app.fetchThirdPartyToken(tokenUrl, clientId, scope);
}
- /* Notify the native code to continue authentication with the |token| and the |sharedSecret| */
+ /**
+ * Notify the native code to continue authentication with the |token| and the |sharedSecret|.
+ */
public static native void nativeOnThirdPartyTokenFetched(String token, String sharedSecret);
}
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/ThirdPartyTokenFetcher.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698