OLD | NEW |
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 package org.chromium.chromoting.jni; | 5 package org.chromium.chromoting.jni; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.AlertDialog; | 8 import android.app.AlertDialog; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.DialogInterface; | 10 import android.content.DialogInterface; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 buffer.order(ByteOrder.LITTLE_ENDIAN); | 426 buffer.order(ByteOrder.LITTLE_ENDIAN); |
427 buffer.asIntBuffer().get(data, 0, data.length); | 427 buffer.asIntBuffer().get(data, 0, data.length); |
428 sCursorBitmap = Bitmap.createBitmap(data, width, height, Bitmap.Config.A
RGB_8888); | 428 sCursorBitmap = Bitmap.createBitmap(data, width, height, Bitmap.Config.A
RGB_8888); |
429 } | 429 } |
430 | 430 |
431 /** Position of cursor hotspot within cursor image. Called on the graphics t
hread. */ | 431 /** Position of cursor hotspot within cursor image. Called on the graphics t
hread. */ |
432 public static Point getCursorHotspot() { return sCursorHotspot; } | 432 public static Point getCursorHotspot() { return sCursorHotspot; } |
433 | 433 |
434 /** Returns the current cursor shape. Called on the graphics thread. */ | 434 /** Returns the current cursor shape. Called on the graphics thread. */ |
435 public static Bitmap getCursorBitmap() { return sCursorBitmap; } | 435 public static Bitmap getCursorBitmap() { return sCursorBitmap; } |
| 436 |
| 437 /** |
| 438 * Third Party Authentication |
| 439 */ |
| 440 /** Pops up a third party login page to fetch the token required for authent
ication.*/ |
| 441 @CalledByNative |
| 442 public static void fetchThirdPartyToken(String tokenUrl, String clientId, St
ring scope) { |
| 443 // TODO(kelvinp): Create a intent to fetch the token from the browser |
| 444 // (Android Third Party Auth - Part III) |
| 445 } |
| 446 |
| 447 /* Notify the native code to continue authentication with the |token| and th
e |sharedSecret| */ |
| 448 public static native void nativeOnThirdPartyTokenFetched(String token, Strin
g sharedSecret); |
436 } | 449 } |
OLD | NEW |