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

Unified Diff: base/android/jni_generator/sample_for_tests.cc

Issue 1212443006: JNI SampleForTests updated with clearer name for caller object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-discovery-
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/android/jni_generator/sample_for_tests.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/sample_for_tests.cc
diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc
index 3c5ca028906c847e1b1793744854c0e48600811a..61dd7f38eb2cf1c70ff83a34bee3ff5f6e67a498 100644
--- a/base/android/jni_generator/sample_for_tests.cc
+++ b/base/android/jni_generator/sample_for_tests.cc
@@ -18,7 +18,7 @@ using base::android::ScopedJavaLocalRef;
namespace base {
namespace android {
-jdouble CPPClass::InnerClass::MethodOtherP0(JNIEnv* env, jobject obj) {
+jdouble CPPClass::InnerClass::MethodOtherP0(JNIEnv* env, jobject caller) {
return 0.0;
}
@@ -33,22 +33,22 @@ bool CPPClass::RegisterJNI(JNIEnv* env) {
return RegisterNativesImpl(env); // Generated in SampleForTests_jni.h
}
-void CPPClass::Destroy(JNIEnv* env, jobject obj) {
+void CPPClass::Destroy(JNIEnv* env, jobject caller) {
delete this;
}
-jint CPPClass::Method(JNIEnv* env, jobject obj) {
+jint CPPClass::Method(JNIEnv* env, jobject caller) {
return 0;
}
-void CPPClass::AddStructB(JNIEnv* env, jobject obj, jobject structb) {
+void CPPClass::AddStructB(JNIEnv* env, jobject caller, jobject structb) {
long key = Java_InnerStructB_getKey(env, structb);
std::string value = ConvertJavaStringToUTF8(
env, Java_InnerStructB_getValue(env, structb).obj());
map_[key] = value;
}
-void CPPClass::IterateAndDoSomethingWithStructB(JNIEnv* env, jobject obj) {
+void CPPClass::IterateAndDoSomethingWithStructB(JNIEnv* env, jobject caller) {
// Iterate over the elements and do something with them.
for (std::map<long, std::string>::const_iterator it = map_.begin();
it != map_.end(); ++it) {
@@ -59,14 +59,14 @@ void CPPClass::IterateAndDoSomethingWithStructB(JNIEnv* env, jobject obj) {
}
base::android::ScopedJavaLocalRef<jstring> CPPClass::ReturnAString(
- JNIEnv* env, jobject obj) {
+ JNIEnv* env, jobject caller) {
base::android::ScopedJavaLocalRef<jstring> ret = ConvertUTF8ToJavaString(
env, "test");
return ret;
}
// Static free functions declared and called directly from java.
-static jlong Init(JNIEnv* env, jobject obj, jstring param) {
+static jlong Init(JNIEnv* env, jobject caller, jstring param) {
return 0;
}
« no previous file with comments | « base/android/jni_generator/sample_for_tests.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698