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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // selection. The lengths are supplied in code points, not in Java chars | 451 // selection. The lengths are supplied in code points, not in Java chars |
452 // (UTF-16 Code Unit) or in glyphs. Do nothing if there are one or more | 452 // (UTF-16 Code Unit) or in glyphs. Do nothing if there are one or more |
453 // invalid surrogate pairs in the requested range. | 453 // invalid surrogate pairs in the requested range. |
454 void DeleteSurroundingTextInCodePoints(int before, int after); | 454 void DeleteSurroundingTextInCodePoints(int before, int after); |
455 | 455 |
456 // Notifies the RenderFrame that the JavaScript message that was shown was | 456 // Notifies the RenderFrame that the JavaScript message that was shown was |
457 // closed by the user. | 457 // closed by the user. |
458 void JavaScriptDialogClosed(IPC::Message* reply_msg, | 458 void JavaScriptDialogClosed(IPC::Message* reply_msg, |
459 bool success, | 459 bool success, |
460 const base::string16& user_input, | 460 const base::string16& user_input, |
461 bool is_before_unload_dialog, | |
462 bool dialog_was_suppressed); | 461 bool dialog_was_suppressed); |
463 | 462 |
464 // Get the accessibility mode from the delegate and Send a message to the | 463 // Get the accessibility mode from the delegate and Send a message to the |
465 // renderer process to change the accessibility mode. | 464 // renderer process to change the accessibility mode. |
466 void UpdateAccessibilityMode(); | 465 void UpdateAccessibilityMode(); |
467 | 466 |
468 // Samsung Galaxy Note-specific "smart clip" stylus text getter. | 467 // Samsung Galaxy Note-specific "smart clip" stylus text getter. |
469 void RequestSmartClipExtract(SmartClipCallback callback, gfx::Rect rect); | 468 void RequestSmartClipExtract(SmartClipCallback callback, gfx::Rect rect); |
470 | 469 |
471 // Request a one-time snapshot of the accessibility tree without changing | 470 // Request a one-time snapshot of the accessibility tree without changing |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 | 880 |
882 void SendJavaScriptDialogReply(IPC::Message* reply_msg, | 881 void SendJavaScriptDialogReply(IPC::Message* reply_msg, |
883 bool success, | 882 bool success, |
884 const base::string16& user_input); | 883 const base::string16& user_input); |
885 | 884 |
886 // Returns ownership of the NavigationHandle associated with a navigation that | 885 // Returns ownership of the NavigationHandle associated with a navigation that |
887 // just committed. | 886 // just committed. |
888 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( | 887 std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit( |
889 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); | 888 const FrameHostMsg_DidCommitProvisionalLoad_Params& params); |
890 | 889 |
| 890 // Called by |beforeunload_timeout_| when the beforeunload timeout fires. |
| 891 void BeforeUnloadTimeout(); |
| 892 |
891 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a | 893 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a |
892 // refcount that calls Shutdown when it reaches zero. This allows each | 894 // refcount that calls Shutdown when it reaches zero. This allows each |
893 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring | 895 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring |
894 // we have a RenderViewHost for each RenderFrameHost. | 896 // we have a RenderViewHost for each RenderFrameHost. |
895 // TODO(creis): RenderViewHost will eventually go away and be replaced with | 897 // TODO(creis): RenderViewHost will eventually go away and be replaced with |
896 // some form of page context. | 898 // some form of page context. |
897 RenderViewHostImpl* const render_view_host_; | 899 RenderViewHostImpl* const render_view_host_; |
898 | 900 |
899 RenderFrameHostDelegate* const delegate_; | 901 RenderFrameHostDelegate* const delegate_; |
900 | 902 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 bool is_waiting_for_beforeunload_ack_; | 987 bool is_waiting_for_beforeunload_ack_; |
986 | 988 |
987 // Valid only when is_waiting_for_beforeunload_ack_ or | 989 // Valid only when is_waiting_for_beforeunload_ack_ or |
988 // IsWaitingForUnloadACK is true. This tells us if the unload request | 990 // IsWaitingForUnloadACK is true. This tells us if the unload request |
989 // is for closing the entire tab ( = false), or only this RenderFrameHost in | 991 // is for closing the entire tab ( = false), or only this RenderFrameHost in |
990 // the case of a navigation ( = true). Currently only cross-site navigations | 992 // the case of a navigation ( = true). Currently only cross-site navigations |
991 // require a beforeUnload/unload ACK. | 993 // require a beforeUnload/unload ACK. |
992 // PlzNavigate: all navigations require a beforeUnload ACK. | 994 // PlzNavigate: all navigations require a beforeUnload ACK. |
993 bool unload_ack_is_for_navigation_; | 995 bool unload_ack_is_for_navigation_; |
994 | 996 |
| 997 // The timeout monitor that runs from when the beforeunload is started in |
| 998 // DispatchBeforeUnload() until either the render process ACKs it with an IPC |
| 999 // to OnBeforeUnloadACK(), or until the timeout triggers. |
| 1000 std::unique_ptr<TimeoutMonitor> beforeunload_timeout_; |
| 1001 |
995 // Indicates whether this RenderFrameHost is in the process of loading a | 1002 // Indicates whether this RenderFrameHost is in the process of loading a |
996 // document or not. | 1003 // document or not. |
997 bool is_loading_; | 1004 bool is_loading_; |
998 | 1005 |
999 // PlzNavigate | 1006 // PlzNavigate |
1000 // Used to track whether a commit is expected in this frame. Only used in | 1007 // Used to track whether a commit is expected in this frame. Only used in |
1001 // tests. | 1008 // tests. |
1002 bool pending_commit_; | 1009 bool pending_commit_; |
1003 | 1010 |
1004 // The unique ID of the latest NavigationEntry that this RenderFrameHost is | 1011 // The unique ID of the latest NavigationEntry that this RenderFrameHost is |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 | 1145 |
1139 // NOTE: This must be the last member. | 1146 // NOTE: This must be the last member. |
1140 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 1147 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
1141 | 1148 |
1142 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 1149 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
1143 }; | 1150 }; |
1144 | 1151 |
1145 } // namespace content | 1152 } // namespace content |
1146 | 1153 |
1147 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 1154 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |