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

Unified Diff: chrome/app/android/chrome_android_initializer.cc

Issue 10918113: Add initial Chromium TestShell support for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up some of the code. Created 8 years, 3 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
Index: chrome/app/android/chrome_android_initializer.cc
diff --git a/chrome/app/android/chrome_android_initializer.cc b/chrome/app/android/chrome_android_initializer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..76828ecafc1c3f3a52b4d081788467bae3a058fb
--- /dev/null
+++ b/chrome/app/android/chrome_android_initializer.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/app/android/chrome_android_initializer.h"
+
+#include "base/android/jni_android.h"
+#include "base/logging.h"
+#include "chrome/app/android/chrome_main_delegate_android.h"
+#include "content/public/app/android_library_loader_hooks.h"
+#include "content/public/app/content_main.h"
+
+jint RunChrome(JavaVM* vm, ChromeMainDelegateAndroid* main_delegate) {
+ base::android::InitVM(vm);
+ JNIEnv* env = base::android::AttachCurrentThread();
+ if (!content::RegisterLibraryLoaderEntryHook(env)) {
+ return -1;
+ }
+
+ DCHECK(main_delegate);
+ content::SetContentMainDelegate(main_delegate);
+
+ return JNI_VERSION_1_4;
+}

Powered by Google App Engine
This is Rietveld 408576698