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

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

Issue 1357803004: Reland of Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 // mirroring works correctly, add a check here to enforce it. 1352 // mirroring works correctly, add a check here to enforce it.
1353 delegate_->UpdateEncoding(this, encoding_name); 1353 delegate_->UpdateEncoding(this, encoding_name);
1354 } 1354 }
1355 1355
1356 void RenderFrameHostImpl::OnBeginNavigation( 1356 void RenderFrameHostImpl::OnBeginNavigation(
1357 const CommonNavigationParams& common_params, 1357 const CommonNavigationParams& common_params,
1358 const BeginNavigationParams& begin_params, 1358 const BeginNavigationParams& begin_params,
1359 scoped_refptr<ResourceRequestBody> body) { 1359 scoped_refptr<ResourceRequestBody> body) {
1360 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( 1360 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
1361 switches::kEnableBrowserSideNavigation)); 1361 switches::kEnableBrowserSideNavigation));
1362 CommonNavigationParams validated_params = common_params;
1363 GetProcess()->FilterURL(false, &validated_params.url);
1362 frame_tree_node()->navigator()->OnBeginNavigation( 1364 frame_tree_node()->navigator()->OnBeginNavigation(
1363 frame_tree_node(), common_params, begin_params, body); 1365 frame_tree_node(), validated_params, begin_params, body);
1364 } 1366 }
1365 1367
1366 void RenderFrameHostImpl::OnDispatchLoad() { 1368 void RenderFrameHostImpl::OnDispatchLoad() {
1367 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible()); 1369 CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
1368 // Only frames with an out-of-process parent frame should be sending this 1370 // Only frames with an out-of-process parent frame should be sending this
1369 // message. 1371 // message.
1370 RenderFrameProxyHost* proxy = 1372 RenderFrameProxyHost* proxy =
1371 frame_tree_node()->render_manager()->GetProxyToParent(); 1373 frame_tree_node()->render_manager()->GetProxyToParent();
1372 if (!proxy) { 1374 if (!proxy) {
1373 bad_message::ReceivedBadMessage(GetProcess(), 1375 bad_message::ReceivedBadMessage(GetProcess(),
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 BrowserPluginInstanceIDToAXTreeID(value))); 2244 BrowserPluginInstanceIDToAXTreeID(value)));
2243 break; 2245 break;
2244 case AX_CONTENT_INT_ATTRIBUTE_LAST: 2246 case AX_CONTENT_INT_ATTRIBUTE_LAST:
2245 NOTREACHED(); 2247 NOTREACHED();
2246 break; 2248 break;
2247 } 2249 }
2248 } 2250 }
2249 } 2251 }
2250 2252
2251 } // namespace content 2253 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/loader/navigation_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698