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

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

Issue 341693004: Fix Desktop.dispatchKeyEvent() to return correct result. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 return; 314 return;
315 } 315 }
316 316
317 nativeSendMouseWheelEvent(deltaX, deltaY); 317 nativeSendMouseWheelEvent(deltaX, deltaY);
318 } 318 }
319 319
320 /** Passes mouse-wheel information to the native handling code. */ 320 /** Passes mouse-wheel information to the native handling code. */
321 private static native void nativeSendMouseWheelEvent(int deltaX, int deltaY) ; 321 private static native void nativeSendMouseWheelEvent(int deltaX, int deltaY) ;
322 322
323 /** Presses or releases the specified (nonnegative) key. Called on the UI th read. */ 323 /** Presses or releases the specified (nonnegative) key. Called on the UI th read. */
324 public static void sendKeyEvent(int keyCode, boolean keyDown) { 324 public static boolean sendKeyEvent(int keyCode, boolean keyDown) {
325 if (!sConnected) { 325 if (!sConnected) {
326 return; 326 return false;
327 } 327 }
328 328
329 nativeSendKeyEvent(keyCode, keyDown); 329 return nativeSendKeyEvent(keyCode, keyDown);
330 } 330 }
331 331
332 /** Passes key press information to the native handling code. */ 332 /** Passes key press information to the native handling code. */
333 private static native void nativeSendKeyEvent(int keyCode, boolean keyDown); 333 private static native boolean nativeSendKeyEvent(int keyCode, boolean keyDow n);
334 334
335 /** Sends TextEvent to the host. Called on the UI thread. */ 335 /** Sends TextEvent to the host. Called on the UI thread. */
336 public static void sendTextEvent(String text) { 336 public static void sendTextEvent(String text) {
337 if (!sConnected) { 337 if (!sConnected) {
338 return; 338 return;
339 } 339 }
340 340
341 nativeSendTextEvent(text); 341 nativeSendTextEvent(text);
342 } 342 }
343 343
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 /** Pops up a third party login page to fetch the token required for authent ication.*/ 440 /** Pops up a third party login page to fetch the token required for authent ication.*/
441 @CalledByNative 441 @CalledByNative
442 public static void fetchThirdPartyToken(String tokenUrl, String clientId, St ring scope) { 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 443 // TODO(kelvinp): Create a intent to fetch the token from the browser
444 // (Android Third Party Auth - Part III) 444 // (Android Third Party Auth - Part III)
445 } 445 }
446 446
447 /* Notify the native code to continue authentication with the |token| and th e |sharedSecret| */ 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); 448 public static native void nativeOnThirdPartyTokenFetched(String token, Strin g sharedSecret);
449 } 449 }
OLDNEW
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/Desktop.java ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698