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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
878 // just committed. | 878 // just committed. |
879 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( | 879 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( |
880 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 880 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
881 | 881 |
882 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 882 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
883 // refcount that calls Shutdown when it reaches zero. This allows each | 883 // refcount that calls Shutdown when it reaches zero. This allows each |
884 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 884 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
885 // we have a RenderViewHost for each RenderFrameHost. | 885 // we have a RenderViewHost for each RenderFrameHost. |
886 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 886 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
887 // some form of page context. | 887 // some form of page context. |
888 RenderViewHostImpl* render_view_host_; | 888 RenderViewHostImpl* const render_view_host_; |
889 | 889 |
890 RenderFrameHostDelegate* delegate_; | 890 RenderFrameHostDelegate* const delegate_; |
891 | 891 |
892 // The SiteInstance associated with this RenderFrameHost. All content drawn | 892 // The SiteInstance associated with this RenderFrameHost. All content drawn |
893 // in this RenderFrameHost is part of this SiteInstance. Cannot change over | 893 // in this RenderFrameHost is part of this SiteInstance. Cannot change over |
894 // time. | 894 // time. |
895 scoped_refptr<SiteInstanceImpl> site_instance_; | 895 const scoped_refptr<SiteInstanceImpl> site_instance_; |
896 | 896 |
897 // The renderer process this RenderFrameHost is associated with. It is | 897 // The renderer process this RenderFrameHost is associated with. It is |
898 // equivalent to the result of site_instance_->GetProcess(), but that | 898 // 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. | 899 // method has the side effect of creating the process if it doesn't exist. |
900 // Cache a pointer to avoid unnecessary process creation. | 900 // Cache a pointer to avoid unnecessary process creation. |
clamy
2017/03/06 14:38:44
@nasko: the comment here seems weird. It says that
nasko
2017/03/06 19:46:15
I think the goal here is not to avoid it during in
clamy
2017/03/09 13:44:34
I see. We should probably update the comment then.
| |
901 RenderProcessHost* process_; | 901 RenderProcessHost* const process_; |
902 | 902 |
903 // Reference to the whole frame tree that this RenderFrameHost belongs to. | 903 // Reference to the whole frame tree that this RenderFrameHost belongs to. |
904 // Allows this RenderFrameHost to add and remove nodes in response to | 904 // Allows this RenderFrameHost to add and remove nodes in response to |
905 // messages from the renderer requesting DOM manipulation. | 905 // messages from the renderer requesting DOM manipulation. |
906 FrameTree* frame_tree_; | 906 FrameTree* const frame_tree_; |
907 | 907 |
908 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. | 908 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. |
909 FrameTreeNode* frame_tree_node_; | 909 FrameTreeNode* const frame_tree_node_; |
910 | 910 |
911 // The active parent RenderFrameHost for this frame, if it is a subframe. | 911 // The active parent RenderFrameHost for this frame, if it is a subframe. |
912 // Null for the main frame. This is cached because the parent FrameTreeNode | 912 // Null for the main frame. This is cached because the parent FrameTreeNode |
913 // may change its current RenderFrameHost while this child is pending | 913 // may change its current RenderFrameHost while this child is pending |
914 // deletion, and GetParent() should never return a different value. | 914 // deletion, and GetParent() should never return a different value. |
915 RenderFrameHostImpl* parent_; | 915 RenderFrameHostImpl* parent_; |
916 | 916 |
917 // Track this frame's last committed URL. | 917 // Track this frame's last committed URL. |
918 GURL last_committed_url_; | 918 GURL last_committed_url_; |
919 | 919 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1129 | 1129 |
1130 // NOTE: This must be the last member. | 1130 // NOTE: This must be the last member. |
1131 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1131 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1132 | 1132 |
1133 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1133 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1134 }; | 1134 }; |
1135 | 1135 |
1136 } // namespace content | 1136 } // namespace content |
1137 | 1137 |
1138 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1138 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |