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