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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 bool OnMessageReceived(const IPC::Message& msg) override; | 99 bool OnMessageReceived(const IPC::Message& msg) override; |
100 | 100 |
101 CrossProcessFrameConnector* cross_process_frame_connector() { | 101 CrossProcessFrameConnector* cross_process_frame_connector() { |
102 return cross_process_frame_connector_.get(); | 102 return cross_process_frame_connector_.get(); |
103 } | 103 } |
104 | 104 |
105 // Set the frame's opener to null in the renderer process in response to an | 105 // Set the frame's opener to null in the renderer process in response to an |
106 // action in another renderer process. | 106 // action in another renderer process. |
107 void DisownOpener(); | 107 void DisownOpener(); |
108 | 108 |
| 109 void set_render_frame_proxy_created(bool created) { |
| 110 render_frame_proxy_created_ = created; |
| 111 } |
| 112 |
| 113 // Returns if the renderer/ side counterpart for this proxy is alive. |
| 114 bool IsRenderFrameProxyLive(); |
| 115 |
109 private: | 116 private: |
110 // IPC Message handlers. | 117 // IPC Message handlers. |
111 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); | 118 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); |
112 | 119 |
113 // This RenderFrameProxyHost's routing id. | 120 // This RenderFrameProxyHost's routing id. |
114 int routing_id_; | 121 int routing_id_; |
115 | 122 |
116 // The SiteInstance this proxy is associated with. | 123 // The SiteInstance this proxy is associated with. |
117 scoped_refptr<SiteInstance> site_instance_; | 124 scoped_refptr<SiteInstance> site_instance_; |
118 | 125 |
119 // The node in the frame tree where this proxy is located. | 126 // The node in the frame tree where this proxy is located. |
120 FrameTreeNode* frame_tree_node_; | 127 FrameTreeNode* frame_tree_node_; |
121 | 128 |
| 129 // True if we have a live RenderFrameProxy for this host. |
| 130 bool render_frame_proxy_created_; |
| 131 |
122 // When a RenderFrameHost is in a different process from its parent in the | 132 // When a RenderFrameHost is in a different process from its parent in the |
123 // frame tree, this class connects its associated RenderWidgetHostView | 133 // frame tree, this class connects its associated RenderWidgetHostView |
124 // to this RenderFrameProxyHost, which corresponds to the same frame in the | 134 // to this RenderFrameProxyHost, which corresponds to the same frame in the |
125 // parent's renderer process. | 135 // parent's renderer process. |
126 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; | 136 scoped_ptr<CrossProcessFrameConnector> cross_process_frame_connector_; |
127 | 137 |
128 // TODO(nasko): This can be removed once we don't have a swapped out state on | 138 // TODO(nasko): This can be removed once we don't have a swapped out state on |
129 // RenderFrameHosts. See https://crbug.com/357747. | 139 // RenderFrameHosts. See https://crbug.com/357747. |
130 scoped_ptr<RenderFrameHostImpl> render_frame_host_; | 140 scoped_ptr<RenderFrameHostImpl> render_frame_host_; |
131 | 141 |
132 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | 142 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
133 }; | 143 }; |
134 | 144 |
135 } // namespace | 145 } // namespace |
136 | 146 |
137 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 147 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
OLD | NEW |