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

Unified Diff: mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java

Issue 131833002: Android: moves mojo to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
« no previous file with comments | « mojo/mojo.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java
diff --git a/mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java b/mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java
index d85d5dda173db3f28e4f2a8c3e031e1aeb681056..73e7c1fc91d6d6b1fe50f816aa3b51eb6a486d11 100644
--- a/mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java
+++ b/mojo/services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java
@@ -6,7 +6,6 @@ package org.chromium.mojo;
import android.app.Activity;
import android.content.Context;
-import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.SurfaceHolder;
@@ -15,10 +14,13 @@ import android.view.SurfaceView;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
+/**
+ * Exposes SurfaceView to native code.
+ */
@JNINamespace("mojo::services")
public class NativeViewportAndroid extends SurfaceView {
- private int mNativeMojoViewport;
+ private long mNativeMojoViewport;
private final SurfaceHolder.Callback mSurfaceCallback;
@SuppressWarnings("unused")
@@ -27,7 +29,7 @@ public class NativeViewportAndroid extends SurfaceView {
activity.setContentView(new NativeViewportAndroid(activity, nativeViewport));
}
- public NativeViewportAndroid(Context context, int nativeViewport) {
+ public NativeViewportAndroid(Context context, long nativeViewport) {
super(context);
mNativeMojoViewport = nativeViewport;
@@ -72,16 +74,16 @@ public class NativeViewportAndroid extends SurfaceView {
event.getEventTime());
}
- private static native void nativeDestroy(int nativeNativeViewportAndroid);
+ private static native void nativeDestroy(long nativeNativeViewportAndroid);
private static native void nativeSurfaceCreated(
- int nativeNativeViewportAndroid, Surface surface);
+ long nativeNativeViewportAndroid, Surface surface);
private static native void nativeSurfaceDestroyed(
- int nativeNativeViewportAndroid);
+ long nativeNativeViewportAndroid);
private static native void nativeSurfaceSetSize(
- int nativeNativeViewportAndroid,
+ long nativeNativeViewportAndroid,
int width, int height);
private static native boolean nativeTouchEvent(
- int nativeNativeViewportAndroid,
+ long nativeNativeViewportAndroid,
int pointerId,
int action,
float x, float y,
« no previous file with comments | « mojo/mojo.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698