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

Unified Diff: chrome/browser/android/chrome_staging_jni_onload.cc

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 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 | « chrome/browser/android/chrome_staging_jni_onload.h ('k') | chrome/browser/android/compositor/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/chrome_staging_jni_onload.cc
diff --git a/chrome/browser/android/chrome_staging_jni_onload.cc b/chrome/browser/android/chrome_staging_jni_onload.cc
new file mode 100644
index 0000000000000000000000000000000000000000..439bd5eeec16f63c168a8f96cf03952aaf80ff0d
--- /dev/null
+++ b/chrome/browser/android/chrome_staging_jni_onload.cc
@@ -0,0 +1,42 @@
+// Copyright 2015 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/browser/android/chrome_staging_jni_onload.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/android/library_loader/library_loader_hooks.h"
+#include "base/bind.h"
+#include "chrome/app/android/chrome_jni_onload.h"
+#include "chrome/browser/android/staging_jni_registrar.h"
+
+namespace chrome {
+namespace android {
+
+namespace {
+
+bool RegisterJNI(JNIEnv* env) {
+ if (base::android::GetLibraryProcessType(env) ==
+ base::android::PROCESS_BROWSER) {
+ return RegisterStagingJNI(env);
+ }
+ return true;
+}
+
+bool Init() {
+ return true;
+}
+
+} // namespace
+
+bool OnJNIOnLoadRegisterJNI(JavaVM* vm) {
+ return OnJNIOnLoadRegisterJNI(vm, base::Bind(&RegisterJNI));
+}
+
+bool OnJNIOnLoadInit() {
+ return OnJNIOnLoadInit(base::Bind(&Init));
+}
+
+} // namespace android
+} // namespace chrome
« no previous file with comments | « chrome/browser/android/chrome_staging_jni_onload.h ('k') | chrome/browser/android/compositor/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698