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

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

Issue 19500017: Implement basic point-and-touch mouse input for Android client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bump version number to 0.01 Created 7 years, 5 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 int[] frame = new int[sWidth * sHeight]; 199 int[] frame = new int[sWidth * sHeight];
200 200
201 sBuffer.order(ByteOrder.LITTLE_ENDIAN); 201 sBuffer.order(ByteOrder.LITTLE_ENDIAN);
202 sBuffer.asIntBuffer().get(frame, 0, frame.length); 202 sBuffer.asIntBuffer().get(frame, 0, frame.length);
203 203
204 return Bitmap.createBitmap(frame, 0, sWidth, sWidth, sHeight, Bitmap.Con fig.ARGB_8888); 204 return Bitmap.createBitmap(frame, 0, sWidth, sWidth, sHeight, Bitmap.Con fig.ARGB_8888);
205 } 205 }
206 206
207 /** Moves the mouse cursor, possibly while clicking. */
208 public static void mouseAction(int x, int y, int whichButton, boolean button Down) {
209 if (!sConnected) {
210 return;
211 }
212
213 mouseActionNative(x, y, whichButton, buttonDown);
214 }
215
207 /** Performs the native response to the user's PIN. */ 216 /** Performs the native response to the user's PIN. */
208 private static native void authenticationResponse(String pin); 217 private static native void authenticationResponse(String pin);
209 218
210 /** Schedules a redraw on the native graphics thread. */ 219 /** Schedules a redraw on the native graphics thread. */
211 private static native void scheduleRedrawNative(); 220 private static native void scheduleRedrawNative();
221
222 /** Passes mouse information to the native handling code. */
223 private static native void mouseActionNative(int x, int y, int whichButton, boolean buttonDown);
212 } 224 }
OLDNEW
« 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