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 cf0c403adf894236a47d09ef42daa51d06c06ef0..d66ac83c5bfbcd89138e2256b67af6688c2a1c41 100644 |
--- a/content/browser/renderer_host/java/java_bound_object.h |
+++ b/content/browser/renderer_host/java/java_bound_object.h |
@@ -23,9 +23,13 @@ |
// created and destroyed on different threads. |
class JavaBoundObject { |
public: |
- // Takes a Java object and creates a JavaBoundObject around it. Returns an |
- // NPObject with a ref count of one which owns the JavaBoundObject. |
- static NPObject* Create(const base::android::JavaRef<jobject>& object); |
+ // 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. |
+ static NPObject* Create(const base::android::JavaRef<jobject>& object, |
+ bool allow_inherited_methods); |
virtual ~JavaBoundObject(); |
@@ -40,7 +44,8 @@ class JavaBoundObject { |
NPVariant* result); |
private: |
- explicit JavaBoundObject(const base::android::JavaRef<jobject>& object); |
+ explicit JavaBoundObject(const base::android::JavaRef<jobject>& object, |
+ bool allow_inherited_methods); |
void EnsureMethodsAreSetUp() const; |
@@ -53,6 +58,9 @@ class JavaBoundObject { |
// scoped_ptr in STL containers as we can't copy it. |
typedef std::multimap<std::string, linked_ptr<JavaMethod> > JavaMethodMap; |
mutable JavaMethodMap methods_; |
+ mutable bool are_methods_set_up_; |
+ |
+ bool allow_inherited_methods_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(JavaBoundObject); |
}; |