diff options
author | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 18:26:23 +0000 |
---|---|---|
committer | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 18:26:23 +0000 |
commit | 98a7aaf64da79af3623c3ab40f01d622d3eb3a2c (patch) | |
tree | 47154ddbf8642257006932d9e217f88272ec0d73 /content/browser/renderer_host/java/java_bound_object.h | |
parent | acb496198af27f195eb0e32b7e11b3e70c1fde19 (diff) | |
download | chromium_src-98a7aaf64da79af3623c3ab40f01d622d3eb3a2c.zip chromium_src-98a7aaf64da79af3623c3ab40f01d622d3eb3a2c.tar.gz chromium_src-98a7aaf64da79af3623c3ab40f01d622d3eb3a2c.tar.bz2 |
Fix the Java Bridge to support non-array renderer-side objects
This is the first patch in a series to add support for passing renderer-side
objects to the methods of injected objects in the Java Bridge. It adds support
for non-array renderer-side objects.
In order to pass renderer-side objects to Java, we need to proxy them to the
browser. This means that the browser must make synchronous IPC calls to the
renderer.
- Update the JavaBridgeChannel to obtain a route ID for a renderer-side object
by sending a sync IPC to the JavaBridgeChannelHost.
- Allow the JavaBridgeChannelHost to send messages to the JavaBridgeChannel to
support the above and to allow the browser to interrogate renderer-side objects.
- Update JavaBoundObject to handle renderer-side objects. Add a TODO for
arrays.
- Update comment about the shutdown event used with the JavaBridgeChannelHost.
- Update comments about the containing window and page URL used when creating
NPObjectStub and NPObjectProxy objects.
BUG=105547
Review URL: http://codereview.chromium.org/8918008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/java/java_bound_object.h')
-rw-r--r-- | content/browser/renderer_host/java/java_bound_object.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/content/browser/renderer_host/java/java_bound_object.h b/content/browser/renderer_host/java/java_bound_object.h index dffb2f9..61a1dfb 100644 --- a/content/browser/renderer_host/java/java_bound_object.h +++ b/content/browser/renderer_host/java/java_bound_object.h @@ -29,8 +29,9 @@ class JavaBoundObject { virtual ~JavaBoundObject(); - // Gets the underlying JavaObject from a JavaBoundObject wrapped as an - // NPObject. + // Gets a global ref to the underlying JavaObject from a JavaBoundObject + // wrapped as an NPObject. Ownership of the global ref is retained by the + // JavaBoundObject: the caller must NOT release it. static jobject GetJavaObject(NPObject* object); // Methods to implement the NPObject callbacks. |