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

Unified Diff: base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
Index: base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
diff --git a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
index f54944b1ff24d704c47427a36723579589c94813..dad59ce9c3ee97b9aef946eeb666709c2653852a 100644
--- a/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
+++ b/base/android/jni_generator/java/src/org/chromium/example/jni_generator/SampleForTests.java
@@ -125,7 +125,7 @@ class SampleForTests {
// This is triggered by the @CalledByNative annotation; the methods may be named as you wish.
// Exported to C++ as:
- // Java_Example_javaMethod(JNIEnv* env, jobject obj, jint foo, jint bar)
+ // Java_Example_javaMethod(JNIEnv* env, jobject caller, jint foo, jint bar)
// Typically the C++ code would have obtained the jobject via the Init() call described above.
@CalledByNative
public int javaMethod(int foo, int bar) {
@@ -177,7 +177,7 @@ class SampleForTests {
// signatures. Besides these constraints the methods can be freely named.
// This declares a C++ function which the application code must implement:
- // static jint Init(JNIEnv* env, jobject obj);
+ // static jint Init(JNIEnv* env, jobject caller);
// The jobject parameter refers back to this java side object instance.
// The implementation must return the pointer to the C++ object cast to jint.
// The caller of this method should store it, and supply it as a the nativeCPPClass param to
@@ -195,7 +195,7 @@ class SampleForTests {
private native void nativeDestroy(long nativeCPPClass);
// This declares a C++ function which the application code must implement:
- // static jdouble GetDoubleFunction(JNIEnv* env, jobject obj);
+ // static jdouble GetDoubleFunction(JNIEnv* env, jobject caller);
// The jobject parameter refers back to this java side object instance.
private native double nativeGetDoubleFunction();
@@ -209,7 +209,7 @@ class SampleForTests {
private native void nativeSetNonPODDatatype(Rect rect);
// This declares a C++ function which the application code must implement:
- // static ScopedJavaLocalRef<jobject> GetNonPODDatatype(JNIEnv* env, jobject obj);
+ // static ScopedJavaLocalRef<jobject> GetNonPODDatatype(JNIEnv* env, jobject caller);
// The jobject parameter refers back to this java side object instance.
// Note that it returns a ScopedJavaLocalRef<jobject> so that you don' have to worry about
// deleting the JNI local reference. This is similar with Strings and arrays.

Powered by Google App Engine
This is Rietveld 408576698