summaryrefslogtreecommitdiffstats
path: root/content/shell/android/shell_library_loader.cc
diff options
context:
space:
mode:
authornileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 21:55:55 +0000
committernileshagrawal@chromium.org <nileshagrawal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 21:55:55 +0000
commit4d4eb5babc558ccddc09168f66970905ed0204d4 (patch)
treefe23183a39cec251e5fd1d9da4047f2fec020510 /content/shell/android/shell_library_loader.cc
parent3ac99b95a6ee9dfaea1d746f795975cc97c7ca45 (diff)
downloadchromium_src-4d4eb5babc558ccddc09168f66970905ed0204d4.zip
chromium_src-4d4eb5babc558ccddc09168f66970905ed0204d4.tar.gz
chromium_src-4d4eb5babc558ccddc09168f66970905ed0204d4.tar.bz2
Relanding "Add apk for running content_browsertests"
Revert "Revert 179189" This reverts commit 5844ab0c6a41cc9d306f8c355cc7ceb5e290cbb1. Original CL:https://codereview.chromium.org/12047068/ was reverted as we failed to update the bot scripts with the new package name for content_shell_apk TBR=mark@chromium.org,jam@chromium.org BUG=138275 Review URL: https://chromiumcodereview.appspot.com/12091033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/android/shell_library_loader.cc')
-rw-r--r--content/shell/android/shell_library_loader.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/content/shell/android/shell_library_loader.cc b/content/shell/android/shell_library_loader.cc
index 88262c9..f320387f 100644
--- a/content/shell/android/shell_library_loader.cc
+++ b/content/shell/android/shell_library_loader.cc
@@ -10,31 +10,23 @@
#include "content/public/app/android_library_loader_hooks.h"
#include "content/public/app/content_main.h"
#include "content/public/browser/android/compositor.h"
-#include "content/shell/android/shell_manager.h"
-#include "content/shell/shell.h"
+#include "content/shell/android/shell_jni_registrar.h"
#include "content/shell/shell_main_delegate.h"
-static base::android::RegistrationMethod kRegistrationMethods[] = {
- { "Shell", content::Shell::Register },
- { "ShellManager", content::RegisterShellManager },
-};
-
// This is called by the VM when the shared library is first loaded.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
base::android::InitVM(vm);
JNIEnv* env = base::android::AttachCurrentThread();
+
if (!content::RegisterLibraryLoaderEntryHook(env))
return -1;
// To be called only from the UI thread. If loading the library is done on
// a separate thread, this should be moved elsewhere.
- if (!base::android::RegisterNativeMethods(env, kRegistrationMethods,
- arraysize(kRegistrationMethods)))
+ if (!content::android::RegisterShellJni(env))
return -1;
content::Compositor::Initialize();
-
content::SetContentMainDelegate(new content::ShellMainDelegate());
-
return JNI_VERSION_1_4;
}