OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // forward. It also instructs the RenderFrameHost to run the unload event | 53 // forward. It also instructs the RenderFrameHost to run the unload event |
54 // handler and is kept alive for the duration. Once the event handling is | 54 // handler and is kept alive for the duration. Once the event handling is |
55 // complete, the RenderFrameHost is deleted. | 55 // complete, the RenderFrameHost is deleted. |
56 class RenderFrameProxyHost | 56 class RenderFrameProxyHost |
57 : public IPC::Listener, | 57 : public IPC::Listener, |
58 public IPC::Sender { | 58 public IPC::Sender { |
59 public: | 59 public: |
60 static RenderFrameProxyHost* FromID(int process_id, int routing_id); | 60 static RenderFrameProxyHost* FromID(int process_id, int routing_id); |
61 | 61 |
62 RenderFrameProxyHost(SiteInstance* site_instance, | 62 RenderFrameProxyHost(SiteInstance* site_instance, |
| 63 RenderViewHostImpl* render_view_host, |
63 FrameTreeNode* frame_tree_node); | 64 FrameTreeNode* frame_tree_node); |
64 ~RenderFrameProxyHost() override; | 65 ~RenderFrameProxyHost() override; |
65 | 66 |
66 RenderProcessHost* GetProcess() { | 67 RenderProcessHost* GetProcess() { |
67 return process_; | 68 return process_; |
68 } | 69 } |
69 | 70 |
70 // Initializes the object and creates the RenderFrameProxy in the process | 71 // Initializes the object and creates the RenderFrameProxy in the process |
71 // for the SiteInstance. | 72 // for the SiteInstance. |
72 bool InitRenderFrameProxy(); | 73 bool InitRenderFrameProxy(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // When a RenderFrameHost is in a different process from its parent in the | 143 // When a RenderFrameHost is in a different process from its parent in the |
143 // frame tree, this class connects its associated RenderWidgetHostView | 144 // frame tree, this class connects its associated RenderWidgetHostView |
144 // to this RenderFrameProxyHost, which corresponds to the same frame in the | 145 // to this RenderFrameProxyHost, which corresponds to the same frame in the |
145 // parent's renderer process. | 146 // parent's renderer process. |
146 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; | 147 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; |
147 | 148 |
148 // TODO(nasko): This can be removed once we don't have a swapped out state on | 149 // TODO(nasko): This can be removed once we don't have a swapped out state on |
149 // RenderFrameHosts. See https://crbug.com/357747. | 150 // RenderFrameHosts. See https://crbug.com/357747. |
150 scoped_ptr<RenderFrameHostImpl> render_frame_host_; | 151 scoped_ptr<RenderFrameHostImpl> render_frame_host_; |
151 | 152 |
| 153 // The RenderViewHost that this RenderFrameProxyHost is associated with. It is |
| 154 // kept alive as long as any RenderFrameHosts or RenderFrameProxyHosts |
| 155 // are associated with it. |
| 156 RenderViewHostImpl* render_view_host_; |
| 157 |
152 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | 158 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
153 }; | 159 }; |
154 | 160 |
155 } // namespace | 161 } // namespace |
156 | 162 |
157 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 163 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
OLD | NEW |