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

Unified Diff: content/shell/android/shell_library_loader.cc

Issue 10444121: Added android_browser_process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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 | « content/public/app/content_main.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_library_loader.cc
diff --git a/content/shell/android/shell_library_loader.cc b/content/shell/android/shell_library_loader.cc
index 39a84ceb434891e84fba90dfe1038212f8e1bc92..e5200733d99bbf70360dfa7eac9ebc7a78c17227 100644
--- a/content/shell/android/shell_library_loader.cc
+++ b/content/shell/android/shell_library_loader.cc
@@ -8,34 +8,18 @@
#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
#include "content/public/app/android_library_loader_hooks.h"
-#include "content/public/app/content_main_runner.h"
-#include "content/shell/shell_main_delegate.h"
+#include "content/public/app/content_main.h"
#include "content/shell/android/shell_manager.h"
#include "content/shell/android/shell_view.h"
+#include "content/shell/shell_main_delegate.h"
static base::android::RegistrationMethod kRegistrationMethods[] = {
{ "ShellManager", content::RegisterShellManager },
{ "ShellView", content::ShellView::Register },
};
-namespace {
- content::ContentMainRunner* g_content_main_runner = NULL;
-}
-
// This is called by the VM when the shared library is first loaded.
JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
-
- // Don't call anything in base without initializing it.
- // ContentMainRunner will do what we need.
- g_content_main_runner = content::ContentMainRunner::Create();
-
- // TODO(tedchoc): Set this to the main delegate once the Android specific
- // browser process initialization gets checked in.
- ShellMainDelegate* delegate = new ShellMainDelegate();
-
- // TODO(jrg): find command line info from java; pass down in here.
- g_content_main_runner->Initialize(0, NULL, delegate);
-
base::android::InitVM(vm);
JNIEnv* env = base::android::AttachCurrentThread();
if (!content::RegisterLibraryLoaderEntryHook(env)) {
@@ -48,12 +32,7 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
arraysize(kRegistrationMethods)))
return -1;
- return JNI_VERSION_1_4;
-}
-
+ content::SetContentMainDelegate(new ShellMainDelegate());
-JNI_EXPORT void JNI_OnUnload(JavaVM* vm, void* reserved) {
- delete g_content_main_runner;
- g_content_main_runner = NULL;
+ return JNI_VERSION_1_4;
}
-
« no previous file with comments | « content/public/app/content_main.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698