Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3104 } | 3104 } |
| 3105 | 3105 |
| 3106 const std::string& RenderViewImpl::GetAcceptLanguages() const { | 3106 const std::string& RenderViewImpl::GetAcceptLanguages() const { |
| 3107 return renderer_preferences_.accept_languages; | 3107 return renderer_preferences_.accept_languages; |
| 3108 } | 3108 } |
| 3109 | 3109 |
| 3110 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( | 3110 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( |
| 3111 WebFrame* frame, WebDataSource::ExtraData* extraData, | 3111 WebFrame* frame, WebDataSource::ExtraData* extraData, |
| 3112 const WebURLRequest& request, WebNavigationType type, | 3112 const WebURLRequest& request, WebNavigationType type, |
| 3113 WebNavigationPolicy default_policy, bool is_redirect) { | 3113 WebNavigationPolicy default_policy, bool is_redirect) { |
| 3114 #ifdef OS_ANDROID | |
| 3115 // The handlenavigation API is deprecated and will be removed once | |
| 3116 // crbug.com/325351 is resolved. | |
| 3114 if (request.url() != GURL(kSwappedOutURL) && | 3117 if (request.url() != GURL(kSwappedOutURL) && |
| 3115 GetContentClient()->renderer()->HandleNavigation(frame, request, type, | 3118 GetContentClient()->renderer()->HandleNavigation( |
| 3116 default_policy, | 3119 this, |
| 3117 is_redirect)) { | 3120 static_cast<DocumentState*>(extraData), |
| 3121 opener_id_, | |
| 3122 frame, | |
| 3123 request, type, | |
|
jam
2013/12/05 07:42:08
nit: type on next line
sgurun-gerrit only
2013/12/05 17:38:58
Done.
| |
| 3124 default_policy, | |
| 3125 is_redirect)) { | |
| 3118 return blink::WebNavigationPolicyIgnore; | 3126 return blink::WebNavigationPolicyIgnore; |
| 3119 } | 3127 } |
| 3128 #endif | |
| 3120 | 3129 |
| 3121 Referrer referrer(GetReferrerFromRequest(frame, request)); | 3130 Referrer referrer(GetReferrerFromRequest(frame, request)); |
| 3122 | 3131 |
| 3123 if (is_swapped_out_) { | 3132 if (is_swapped_out_) { |
| 3124 if (request.url() != GURL(kSwappedOutURL)) { | 3133 if (request.url() != GURL(kSwappedOutURL)) { |
| 3125 // Targeted links may try to navigate a swapped out frame. Allow the | 3134 // Targeted links may try to navigate a swapped out frame. Allow the |
| 3126 // browser process to navigate the tab instead. Note that it is also | 3135 // browser process to navigate the tab instead. Note that it is also |
| 3127 // possible for non-targeted navigations (from this view) to arrive | 3136 // possible for non-targeted navigations (from this view) to arrive |
| 3128 // here just after we are swapped out. It's ok to send them to the | 3137 // here just after we are swapped out. It's ok to send them to the |
| 3129 // browser, as long as they're for the top level frame. | 3138 // browser, as long as they're for the top level frame. |
| (...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6452 for (size_t i = 0; i < icon_urls.size(); i++) { | 6461 for (size_t i = 0; i < icon_urls.size(); i++) { |
| 6453 WebURL url = icon_urls[i].iconURL(); | 6462 WebURL url = icon_urls[i].iconURL(); |
| 6454 if (!url.isEmpty()) | 6463 if (!url.isEmpty()) |
| 6455 urls.push_back(FaviconURL(url, | 6464 urls.push_back(FaviconURL(url, |
| 6456 ToFaviconType(icon_urls[i].iconType()))); | 6465 ToFaviconType(icon_urls[i].iconType()))); |
| 6457 } | 6466 } |
| 6458 SendUpdateFaviconURL(urls); | 6467 SendUpdateFaviconURL(urls); |
| 6459 } | 6468 } |
| 6460 | 6469 |
| 6461 } // namespace content | 6470 } // namespace content |
| OLD | NEW |