Index: content/public/android/java/src/org/chromium/content/common/JavaScriptInterface.java |
diff --git a/base/android/java/src/org/chromium/base/AccessedByNative.java b/content/public/android/java/src/org/chromium/content/common/JavaScriptInterface.java |
similarity index 53% |
copy from base/android/java/src/org/chromium/base/AccessedByNative.java |
copy to content/public/android/java/src/org/chromium/content/common/JavaScriptInterface.java |
index 8248cc68eedefd598305f27707f438f0e815df55..21be4882aca6b9f1c48361692fc5519668d13882 100644 |
--- a/base/android/java/src/org/chromium/base/AccessedByNative.java |
+++ b/content/public/android/java/src/org/chromium/content/common/JavaScriptInterface.java |
@@ -2,7 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-package org.chromium.base; |
+package org.chromium.content.common; |
+ |
+import org.chromium.content.browser.ContentViewCore; |
joth
2012/08/04 20:38:28
maybe rather than import, just use the fully quali
David Trainor- moved to gerrit
2012/08/06 23:42:33
Done.
|
import java.lang.annotation.ElementType; |
import java.lang.annotation.Retention; |
@@ -10,11 +12,11 @@ import java.lang.annotation.RetentionPolicy; |
import java.lang.annotation.Target; |
/** |
- * @AccessedByNative is used to ensure proguard will keep this field, since it's |
- * only accessed by native. |
+ * Marks a method as being able to be run from JavaScript. |
joth
2012/08/04 20:38:28
nit: Marks a method as being safe to be exposed to
Steve Block
2012/08/06 12:12:30
Same comment about using the word 'safe' - I think
David Trainor- moved to gerrit
2012/08/06 23:42:33
Done.
|
+ * @see {@link ContentViewCore#addJavascriptInterface(Class, String, boolean)} |
*/ |
-@Target(ElementType.FIELD) |
+@SuppressWarnings("javadoc") |
@Retention(RetentionPolicy.RUNTIME) |
-public @interface AccessedByNative { |
- public String value() default ""; |
-} |
+@Target({ElementType.METHOD}) |
+public @interface JavaScriptInterface { |
Steve Block
2012/08/06 12:12:30
Hmm, 'JavaScriptInterface' is the correct camel-ca
David Trainor- moved to gerrit
2012/08/06 23:42:33
Will change thanks!
|
+} |