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

Side by Side Diff: apk/simple_jni.cc

Issue 949803002: Deconstructed APK prototyping Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
1 #include "simple.h"
2 #include "simple/jni/MainActivity_jni.h"
3 #include "base/android/jni_android.h"
4 #include "base/android/base_jni_registrar.h"
5 #include "base/android/base_jni_onload.h"
6 #include "base/android/jni_onload_delegate.h"
7 #include "base/memory/scoped_ptr.h"
8
9 #include <vector>
10
11
12 static jint GetValue(JNIEnv* env, jclass jcaller) {
13 return simple::foo();
14 }
15
16 // This is called by the VM when the shared library is first loaded.
17 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
18 scoped_ptr<std::vector<base::android::JNIOnLoadDelegate*>> delegates(
19 new std::vector<base::android::JNIOnLoadDelegate*>());
20 if (!base::android::OnJNIOnLoad(vm, delegates.get()))
21 return -1;
22 JNIEnv* env = base::android::AttachCurrentThread();
23 base::android::RegisterJni(env);
24 RegisterNativesImpl(env);
25 return JNI_VERSION_1_4;
26 }
OLDNEW
« no previous file with comments | « apk/simple.cc ('k') | base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698