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

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

Issue 10803055: Android Allows nested namespace in @JNINamespace annotation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/jni_generator.py ('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 0c06776efd1b629b4e41c1004f5553def6170b3f..e3da0e0dbc17b4bcbb3a2a6fc4d7dd67750e411a 100644
--- a/base/android/jni_generator/sample_for_tests.cc
+++ b/base/android/jni_generator/sample_for_tests.cc
@@ -11,7 +11,8 @@
using base::android::AttachCurrentThread;
using base::android::ScopedJavaLocalRef;
-namespace content {
+namespace base {
+namespace android {
class CPPClass {
public:
@@ -35,7 +36,8 @@ class CPPClass {
}
};
-} // namespace content
+} // namespace android
+} // namespace base
#include "jni/SampleForTests_jni.h"
@@ -45,12 +47,13 @@ int main() {
JNIEnv* env = /* AttachCurrentThread() */ NULL;
// This is how you call a java static method from C++.
- bool foo = content::Java_SampleForTests_staticJavaMethod(env);
+ bool foo = base::android::Java_SampleForTests_staticJavaMethod(env);
// This is how you call a java method from C++. Note that you must have
// obtained the jobject somehow.
jobject my_java_object = NULL;
- int bar = content::Java_SampleForTests_javaMethod(env, my_java_object, 1, 2);
+ int bar = base::android::Java_SampleForTests_javaMethod(
+ env, my_java_object, 1, 2);
return 0;
}
« no previous file with comments | « base/android/jni_generator/jni_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698