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

Side by Side Diff: content/shell/android/browsertests_apk/content_browser_tests_android.cc

Issue 147533004: Remove unneeded JNI registrations. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Fix android webview build issues. Created 6 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This class sets up the environment for running the content browser tests 5 // This class sets up the environment for running the content browser tests
6 // inside an android application. 6 // inside an android application.
7 7
8 #include <android/log.h> 8 #include <android/log.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } // namespace content 98 } // namespace content
99 99
100 // This is called by the VM when the shared library is first loaded. 100 // This is called by the VM when the shared library is first loaded.
101 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 101 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
102 102
103 base::android::SetLibraryLoadedHook(&content::LibraryLoaded); 103 base::android::SetLibraryLoadedHook(&content::LibraryLoaded);
104 104
105 base::android::InitVM(vm); 105 base::android::InitVM(vm);
106 JNIEnv* env = base::android::AttachCurrentThread(); 106 JNIEnv* env = base::android::AttachCurrentThread();
107 107
108 if (!base::android::RegisterLibraryLoaderEntryHook(env))
109 return -1;
110
111 if (!content::android::RegisterShellJni(env)) 108 if (!content::android::RegisterShellJni(env))
112 return -1; 109 return -1;
113 110
114 if (!content::NestedMessagePumpAndroid::RegisterJni(env)) 111 if (!content::NestedMessagePumpAndroid::RegisterJni(env))
115 return -1; 112 return -1;
116 113
117 if (!content::RegisterNativesImpl(env))
118 return -1;
119
120 content::SetContentMainDelegate(new content::ShellMainDelegate()); 114 content::SetContentMainDelegate(new content::ShellMainDelegate());
121 return JNI_VERSION_1_4; 115 return JNI_VERSION_1_4;
122 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698