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

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

Issue 24228003: Upstream ShouldOverrideUrlLoading changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 &ssl_status.security_bits, 3132 &ssl_status.security_bits,
3133 &ssl_status.connection_status); 3133 &ssl_status.connection_status);
3134 return ssl_status; 3134 return ssl_status;
3135 } 3135 }
3136 3136
3137 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( 3137 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
3138 WebFrame* frame, WebDataSource::ExtraData* extraData, 3138 WebFrame* frame, WebDataSource::ExtraData* extraData,
3139 const WebURLRequest& request, WebNavigationType type, 3139 const WebURLRequest& request, WebNavigationType type,
3140 WebNavigationPolicy default_policy, bool is_redirect) { 3140 WebNavigationPolicy default_policy, bool is_redirect) {
3141 if (request.url() != GURL(kSwappedOutURL) && 3141 if (request.url() != GURL(kSwappedOutURL) &&
3142 GetContentClient()->renderer()->HandleNavigation(frame, request, type, 3142 GetContentClient()->renderer()->HandleNavigation(
3143 default_policy, 3143 this,
3144 is_redirect)) { 3144 static_cast<DocumentState*>(extraData),
3145 frame,
3146 request, type,
3147 default_policy,
3148 is_redirect)) {
3145 return WebKit::WebNavigationPolicyIgnore; 3149 return WebKit::WebNavigationPolicyIgnore;
3146 } 3150 }
3147 3151
3148 Referrer referrer(GetReferrerFromRequest(frame, request)); 3152 Referrer referrer(GetReferrerFromRequest(frame, request));
3149 3153
3150 if (is_swapped_out_) { 3154 if (is_swapped_out_) {
3151 if (request.url() != GURL(kSwappedOutURL)) { 3155 if (request.url() != GURL(kSwappedOutURL)) {
3152 // Targeted links may try to navigate a swapped out frame. Allow the 3156 // Targeted links may try to navigate a swapped out frame. Allow the
3153 // browser process to navigate the tab instead. Note that it is also 3157 // browser process to navigate the tab instead. Note that it is also
3154 // possible for non-targeted navigations (from this view) to arrive 3158 // possible for non-targeted navigations (from this view) to arrive
(...skipping 3351 matching lines...) Expand 10 before | Expand all | Expand 10 after
6506 for (size_t i = 0; i < icon_urls.size(); i++) { 6510 for (size_t i = 0; i < icon_urls.size(); i++) {
6507 WebURL url = icon_urls[i].iconURL(); 6511 WebURL url = icon_urls[i].iconURL();
6508 if (!url.isEmpty()) 6512 if (!url.isEmpty())
6509 urls.push_back(FaviconURL(url, 6513 urls.push_back(FaviconURL(url,
6510 ToFaviconType(icon_urls[i].iconType()))); 6514 ToFaviconType(icon_urls[i].iconType())));
6511 } 6515 }
6512 SendUpdateFaviconURL(urls); 6516 SendUpdateFaviconURL(urls);
6513 } 6517 }
6514 6518
6515 } // namespace content 6519 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698