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

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

Issue 214173002: Send TextEvent message from Android client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/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 79533a32f166754b32861c1547bd45212bbaa879..0e6439c2ddbcf9ed86fab83ccb3c434338e1af41 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -296,40 +296,53 @@ public class JniInterface {
* Moves the mouse cursor, possibly while clicking the specified (nonnegative) button. Called
* on the UI thread.
*/
- public static void mouseAction(int x, int y, int whichButton, boolean buttonDown) {
+ public static void sendMouseEvent(int x, int y, int whichButton, boolean buttonDown) {
if (!sConnected) {
return;
}
- nativeMouseAction(x, y, whichButton, buttonDown);
+ nativeSendMouseEvent(x, y, whichButton, buttonDown);
}
/** Passes mouse information to the native handling code. */
- private static native void nativeMouseAction(int x, int y, int whichButton, boolean buttonDown);
+ private static native void nativeSendMouseEvent(int x, int y, int whichButton,
+ boolean buttonDown);
Lambros 2014/03/27 04:20:40 I think continuation lines are meant to be 8-space
Sergey Ulanov 2014/03/28 00:09:46 Done. Also updated nativeAuthenticationResponse()
/** Injects a mouse-wheel event with delta values. Called on the UI thread. */
- public static void mouseWheelDeltaAction(int deltaX, int deltaY) {
+ public static void sendMouseWheelEvent(int deltaX, int deltaY) {
if (!sConnected) {
return;
}
- nativeMouseWheelDeltaAction(deltaX, deltaY);
+ nativeSendMouseWheelEvent(deltaX, deltaY);
}
/** Passes mouse-wheel information to the native handling code. */
- private static native void nativeMouseWheelDeltaAction(int deltaX, int deltaY);
+ private static native void nativeSendMouseWheelEvent(int deltaX, int deltaY);
- /** Presses and releases the specified (nonnegative) key. Called on the UI thread. */
- public static void keyboardAction(int keyCode, boolean keyDown) {
+ /** Presses or releases the specified (nonnegative) key. Called on the UI thread. */
+ public static void sendKeyEvent(int keyCode, boolean keyDown) {
if (!sConnected) {
return;
}
- nativeKeyboardAction(keyCode, keyDown);
+ nativeSendKeyEvent(keyCode, keyDown);
}
/** Passes key press information to the native handling code. */
- private static native void nativeKeyboardAction(int keyCode, boolean keyDown);
+ private static native void nativeSendKeyEvent(int keyCode, boolean keyDown);
+
+ /** Sends TextEvent to the host. Called on the UI thread. */
+ public static void sendTextEvent(String text) {
+ if (!sConnected) {
+ return;
+ }
+
+ nativeSendTextEvent(text);
+ }
+
+ /** Passes text event information to the native handling code. */
+ private static native void nativeSendTextEvent(String text);
/**
* Sets the redraw callback to the provided functor. Provide a value of null whenever the

Powered by Google App Engine
This is Rietveld 408576698