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