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

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

Issue 27551003: The content api for shouldoverrideurlloading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 7 years 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 (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 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after
3092 } 3092 }
3093 3093
3094 const std::string& RenderViewImpl::GetAcceptLanguages() const { 3094 const std::string& RenderViewImpl::GetAcceptLanguages() const {
3095 return renderer_preferences_.accept_languages; 3095 return renderer_preferences_.accept_languages;
3096 } 3096 }
3097 3097
3098 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( 3098 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
3099 WebFrame* frame, WebDataSource::ExtraData* extraData, 3099 WebFrame* frame, WebDataSource::ExtraData* extraData,
3100 const WebURLRequest& request, WebNavigationType type, 3100 const WebURLRequest& request, WebNavigationType type,
3101 WebNavigationPolicy default_policy, bool is_redirect) { 3101 WebNavigationPolicy default_policy, bool is_redirect) {
3102 #ifdef OS_ANDROID
3103 // The handlenavigation API is deprecated and will be removed once
3104 // crbug.com/325351 is resolved.
3102 if (request.url() != GURL(kSwappedOutURL) && 3105 if (request.url() != GURL(kSwappedOutURL) &&
3103 GetContentClient()->renderer()->HandleNavigation(frame, request, type, 3106 GetContentClient()->renderer()->HandleNavigation(
3104 default_policy, 3107 this,
3105 is_redirect)) { 3108 static_cast<DocumentState*>(extraData),
3109 opener_id_,
3110 frame,
3111 request,
3112 type,
3113 default_policy,
3114 is_redirect)) {
3106 return blink::WebNavigationPolicyIgnore; 3115 return blink::WebNavigationPolicyIgnore;
3107 } 3116 }
3117 #endif
3108 3118
3109 Referrer referrer(GetReferrerFromRequest(frame, request)); 3119 Referrer referrer(GetReferrerFromRequest(frame, request));
3110 3120
3111 if (is_swapped_out_) { 3121 if (is_swapped_out_) {
3112 if (request.url() != GURL(kSwappedOutURL)) { 3122 if (request.url() != GURL(kSwappedOutURL)) {
3113 // Targeted links may try to navigate a swapped out frame. Allow the 3123 // Targeted links may try to navigate a swapped out frame. Allow the
3114 // browser process to navigate the tab instead. Note that it is also 3124 // browser process to navigate the tab instead. Note that it is also
3115 // possible for non-targeted navigations (from this view) to arrive 3125 // possible for non-targeted navigations (from this view) to arrive
3116 // here just after we are swapped out. It's ok to send them to the 3126 // here just after we are swapped out. It's ok to send them to the
3117 // browser, as long as they're for the top level frame. 3127 // browser, as long as they're for the top level frame.
(...skipping 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after
6429 for (size_t i = 0; i < icon_urls.size(); i++) { 6439 for (size_t i = 0; i < icon_urls.size(); i++) {
6430 WebURL url = icon_urls[i].iconURL(); 6440 WebURL url = icon_urls[i].iconURL();
6431 if (!url.isEmpty()) 6441 if (!url.isEmpty())
6432 urls.push_back(FaviconURL(url, 6442 urls.push_back(FaviconURL(url,
6433 ToFaviconType(icon_urls[i].iconType()))); 6443 ToFaviconType(icon_urls[i].iconType())));
6434 } 6444 }
6435 SendUpdateFaviconURL(urls); 6445 SendUpdateFaviconURL(urls);
6436 } 6446 }
6437 6447
6438 } // namespace content 6448 } // 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