| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { | 965 void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) { |
| 966 if (params.is_history_navigation_in_new_child) { | 966 if (params.is_history_navigation_in_new_child) { |
| 967 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); | 967 DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries()); |
| 968 | 968 |
| 969 // Try to find a FrameNavigationEntry that matches this frame instead, based | 969 // Try to find a FrameNavigationEntry that matches this frame instead, based |
| 970 // on the frame's unique name. If this can't be found, fall back to the | 970 // on the frame's unique name. If this can't be found, fall back to the |
| 971 // default params using OpenURL below. | 971 // default params using OpenURL below. |
| 972 if (frame_tree_node_->navigator()->NavigateNewChildFrame( | 972 if (frame_tree_node_->navigator()->NavigateNewChildFrame( |
| 973 this, params.frame_unique_name)) | 973 this, params.frame_unique_name)) |
| 974 return; | 974 return; |
| 975 |
| 976 // No need to explicitly load about:blank, since we start there anyway. |
| 977 if (params.url == GURL(url::kAboutBlankURL)) { |
| 978 // TODO(creis): Do we need to stop loading in the frame? |
| 979 DLOG(INFO) << "Skipping OpenURL for fallback to about:blank"; |
| 980 return; |
| 981 } |
| 975 } | 982 } |
| 976 | 983 |
| 977 OpenURL(params, GetSiteInstance()); | 984 OpenURL(params, GetSiteInstance()); |
| 978 } | 985 } |
| 979 | 986 |
| 980 void RenderFrameHostImpl::OnCancelInitialHistoryLoad() { | 987 void RenderFrameHostImpl::OnCancelInitialHistoryLoad() { |
| 981 // A Javascript navigation interrupted the initial history load. Check if an | 988 // A Javascript navigation interrupted the initial history load. Check if an |
| 982 // initial subframe cross-process navigation needs to be canceled as a result. | 989 // initial subframe cross-process navigation needs to be canceled as a result. |
| 983 // TODO(creis, clamy): Cancel any cross-process navigation in PlzNavigate. | 990 // TODO(creis, clamy): Cancel any cross-process navigation in PlzNavigate. |
| 984 if (GetParent() && !frame_tree_node_->has_committed_real_load() && | 991 if (GetParent() && !frame_tree_node_->has_committed_real_load() && |
| (...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3046 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3053 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3047 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3054 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3048 return web_bluetooth_service_.get(); | 3055 return web_bluetooth_service_.get(); |
| 3049 } | 3056 } |
| 3050 | 3057 |
| 3051 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3058 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3052 web_bluetooth_service_.reset(); | 3059 web_bluetooth_service_.reset(); |
| 3053 } | 3060 } |
| 3054 | 3061 |
| 3055 } // namespace content | 3062 } // namespace content |
| OLD | NEW |