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

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: add a forgotten merge reject Created 7 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 (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 3143 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 3154
3155 const std::string& RenderViewImpl::GetAcceptLanguages() const { 3155 const std::string& RenderViewImpl::GetAcceptLanguages() const {
3156 return renderer_preferences_.accept_languages; 3156 return renderer_preferences_.accept_languages;
3157 } 3157 }
3158 3158
3159 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( 3159 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
3160 WebFrame* frame, WebDataSource::ExtraData* extraData, 3160 WebFrame* frame, WebDataSource::ExtraData* extraData,
3161 const WebURLRequest& request, WebNavigationType type, 3161 const WebURLRequest& request, WebNavigationType type,
3162 WebNavigationPolicy default_policy, bool is_redirect) { 3162 WebNavigationPolicy default_policy, bool is_redirect) {
3163 if (request.url() != GURL(kSwappedOutURL) && 3163 if (request.url() != GURL(kSwappedOutURL) &&
3164 GetContentClient()->renderer()->HandleNavigation(frame, request, type, 3164 GetContentClient()->renderer()->HandleNavigation(
3165 default_policy, 3165 this,
3166 is_redirect)) { 3166 static_cast<DocumentState*>(extraData),
3167 opener_id_,
3168 frame,
3169 request, type,
3170 default_policy,
3171 is_redirect)) {
3167 return WebKit::WebNavigationPolicyIgnore; 3172 return WebKit::WebNavigationPolicyIgnore;
3168 } 3173 }
3169 3174
3170 Referrer referrer(GetReferrerFromRequest(frame, request)); 3175 Referrer referrer(GetReferrerFromRequest(frame, request));
3171 3176
3172 if (is_swapped_out_) { 3177 if (is_swapped_out_) {
3173 if (request.url() != GURL(kSwappedOutURL)) { 3178 if (request.url() != GURL(kSwappedOutURL)) {
3174 // Targeted links may try to navigate a swapped out frame. Allow the 3179 // Targeted links may try to navigate a swapped out frame. Allow the
3175 // browser process to navigate the tab instead. Note that it is also 3180 // browser process to navigate the tab instead. Note that it is also
3176 // possible for non-targeted navigations (from this view) to arrive 3181 // possible for non-targeted navigations (from this view) to arrive
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after
6532 for (size_t i = 0; i < icon_urls.size(); i++) { 6537 for (size_t i = 0; i < icon_urls.size(); i++) {
6533 WebURL url = icon_urls[i].iconURL(); 6538 WebURL url = icon_urls[i].iconURL();
6534 if (!url.isEmpty()) 6539 if (!url.isEmpty())
6535 urls.push_back(FaviconURL(url, 6540 urls.push_back(FaviconURL(url,
6536 ToFaviconType(icon_urls[i].iconType()))); 6541 ToFaviconType(icon_urls[i].iconType())));
6537 } 6542 }
6538 SendUpdateFaviconURL(urls); 6543 SendUpdateFaviconURL(urls);
6539 } 6544 }
6540 6545
6541 } // namespace content 6546 } // namespace content
OLDNEW
« android_webview/native/aw_contents.cc ('K') | « 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