Chromium Code Reviews| Index: content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h |
| diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h |
| index 3ada0d08cbd4f18fa73b5939b68379a2cf525356..eecde03a4bf0f32bf95877b057eb6713cb10272b 100644 |
| --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h |
| +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h |
| @@ -28,7 +28,8 @@ class JavaBridgeDispatcherHostManager |
| : public WebContentsObserver, |
| public base::SupportsWeakPtr<JavaBridgeDispatcherHostManager> { |
| public: |
| - explicit JavaBridgeDispatcherHostManager(WebContents* web_contents); |
| + JavaBridgeDispatcherHostManager(WebContents* web_contents, |
| + jobject retained_object_set); |
| virtual ~JavaBridgeDispatcherHostManager(); |
| // These methods add or remove the object to each JavaBridgeDispatcherHost. |
| @@ -37,21 +38,12 @@ class JavaBridgeDispatcherHostManager |
| void AddNamedObject(const base::string16& name, NPObject* object); |
| void RemoveNamedObject(const base::string16& name); |
| - void OnGetChannelHandle(RenderFrameHost* render_frame_host, |
| - IPC::Message* reply_msg); |
| - |
| - // Every time a JavaBoundObject backed by a real Java object is |
| - // created/destroyed, we insert/remove a strong ref to that Java object into |
| - // this set so that it doesn't get garbage collected while it's still |
| - // potentially in use. Although the set is managed native side, it's owned |
| - // and defined in Java so that pushing refs into it does not create new GC |
| - // roots that would prevent ContentViewCore from being garbage collected. |
| - void SetRetainedObjectSet(const JavaObjectWeakGlobalRef& retained_object_set); |
| - |
| // WebContentsObserver overrides |
| virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; |
| virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE; |
| virtual void DocumentAvailableInMainFrame() OVERRIDE; |
| + virtual bool OnMessageReceived(const IPC::Message& message, |
| + RenderFrameHost* render_frame_host) OVERRIDE; |
| void JavaBoundObjectCreated(const base::android::JavaRef<jobject>& object); |
| void JavaBoundObjectDestroyed(const base::android::JavaRef<jobject>& object); |
| @@ -62,11 +54,18 @@ class JavaBridgeDispatcherHostManager |
| void SetAllowObjectContentsInspection(bool allow); |
| private: |
| + |
|
jam
2014/05/02 19:41:22
nit: without the blank line was conforming to the
mnaganov (inactive)
2014/05/06 09:06:46
Sorry, restored.
|
| typedef std::map<RenderFrameHost*, scoped_refptr<JavaBridgeDispatcherHost> > |
| InstanceMap; |
| InstanceMap instances_; |
| typedef std::map<base::string16, NPObject*> ObjectMap; |
| ObjectMap objects_; |
| + // Every time a JavaBoundObject backed by a real Java object is |
| + // created/destroyed, we insert/remove a strong ref to that Java object into |
| + // this set so that it doesn't get garbage collected while it's still |
| + // potentially in use. Although the set is managed native side, it's owned |
| + // and defined in Java so that pushing refs into it does not create new GC |
| + // roots that would prevent ContentViewCore from being garbage collected. |
| JavaObjectWeakGlobalRef retained_object_set_; |
| bool allow_object_contents_inspection_; |