Index: content/browser/renderer_host/java/java_bound_object.h |
diff --git a/content/browser/renderer_host/java/java_bound_object.h b/content/browser/renderer_host/java/java_bound_object.h |
index d66ac83c5bfbcd89138e2256b67af6688c2a1c41..2969110fc3cd6f671909168d4cff05a2aef3998f 100644 |
--- a/content/browser/renderer_host/java/java_bound_object.h |
+++ b/content/browser/renderer_host/java/java_bound_object.h |
@@ -23,13 +23,14 @@ |
// created and destroyed on different threads. |
class JavaBoundObject { |
public: |
- // Takes a Java object and creates a JavaBoundObject around it. Also takes |
- // a boolean that determines whether or not inherited methods are allowed |
- // to be called as well. This property propagates to all Objects that get |
- // implicitly exposed as return values as well. Returns an NPObject with |
- // a ref count of one which owns the JavaBoundObject. |
+ // Takes a Java object and creates a JavaBoundObject around it. The |
+ // |require_annotation| flag specifies whether or not only methods with the |
+ // JavascriptInterface annotation are exposed to JavaScript. This property |
+ // propagates to all Objects that get implicitly exposed as return values as |
+ // well. Returns an NPObject with a ref count of one which owns the |
+ // JavaBoundObject. |
static NPObject* Create(const base::android::JavaRef<jobject>& object, |
- bool allow_inherited_methods); |
+ bool require_annotation); |
virtual ~JavaBoundObject(); |
@@ -45,7 +46,7 @@ class JavaBoundObject { |
private: |
explicit JavaBoundObject(const base::android::JavaRef<jobject>& object, |
- bool allow_inherited_methods); |
+ bool require_annotation); |
void EnsureMethodsAreSetUp() const; |
@@ -60,9 +61,11 @@ class JavaBoundObject { |
mutable JavaMethodMap methods_; |
mutable bool are_methods_set_up_; |
- bool allow_inherited_methods_; |
+ const bool require_annotation_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(JavaBoundObject); |
}; |
+bool RegisterJavaBoundObject(JNIEnv* env); |
Yaron
2012/08/07 18:12:35
Nit: make this a static member function of above c
|
+ |
#endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_BOUND_OBJECT_H_ |