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 #include "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 727 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
728 OnUpdateToUniqueOrigin) | 728 OnUpdateToUniqueOrigin) |
729 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 729 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
730 OnDidChangeSandboxFlags) | 730 OnDidChangeSandboxFlags) |
731 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 731 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
732 OnDidChangeFrameOwnerProperties) | 732 OnDidChangeFrameOwnerProperties) |
733 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 733 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
734 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 734 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
735 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 735 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
736 OnBeginNavigation) | 736 OnBeginNavigation) |
| 737 IPC_MESSAGE_HANDLER(FrameHostMsg_AbortNavigation, OnAbortNavigation) |
737 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) | 738 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) |
738 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, | 739 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, |
739 OnTextSurroundingSelectionResponse) | 740 OnTextSurroundingSelectionResponse) |
740 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 741 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
741 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 742 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
742 OnAccessibilityLocationChanges) | 743 OnAccessibilityLocationChanges) |
743 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, | 744 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, |
744 OnAccessibilityFindInPageResult) | 745 OnAccessibilityFindInPageResult) |
745 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_ChildFrameHitTestResult, | 746 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_ChildFrameHitTestResult, |
746 OnAccessibilityChildFrameHitTestResult) | 747 OnAccessibilityChildFrameHitTestResult) |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1925 if (waiting_for_init_) { | 1926 if (waiting_for_init_) { |
1926 pendinging_navigate_ = base::MakeUnique<PendingNavigation>( | 1927 pendinging_navigate_ = base::MakeUnique<PendingNavigation>( |
1927 validated_params, validated_begin_params); | 1928 validated_params, validated_begin_params); |
1928 return; | 1929 return; |
1929 } | 1930 } |
1930 | 1931 |
1931 frame_tree_node()->navigator()->OnBeginNavigation( | 1932 frame_tree_node()->navigator()->OnBeginNavigation( |
1932 frame_tree_node(), validated_params, validated_begin_params); | 1933 frame_tree_node(), validated_params, validated_begin_params); |
1933 } | 1934 } |
1934 | 1935 |
| 1936 void RenderFrameHostImpl::OnAbortNavigation() { |
| 1937 CHECK(IsBrowserSideNavigationEnabled()); |
| 1938 if (!is_active()) |
| 1939 return; |
| 1940 frame_tree_node()->navigator()->OnAbortNavigation(frame_tree_node()); |
| 1941 } |
| 1942 |
1935 void RenderFrameHostImpl::OnDispatchLoad() { | 1943 void RenderFrameHostImpl::OnDispatchLoad() { |
1936 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); | 1944 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); |
1937 | 1945 |
1938 // Don't forward the load event if this RFH is pending deletion. This can | 1946 // Don't forward the load event if this RFH is pending deletion. This can |
1939 // happen in a race where this RenderFrameHost finishes loading just after | 1947 // happen in a race where this RenderFrameHost finishes loading just after |
1940 // the frame navigates away. See https://crbug.com/626802. | 1948 // the frame navigates away. See https://crbug.com/626802. |
1941 if (!is_active()) | 1949 if (!is_active()) |
1942 return; | 1950 return; |
1943 | 1951 |
1944 // Only frames with an out-of-process parent frame should be sending this | 1952 // Only frames with an out-of-process parent frame should be sending this |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3496 GetUserData(kRenderFrameHostAndroidKey)); | 3504 GetUserData(kRenderFrameHostAndroidKey)); |
3497 if (!render_frame_host_android) { | 3505 if (!render_frame_host_android) { |
3498 render_frame_host_android = new RenderFrameHostAndroid(this); | 3506 render_frame_host_android = new RenderFrameHostAndroid(this); |
3499 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); | 3507 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); |
3500 } | 3508 } |
3501 return render_frame_host_android->GetJavaObject(); | 3509 return render_frame_host_android->GetJavaObject(); |
3502 } | 3510 } |
3503 #endif | 3511 #endif |
3504 | 3512 |
3505 } // namespace content | 3513 } // namespace content |
OLD | NEW |