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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 const base::string16& user_input); | 949 const base::string16& user_input); |
950 | 950 |
951 // Returns ownership of the NavigationHandle associated with a navigation that | 951 // Returns ownership of the NavigationHandle associated with a navigation that |
952 // just committed. | 952 // just committed. |
953 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( | 953 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( |
954 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 954 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
955 | 955 |
956 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. | 956 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. |
957 void BeforeUnloadTimeout(); | 957 void BeforeUnloadTimeout(); |
958 | 958 |
| 959 // Called when a navigation commits succesfully to |url|. This will update |
| 960 // |last_committed_site_url_| if it's not equal to the site url corresponding |
| 961 // to |url|. |
| 962 void SetLastCommittedSiteUrl(const GURL& url); |
| 963 |
959 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 964 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
960 // refcount that calls Shutdown when it reaches zero. This allows each | 965 // refcount that calls Shutdown when it reaches zero. This allows each |
961 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 966 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
962 // we have a RenderViewHost for each RenderFrameHost. | 967 // we have a RenderViewHost for each RenderFrameHost. |
963 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 968 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
964 // some form of page context. | 969 // some form of page context. |
965 RenderViewHostImpl* const render_view_host_; | 970 RenderViewHostImpl* const render_view_host_; |
966 | 971 |
967 RenderFrameHostDelegate* const delegate_; | 972 RenderFrameHostDelegate* const delegate_; |
968 | 973 |
(...skipping 23 matching lines...) Expand all Loading... |
992 // may change its current RenderFrameHost while this child is pending | 997 // may change its current RenderFrameHost while this child is pending |
993 // deletion, and GetParent() should never return a different value. | 998 // deletion, and GetParent() should never return a different value. |
994 RenderFrameHostImpl* parent_; | 999 RenderFrameHostImpl* parent_; |
995 | 1000 |
996 // Track this frame's last committed URL. | 1001 // Track this frame's last committed URL. |
997 GURL last_committed_url_; | 1002 GURL last_committed_url_; |
998 | 1003 |
999 // Track this frame's last committed origin. | 1004 // Track this frame's last committed origin. |
1000 url::Origin last_committed_origin_; | 1005 url::Origin last_committed_origin_; |
1001 | 1006 |
| 1007 // Track the site URL of the last site we committed successfully, as obtained |
| 1008 // from SiteInstance::GetSiteURL. |
| 1009 GURL last_committed_site_url_; |
| 1010 |
1002 // The most recent non-error URL to commit in this frame. Remove this in | 1011 // The most recent non-error URL to commit in this frame. Remove this in |
1003 // favor of GetLastCommittedURL() once PlzNavigate is enabled or cross-process | 1012 // favor of GetLastCommittedURL() once PlzNavigate is enabled or cross-process |
1004 // transfers work for net errors. See https://crbug.com/588314. | 1013 // transfers work for net errors. See https://crbug.com/588314. |
1005 GURL last_successful_url_; | 1014 GURL last_successful_url_; |
1006 | 1015 |
1007 // The mapping of pending JavaScript calls created by | 1016 // The mapping of pending JavaScript calls created by |
1008 // ExecuteJavaScript and their corresponding callbacks. | 1017 // ExecuteJavaScript and their corresponding callbacks. |
1009 std::map<int, JavaScriptResultCallback> javascript_callbacks_; | 1018 std::map<int, JavaScriptResultCallback> javascript_callbacks_; |
1010 std::map<uint64_t, VisualStateCallback> visual_state_callbacks_; | 1019 std::map<uint64_t, VisualStateCallback> visual_state_callbacks_; |
1011 | 1020 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 | 1243 |
1235 // NOTE: This must be the last member. | 1244 // NOTE: This must be the last member. |
1236 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1245 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1237 | 1246 |
1238 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1247 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1239 }; | 1248 }; |
1240 | 1249 |
1241 } // namespace content | 1250 } // namespace content |
1242 | 1251 |
1243 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1252 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |