Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2411693003: Move blocking of top-level navigations to nested URLs with extension origins from non-extension pro… (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 } 1213 }
1214 1214
1215 // Synchronous renderer-initiated navigations will send a 1215 // Synchronous renderer-initiated navigations will send a
1216 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad 1216 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad
1217 // message. 1217 // message.
1218 if (!navigation_handle_) { 1218 if (!navigation_handle_) {
1219 // There is no pending NavigationEntry in these cases, so pass 0 as the 1219 // There is no pending NavigationEntry in these cases, so pass 0 as the
1220 // nav_id. If the previous handle was a prematurely aborted navigation 1220 // nav_id. If the previous handle was a prematurely aborted navigation
1221 // loaded via LoadDataWithBaseURL, propogate the entry id. 1221 // loaded via LoadDataWithBaseURL, propogate the entry id.
1222 navigation_handle_ = NavigationHandleImpl::Create( 1222 navigation_handle_ = NavigationHandleImpl::Create(
1223 validated_params.url, frame_tree_node_, is_renderer_initiated, 1223 validated_params.url,
1224 site_instance_->GetSiteURL(),
1225 frame_tree_node_, is_renderer_initiated,
1224 true, // is_synchronous 1226 true, // is_synchronous
1225 validated_params.is_srcdoc, base::TimeTicks::Now(), 1227 validated_params.is_srcdoc, base::TimeTicks::Now(),
1226 entry_id_for_data_nav, 1228 entry_id_for_data_nav,
1227 false); // started_from_context_menu 1229 false); // started_from_context_menu
1228 // PlzNavigate 1230 // PlzNavigate
1229 if (IsBrowserSideNavigationEnabled()) { 1231 if (IsBrowserSideNavigationEnabled()) {
1230 // PlzNavigate: synchronous loads happen in the renderer, and the browser 1232 // PlzNavigate: synchronous loads happen in the renderer, and the browser
1231 // has not been notified about the start of the load yet. Do it now. 1233 // has not been notified about the start of the load yet. Do it now.
1232 if (!is_loading()) { 1234 if (!is_loading()) {
1233 bool was_loading = frame_tree_node()->frame_tree()->IsLoading(); 1235 bool was_loading = frame_tree_node()->frame_tree()->IsLoading();
(...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 3109 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
3108 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 3110 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
3109 return web_bluetooth_service_.get(); 3111 return web_bluetooth_service_.get();
3110 } 3112 }
3111 3113
3112 void RenderFrameHostImpl::DeleteWebBluetoothService() { 3114 void RenderFrameHostImpl::DeleteWebBluetoothService() {
3113 web_bluetooth_service_.reset(); 3115 web_bluetooth_service_.reset();
3114 } 3116 }
3115 3117
3116 } // namespace content 3118 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698