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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix qinmin nit Created 5 years, 5 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
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after
4179 // TODO(clamy): see if initial commits in subframes should be handled 4179 // TODO(clamy): see if initial commits in subframes should be handled
4180 // separately. 4180 // separately.
4181 bool replace = is_reload || is_history_navigation || 4181 bool replace = is_reload || is_history_navigation ||
4182 common_params.url == GetLoadingUrl(); 4182 common_params.url == GetLoadingUrl();
4183 LoadNavigationErrorPage(failed_request, error, replace); 4183 LoadNavigationErrorPage(failed_request, error, replace);
4184 } 4184 }
4185 4185
4186 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( 4186 WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
4187 RenderFrame* render_frame, 4187 RenderFrame* render_frame,
4188 const NavigationPolicyInfo& info) { 4188 const NavigationPolicyInfo& info) {
4189 #ifdef OS_ANDROID
4190 // The handlenavigation API is deprecated and will be removed once
4191 // crbug.com/325351 is resolved.
4192 if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
4193 GetContentClient()->renderer()->HandleNavigation(
4194 render_frame,
4195 static_cast<DocumentState*>(info.extraData),
4196 render_view_->opener_id_,
4197 info.frame,
4198 info.urlRequest,
4199 info.navigationType,
4200 info.defaultPolicy,
4201 info.isRedirect)) {
4202 return blink::WebNavigationPolicyIgnore;
4203 }
4204 #endif
4205
4206 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame, 4189 Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame,
4207 info.urlRequest)); 4190 info.urlRequest));
4208 const base::CommandLine& command_line = 4191 const base::CommandLine& command_line =
4209 *base::CommandLine::ForCurrentProcess(); 4192 *base::CommandLine::ForCurrentProcess();
4210 4193
4211 if (command_line.HasSwitch(switches::kSitePerProcess) && is_subframe_) { 4194 if (command_line.HasSwitch(switches::kSitePerProcess) && is_subframe_) {
4212 // There's no reason to ignore navigations on subframes, since the swap out 4195 // There's no reason to ignore navigations on subframes, since the swap out
4213 // logic no longer applies. 4196 // logic no longer applies.
4214 } else { 4197 } else {
4215 if (is_swapped_out_) { 4198 if (is_swapped_out_) {
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
5056 void RenderFrameImpl::RegisterMojoServices() { 5039 void RenderFrameImpl::RegisterMojoServices() {
5057 // Only main frame have ImageDownloader service. 5040 // Only main frame have ImageDownloader service.
5058 if (!frame_->parent()) { 5041 if (!frame_->parent()) {
5059 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>( 5042 GetServiceRegistry()->AddService<image_downloader::ImageDownloader>(
5060 base::Bind(&ImageDownloaderImpl::CreateMojoService, 5043 base::Bind(&ImageDownloaderImpl::CreateMojoService,
5061 base::Unretained(this))); 5044 base::Unretained(this)));
5062 } 5045 }
5063 } 5046 }
5064 5047
5065 } // namespace content 5048 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/content_renderer_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698