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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 10830173: JavaBridge should use Annotation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment based on nit. Created 8 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
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index f1c48e9e025930a3b84b746dcd86c47eb46d37e6..ebdadbf503f2e5d654450c444144406e93a385fd 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1030,13 +1030,12 @@ public class ContentViewCore implements MotionEventDelegate {
* @param object The Java object to inject into the ContentViewCore's
* JavaScript context. Null values are ignored.
* @param name The name used to expose the instance in JavaScript.
- * @param allowInheritedMethods Whether or not inherited methods may be
- * called from JavaScript.
+ * @param requireAnnotation Restrict exposed methods to ones with the
+ * {@link JavascriptInterface} annotation.
*/
- public void addJavascriptInterface(Object object, String name, boolean allowInheritedMethods) {
+ public void addJavascriptInterface(Object object, String name, boolean requireAnnotation) {
if (mNativeContentViewCore != 0 && object != null) {
- nativeAddJavascriptInterface(mNativeContentViewCore, object, name,
- allowInheritedMethods);
+ nativeAddJavascriptInterface(mNativeContentViewCore, object, name, requireAnnotation);
}
}
@@ -1200,7 +1199,7 @@ public class ContentViewCore implements MotionEventDelegate {
private native int nativeEvaluateJavaScript(String script);
private native void nativeAddJavascriptInterface(int nativeContentViewCoreImpl, Object object,
- String name, boolean allowInheritedMethods);
+ String name, boolean requireAnnotation);
private native void nativeRemoveJavascriptInterface(int nativeContentViewCoreImpl, String name);
}

Powered by Google App Engine
This is Rietveld 408576698