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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 732 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
733 OnUpdateToUniqueOrigin) | 733 OnUpdateToUniqueOrigin) |
734 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 734 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
735 OnDidChangeSandboxFlags) | 735 OnDidChangeSandboxFlags) |
736 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 736 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
737 OnDidChangeFrameOwnerProperties) | 737 OnDidChangeFrameOwnerProperties) |
738 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 738 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
739 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 739 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
740 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, | 740 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation, |
741 OnBeginNavigation) | 741 OnBeginNavigation) |
| 742 IPC_MESSAGE_HANDLER(FrameHostMsg_AbortNavigation, OnAbortNavigation) |
742 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) | 743 IPC_MESSAGE_HANDLER(FrameHostMsg_DispatchLoad, OnDispatchLoad) |
743 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, | 744 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, |
744 OnTextSurroundingSelectionResponse) | 745 OnTextSurroundingSelectionResponse) |
745 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) | 746 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents) |
746 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, | 747 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges, |
747 OnAccessibilityLocationChanges) | 748 OnAccessibilityLocationChanges) |
748 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, | 749 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, |
749 OnAccessibilityFindInPageResult) | 750 OnAccessibilityFindInPageResult) |
750 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_ChildFrameHitTestResult, | 751 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_ChildFrameHitTestResult, |
751 OnAccessibilityChildFrameHitTestResult) | 752 OnAccessibilityChildFrameHitTestResult) |
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 if (waiting_for_init_) { | 1968 if (waiting_for_init_) { |
1968 pendinging_navigate_ = base::MakeUnique<PendingNavigation>( | 1969 pendinging_navigate_ = base::MakeUnique<PendingNavigation>( |
1969 validated_params, validated_begin_params); | 1970 validated_params, validated_begin_params); |
1970 return; | 1971 return; |
1971 } | 1972 } |
1972 | 1973 |
1973 frame_tree_node()->navigator()->OnBeginNavigation( | 1974 frame_tree_node()->navigator()->OnBeginNavigation( |
1974 frame_tree_node(), validated_params, validated_begin_params); | 1975 frame_tree_node(), validated_params, validated_begin_params); |
1975 } | 1976 } |
1976 | 1977 |
| 1978 void RenderFrameHostImpl::OnAbortNavigation() { |
| 1979 if (!IsBrowserSideNavigationEnabled()) { |
| 1980 NOTREACHED(); |
| 1981 return; |
| 1982 } |
| 1983 if (!is_active()) |
| 1984 return; |
| 1985 frame_tree_node()->navigator()->OnAbortNavigation(frame_tree_node()); |
| 1986 } |
| 1987 |
1977 void RenderFrameHostImpl::OnDispatchLoad() { | 1988 void RenderFrameHostImpl::OnDispatchLoad() { |
1978 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); | 1989 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); |
1979 | 1990 |
1980 // Don't forward the load event if this RFH is pending deletion. This can | 1991 // Don't forward the load event if this RFH is pending deletion. This can |
1981 // happen in a race where this RenderFrameHost finishes loading just after | 1992 // happen in a race where this RenderFrameHost finishes loading just after |
1982 // the frame navigates away. See https://crbug.com/626802. | 1993 // the frame navigates away. See https://crbug.com/626802. |
1983 if (!is_active()) | 1994 if (!is_active()) |
1984 return; | 1995 return; |
1985 | 1996 |
1986 // Only frames with an out-of-process parent frame should be sending this | 1997 // Only frames with an out-of-process parent frame should be sending this |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 service_manager::mojom::InterfaceProviderPtr provider; | 3561 service_manager::mojom::InterfaceProviderPtr provider; |
3551 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3562 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
3552 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3563 java_interfaces_.reset(new service_manager::InterfaceProvider); |
3553 java_interfaces_->Bind(std::move(provider)); | 3564 java_interfaces_->Bind(std::move(provider)); |
3554 } | 3565 } |
3555 return java_interfaces_.get(); | 3566 return java_interfaces_.get(); |
3556 } | 3567 } |
3557 #endif | 3568 #endif |
3558 | 3569 |
3559 } // namespace content | 3570 } // namespace content |
OLD | NEW |