| 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 34403d6108fbe2813aabeba946a909aa0585a319..534728a848c592961cae90a26966691e325cc399 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.graphics.PointF;
|
| import android.opengl.GLES20;
|
|
|
| import org.chromium.chromoting.TouchInputHandler;
|
| -import org.chromium.chromoting.jni.JniInterface;
|
| +import org.chromium.chromoting.jni.Client;
|
|
|
| import java.nio.FloatBuffer;
|
|
|
| @@ -52,6 +52,8 @@ public class Cursor {
|
| // 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;
|
| @@ -76,7 +78,8 @@ public class Cursor {
|
|
|
| private PointF mCursorPosition;
|
|
|
| - public Cursor() {
|
| + public Cursor(Client client) {
|
| + mClient = client;
|
| mHalfFrameSize = new PointF(0.0f, 0.0f);
|
| mCursorPosition = new PointF(0.0f, 0.0f);
|
|
|
| @@ -120,7 +123,7 @@ public class Cursor {
|
| */
|
| public void moveTo(PointF position) {
|
| if (moveCursor(position)) {
|
| - JniInterface.sendMouseEvent((int) position.x, (int) position.y,
|
| + mClient.sendMouseEvent((int) position.x, (int) position.y,
|
| TouchInputHandler.BUTTON_UNDEFINED, false);
|
| }
|
| mCursorPosition = position;
|
| @@ -137,7 +140,7 @@ public class Cursor {
|
| }
|
| }
|
|
|
| - Bitmap cursorBitmap = JniInterface.getCursorBitmap();
|
| + Bitmap cursorBitmap = mClient.getCursorBitmap();
|
|
|
| if (cursorBitmap == mCursorBitmap) {
|
| // Case when cursor image has not changed.
|
| @@ -148,7 +151,7 @@ public class Cursor {
|
| }
|
|
|
| mCursorBitmap = cursorBitmap;
|
| - updatePosition(desktop, mCursorBitmap, JniInterface.getCursorHotspot());
|
| + updatePosition(desktop, mCursorBitmap, mClient.getCursorHotspot());
|
|
|
| TextureHelper.linkTexture(mTextureDataHandle, cursorBitmap);
|
|
|
|
|