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