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