Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2740493004: Revert of Move beforeunload hang timer duties to its own timer. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 #include "content/common/ax_content_node_data.h" 31 #include "content/common/ax_content_node_data.h"
32 #include "content/common/content_export.h" 32 #include "content/common/content_export.h"
33 #include "content/common/content_security_policy/content_security_policy.h" 33 #include "content/common/content_security_policy/content_security_policy.h"
34 #include "content/common/download/mhtml_save_status.h" 34 #include "content/common/download/mhtml_save_status.h"
35 #include "content/common/frame.mojom.h" 35 #include "content/common/frame.mojom.h"
36 #include "content/common/frame_message_enums.h" 36 #include "content/common/frame_message_enums.h"
37 #include "content/common/frame_replication_state.h" 37 #include "content/common/frame_replication_state.h"
38 #include "content/common/image_downloader/image_downloader.mojom.h" 38 #include "content/common/image_downloader/image_downloader.mojom.h"
39 #include "content/common/navigation_params.h" 39 #include "content/common/navigation_params.h"
40 #include "content/public/browser/render_frame_host.h" 40 #include "content/public/browser/render_frame_host.h"
41 #include "content/public/browser/renderer_unresponsive_type.h"
42 #include "content/public/common/javascript_dialog_type.h" 41 #include "content/public/common/javascript_dialog_type.h"
43 #include "content/public/common/previews_state.h" 42 #include "content/public/common/previews_state.h"
44 #include "media/mojo/interfaces/interface_factory.mojom.h" 43 #include "media/mojo/interfaces/interface_factory.mojom.h"
45 #include "net/http/http_response_headers.h" 44 #include "net/http/http_response_headers.h"
46 #include "services/service_manager/public/cpp/interface_factory.h" 45 #include "services/service_manager/public/cpp/interface_factory.h"
47 #include "services/service_manager/public/cpp/interface_registry.h" 46 #include "services/service_manager/public/cpp/interface_registry.h"
48 #include "third_party/WebKit/public/platform/WebFocusType.h" 47 #include "third_party/WebKit/public/platform/WebFocusType.h"
49 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h" 48 #include "third_party/WebKit/public/platform/WebInsecureRequestPolicy.h"
50 #include "third_party/WebKit/public/web/WebTextDirection.h" 49 #include "third_party/WebKit/public/web/WebTextDirection.h"
51 #include "third_party/WebKit/public/web/WebTreeScopeType.h" 50 #include "third_party/WebKit/public/web/WebTreeScopeType.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 872
874 void SendJavaScriptDialogReply(IPC::Message* reply_msg, 873 void SendJavaScriptDialogReply(IPC::Message* reply_msg,
875 bool success, 874 bool success,
876 const base::string16& user_input); 875 const base::string16& user_input);
877 876
878 // Returns ownership of the NavigationHandle associated with a navigation that 877 // Returns ownership of the NavigationHandle associated with a navigation that
879 // just committed. 878 // just committed.
880 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( 879 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit(
881 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); 880 const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
882 881
883 // Called by |beforeunload_timeout_| when the beforeunload timeout fires.
884 void BeforeUnloadTimeout();
885
886 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a 882 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
887 // refcount that calls Shutdown when it reaches zero. This allows each 883 // refcount that calls Shutdown when it reaches zero. This allows each
888 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring 884 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring
889 // we have a RenderViewHost for each RenderFrameHost. 885 // we have a RenderViewHost for each RenderFrameHost.
890 // TODO(creis): RenderViewHost will eventually go away and be replaced with 886 // TODO(creis): RenderViewHost will eventually go away and be replaced with
891 // some form of page context. 887 // some form of page context.
892 RenderViewHostImpl* render_view_host_; 888 RenderViewHostImpl* render_view_host_;
893 889
894 RenderFrameHostDelegate* delegate_; 890 RenderFrameHostDelegate* delegate_;
895 891
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 bool is_waiting_for_beforeunload_ack_; 976 bool is_waiting_for_beforeunload_ack_;
981 977
982 // Valid only when is_waiting_for_beforeunload_ack_ or 978 // Valid only when is_waiting_for_beforeunload_ack_ or
983 // IsWaitingForUnloadACK is true. This tells us if the unload request 979 // IsWaitingForUnloadACK is true. This tells us if the unload request
984 // is for closing the entire tab ( = false), or only this RenderFrameHost in 980 // is for closing the entire tab ( = false), or only this RenderFrameHost in
985 // the case of a navigation ( = true). Currently only cross-site navigations 981 // the case of a navigation ( = true). Currently only cross-site navigations
986 // require a beforeUnload/unload ACK. 982 // require a beforeUnload/unload ACK.
987 // PlzNavigate: all navigations require a beforeUnload ACK. 983 // PlzNavigate: all navigations require a beforeUnload ACK.
988 bool unload_ack_is_for_navigation_; 984 bool unload_ack_is_for_navigation_;
989 985
990 // The timeout monitor that runs from when the beforeunload is started in
991 // DispatchBeforeUnload() until either the render process ACKs it with an IPC
992 // to OnBeforeUnloadACK(), or until the timeout triggers.
993 std::unique_ptr<TimeoutMonitor> beforeunload_timeout_;
994
995 // If beforeunload_timeout_ is active, the type of the timeout.
996 RendererUnresponsiveType beforeunload_timeout_type_;
997
998 // Indicates whether this RenderFrameHost is in the process of loading a 986 // Indicates whether this RenderFrameHost is in the process of loading a
999 // document or not. 987 // document or not.
1000 bool is_loading_; 988 bool is_loading_;
1001 989
1002 // PlzNavigate 990 // PlzNavigate
1003 // Used to track whether a commit is expected in this frame. Only used in 991 // Used to track whether a commit is expected in this frame. Only used in
1004 // tests. 992 // tests.
1005 bool pending_commit_; 993 bool pending_commit_;
1006 994
1007 // The unique ID of the latest NavigationEntry that this RenderFrameHost is 995 // The unique ID of the latest NavigationEntry that this RenderFrameHost is
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 1129
1142 // NOTE: This must be the last member. 1130 // NOTE: This must be the last member.
1143 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 1131 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
1144 1132
1145 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 1133 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
1146 }; 1134 };
1147 1135
1148 } // namespace content 1136 } // namespace content
1149 1137
1150 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 1138 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698