OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 // return a nullptr, whereas GetView() potentially will (for instance, | 304 // return a nullptr, whereas GetView() potentially will (for instance, |
305 // after a renderer crash). | 305 // after a renderer crash). |
306 // | 306 // |
307 // This method crashes if this RenderFrameHostImpl does not own a | 307 // This method crashes if this RenderFrameHostImpl does not own a |
308 // a RenderWidgetHost and nor does any of its ancestors. That would | 308 // a RenderWidgetHost and nor does any of its ancestors. That would |
309 // typically mean that the frame has been detached from the frame tree. | 309 // typically mean that the frame has been detached from the frame tree. |
310 RenderWidgetHostImpl* GetRenderWidgetHost(); | 310 RenderWidgetHostImpl* GetRenderWidgetHost(); |
311 | 311 |
312 GlobalFrameRoutingId GetGlobalFrameRoutingId(); | 312 GlobalFrameRoutingId GetGlobalFrameRoutingId(); |
313 | 313 |
314 void set_render_frame_proxy_host(RenderFrameProxyHost* proxy) { | |
315 render_frame_proxy_host_ = proxy; | |
316 } | |
317 | |
318 // The unique ID of the latest NavigationEntry that this RenderFrameHost is | 314 // The unique ID of the latest NavigationEntry that this RenderFrameHost is |
319 // showing. This may change even when this frame hasn't committed a page, | 315 // showing. This may change even when this frame hasn't committed a page, |
320 // such as for a new subframe navigation in a different frame. | 316 // such as for a new subframe navigation in a different frame. |
321 int nav_entry_id() const { return nav_entry_id_; } | 317 int nav_entry_id() const { return nav_entry_id_; } |
322 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } | 318 void set_nav_entry_id(int nav_entry_id) { nav_entry_id_ = nav_entry_id; } |
323 | 319 |
324 // A NavigationHandle for the pending navigation in this frame, if any. This | 320 // A NavigationHandle for the pending navigation in this frame, if any. This |
325 // is cleared when the navigation commits. | 321 // is cleared when the navigation commits. |
326 NavigationHandleImpl* navigation_handle() const { | 322 NavigationHandleImpl* navigation_handle() const { |
327 return navigation_handle_.get(); | 323 return navigation_handle_.get(); |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 // in this RenderFrameHost is part of this SiteInstance. Cannot change over | 889 // in this RenderFrameHost is part of this SiteInstance. Cannot change over |
894 // time. | 890 // time. |
895 scoped_refptr<SiteInstanceImpl> site_instance_; | 891 scoped_refptr<SiteInstanceImpl> site_instance_; |
896 | 892 |
897 // The renderer process this RenderFrameHost is associated with. It is | 893 // The renderer process this RenderFrameHost is associated with. It is |
898 // equivalent to the result of site_instance_->GetProcess(), but that | 894 // equivalent to the result of site_instance_->GetProcess(), but that |
899 // method has the side effect of creating the process if it doesn't exist. | 895 // method has the side effect of creating the process if it doesn't exist. |
900 // Cache a pointer to avoid unnecessary process creation. | 896 // Cache a pointer to avoid unnecessary process creation. |
901 RenderProcessHost* process_; | 897 RenderProcessHost* process_; |
902 | 898 |
903 // The proxy created for this RenderFrameHost. It is used to send and receive | |
904 // IPC messages while in swapped out state. | |
905 // TODO(nasko): This can be removed once we don't have a swapped out state on | |
906 // RenderFrameHosts. See https://crbug.com/357747. | |
907 RenderFrameProxyHost* render_frame_proxy_host_; | |
908 | |
909 // Reference to the whole frame tree that this RenderFrameHost belongs to. | 899 // Reference to the whole frame tree that this RenderFrameHost belongs to. |
910 // Allows this RenderFrameHost to add and remove nodes in response to | 900 // Allows this RenderFrameHost to add and remove nodes in response to |
911 // messages from the renderer requesting DOM manipulation. | 901 // messages from the renderer requesting DOM manipulation. |
912 FrameTree* frame_tree_; | 902 FrameTree* frame_tree_; |
913 | 903 |
914 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. | 904 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. |
915 FrameTreeNode* frame_tree_node_; | 905 FrameTreeNode* frame_tree_node_; |
916 | 906 |
917 // The active parent RenderFrameHost for this frame, if it is a subframe. | 907 // The active parent RenderFrameHost for this frame, if it is a subframe. |
918 // Null for the main frame. This is cached because the parent FrameTreeNode | 908 // Null for the main frame. This is cached because the parent FrameTreeNode |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 | 1125 |
1136 // NOTE: This must be the last member. | 1126 // NOTE: This must be the last member. |
1137 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1127 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1138 | 1128 |
1139 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1129 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1140 }; | 1130 }; |
1141 | 1131 |
1142 } // namespace content | 1132 } // namespace content |
1143 | 1133 |
1144 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1134 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |