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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Removed TestNavigationHandle + pointer to WebContents Created 5 years, 3 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 // mirroring works correctly, add a check here to enforce it. 1351 // mirroring works correctly, add a check here to enforce it.
1352 delegate_->UpdateEncoding(this, encoding_name); 1352 delegate_->UpdateEncoding(this, encoding_name);
1353 } 1353 }
1354 1354
1355 void RenderFrameHostImpl::OnBeginNavigation( 1355 void RenderFrameHostImpl::OnBeginNavigation(
1356 const CommonNavigationParams& common_params, 1356 const CommonNavigationParams& common_params,
1357 const BeginNavigationParams& begin_params, 1357 const BeginNavigationParams& begin_params,
1358 scoped_refptr<ResourceRequestBody> body) { 1358 scoped_refptr<ResourceRequestBody> body) {
1359 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 1359 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
1360 switches::kEnableBrowserSideNavigation)); 1360 switches::kEnableBrowserSideNavigation));
1361 CommonNavigationParams validated_params = common_params;
1362 GetProcess()->FilterURL(false, &validated_params.url);
1361 frame_tree_node()->navigator()->OnBeginNavigation( 1363 frame_tree_node()->navigator()->OnBeginNavigation(
1362 frame_tree_node(), common_params, begin_params, body); 1364 frame_tree_node(), validated_params, begin_params, body);
1363 } 1365 }
1364 1366
1365 void RenderFrameHostImpl::OnDispatchLoad() { 1367 void RenderFrameHostImpl::OnDispatchLoad() {
1366 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); 1368 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
1367 // Only frames with an out-of-process parent frame should be sending this 1369 // Only frames with an out-of-process parent frame should be sending this
1368 // message. 1370 // message.
1369 RenderFrameProxyHost* proxy = 1371 RenderFrameProxyHost* proxy =
1370 frame_tree_node()->render_manager()->GetProxyToParent(); 1372 frame_tree_node()->render_manager()->GetProxyToParent();
1371 if (!proxy) { 1373 if (!proxy) {
1372 bad_message::ReceivedBadMessage(GetProcess(), 1374 bad_message::ReceivedBadMessage(GetProcess(),
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 BrowserPluginInstanceIDToAXTreeID(value))); 2243 BrowserPluginInstanceIDToAXTreeID(value)));
2242 break; 2244 break;
2243 case AX_CONTENT_INT_ATTRIBUTE_LAST: 2245 case AX_CONTENT_INT_ATTRIBUTE_LAST:
2244 NOTREACHED(); 2246 NOTREACHED();
2245 break; 2247 break;
2246 } 2248 }
2247 } 2249 }
2248 } 2250 }
2249 2251
2250 } // namespace content 2252 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698