summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/java/jni_helper.h
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 17:00:54 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 17:00:54 +0000
commit8e7415e446a2379aecead2903cbc96a34e02fe98 (patch)
tree95523928701276fdc2acfe4c0611daa4170bd3f1 /content/browser/renderer_host/java/jni_helper.h
parentd29242852b7ed8e2009fd1641a53ef213c48065b (diff)
downloadchromium_src-8e7415e446a2379aecead2903cbc96a34e02fe98.zip
chromium_src-8e7415e446a2379aecead2903cbc96a34e02fe98.tar.gz
chromium_src-8e7415e446a2379aecead2903cbc96a34e02fe98.tar.bz2
Android: cleanup jni_android to minimize external dependencies.
Other projects will be using the JNI bindings. - Move GetMethodIDFromClassName down to content/browser/renderer_host/java, the only place where it's used. - Remove a few methods that are no longer in use. - Trim down dependencies. BUG= Review URL: https://codereview.chromium.org/23835020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/java/jni_helper.h')
-rw-r--r--content/browser/renderer_host/java/jni_helper.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/content/browser/renderer_host/java/jni_helper.h b/content/browser/renderer_host/java/jni_helper.h
new file mode 100644
index 0000000..aaba53b
--- /dev/null
+++ b/content/browser/renderer_host/java/jni_helper.h
@@ -0,0 +1,27 @@
+// Copyright 2013 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.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_JAVA_JNI_HELPER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_JAVA_JNI_HELPER_H_
+
+#include <jni.h>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+// Gets the method ID from the class name. Clears the pending Java exception
+// and returns NULL if the method is not found. Caches results.
+// Strings passed to this function are held in the cache and MUST remain valid
+// beyond the duration of all future calls to this function, across all
+// threads. In practice, this means that the function should only be used with
+// string constants.
+CONTENT_EXPORT jmethodID GetMethodIDFromClassName(JNIEnv* env,
+ const char* class_name,
+ const char* method,
+ const char* jni_signature);
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JNI_HELPER_H_