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, | |
64 FrameTreeNode* frame_tree_node); | 63 FrameTreeNode* frame_tree_node); |
65 ~RenderFrameProxyHost() override; | 64 ~RenderFrameProxyHost() override; |
66 | 65 |
67 RenderProcessHost* GetProcess() { | 66 RenderProcessHost* GetProcess() { |
68 return process_; | 67 return process_; |
69 } | 68 } |
70 | 69 |
71 // Initializes the object and creates the RenderFrameProxy in the process | 70 // Initializes the object and creates the RenderFrameProxy in the process |
72 // for the SiteInstance. | 71 // for the SiteInstance. |
73 bool InitRenderFrameProxy(); | 72 bool InitRenderFrameProxy(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // When a RenderFrameHost is in a different process from its parent in the | 142 // When a RenderFrameHost is in a different process from its parent in the |
144 // frame tree, this class connects its associated RenderWidgetHostView | 143 // frame tree, this class connects its associated RenderWidgetHostView |
145 // to this RenderFrameProxyHost, which corresponds to the same frame in the | 144 // to this RenderFrameProxyHost, which corresponds to the same frame in the |
146 // parent's renderer process. | 145 // parent's renderer process. |
147 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; | 146 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; |
148 | 147 |
149 // TODO(nasko): This can be removed once we don't have a swapped out state on | 148 // TODO(nasko): This can be removed once we don't have a swapped out state on |
150 // RenderFrameHosts. See https://crbug.com/357747. | 149 // RenderFrameHosts. See https://crbug.com/357747. |
151 scoped_ptr<RenderFrameHostImpl> render_frame_host_; | 150 scoped_ptr<RenderFrameHostImpl> render_frame_host_; |
152 | 151 |
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 | |
158 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | 152 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
159 }; | 153 }; |
160 | 154 |
161 } // namespace | 155 } // namespace |
162 | 156 |
163 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 157 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
OLD | NEW |