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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java

Issue 1687873002: Revert of Refactor Chromoting JNI code to use jni/Client (Java changes only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/cardboard/Cursor.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java
index 534728a848c592961cae90a26966691e325cc399..34403d6108fbe2813aabeba946a909aa0585a319 100644
--- a/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java
+++ b/remoting/android/java/src/org/chromium/chromoting/cardboard/Cursor.java
@@ -13,7 +13,7 @@
import android.opengl.GLES20;
import org.chromium.chromoting.TouchInputHandler;
-import org.chromium.chromoting.jni.Client;
+import org.chromium.chromoting.jni.JniInterface;
import java.nio.FloatBuffer;
@@ -52,8 +52,6 @@
// Threshold to determine whether to send the mouse move event.
private static final float CURSOR_MOVE_THRESHOLD = 1.0f;
- private final Client mClient;
-
private FloatBuffer mPositionCoordinates;
private int mVertexShaderHandle;
@@ -78,8 +76,7 @@
private PointF mCursorPosition;
- public Cursor(Client client) {
- mClient = client;
+ public Cursor() {
mHalfFrameSize = new PointF(0.0f, 0.0f);
mCursorPosition = new PointF(0.0f, 0.0f);
@@ -123,7 +120,7 @@
*/
public void moveTo(PointF position) {
if (moveCursor(position)) {
- mClient.sendMouseEvent((int) position.x, (int) position.y,
+ JniInterface.sendMouseEvent((int) position.x, (int) position.y,
TouchInputHandler.BUTTON_UNDEFINED, false);
}
mCursorPosition = position;
@@ -140,7 +137,7 @@
}
}
- Bitmap cursorBitmap = mClient.getCursorBitmap();
+ Bitmap cursorBitmap = JniInterface.getCursorBitmap();
if (cursorBitmap == mCursorBitmap) {
// Case when cursor image has not changed.
@@ -151,7 +148,7 @@
}
mCursorBitmap = cursorBitmap;
- updatePosition(desktop, mCursorBitmap, mClient.getCursorHotspot());
+ updatePosition(desktop, mCursorBitmap, JniInterface.getCursorHotspot());
TextureHelper.linkTexture(mTextureDataHandle, cursorBitmap);

Powered by Google App Engine
This is Rietveld 408576698