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

Unified Diff: base/android/java/src/org/chromium/base/JNIUtils.java

Issue 472553002: Make class lookup lazy in jni_generator when using lazy method lookup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « base/android/base_jni_registrar.cc ('k') | base/android/jni_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/JNIUtils.java
diff --git a/base/android/java/src/org/chromium/base/JNIUtils.java b/base/android/java/src/org/chromium/base/JNIUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f6cd54fb85ffb8f9a2e617b514f863d2161421c
--- /dev/null
+++ b/base/android/java/src/org/chromium/base/JNIUtils.java
@@ -0,0 +1,20 @@
+// Copyright 2014 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.
+
+package org.chromium.base;
+
+/**
+ * This class provides JNI-related methods to the native library.
+ */
+public class JNIUtils {
+ /**
+ * This returns a ClassLoader that is capable of loading Chromium Java code. Such a ClassLoader
+ * is needed for the few cases where the JNI mechanism is unable to automatically determine the
+ * appropriate ClassLoader instance.
+ */
+ @CalledByNative
+ public static Object getClassLoader() {
+ return JNIUtils.class.getClassLoader();
+ }
+}
« no previous file with comments | « base/android/base_jni_registrar.cc ('k') | base/android/jni_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698