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

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..472c19c7cb870f7bec2e5d7230b91c19ca777b08 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -281,7 +281,7 @@ public class JniInterface {
* is true.
*/
private static native void nativeAuthenticationResponse(String pin, boolean createPair,
- String deviceName);
+ String deviceName);
/** Saves newly-received pairing credentials to permanent storage. Called on the UI thread. */
@CalledByNative
@@ -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);
/** 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
« no previous file with comments | « remoting/android/java/src/org/chromium/chromoting/DesktopView.java ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698