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

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: try to fix old chunk mismatch error 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 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 3181
3182 const std::string& RenderViewImpl::GetAcceptLanguages() const { 3182 const std::string& RenderViewImpl::GetAcceptLanguages() const {
3183 return renderer_preferences_.accept_languages; 3183 return renderer_preferences_.accept_languages;
3184 } 3184 }
3185 3185
3186 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( 3186 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
3187 WebFrame* frame, WebDataSource::ExtraData* extraData, 3187 WebFrame* frame, WebDataSource::ExtraData* extraData,
3188 const WebURLRequest& request, WebNavigationType type, 3188 const WebURLRequest& request, WebNavigationType type,
3189 WebNavigationPolicy default_policy, bool is_redirect) { 3189 WebNavigationPolicy default_policy, bool is_redirect) {
3190 if (request.url() != GURL(kSwappedOutURL) && 3190 if (request.url() != GURL(kSwappedOutURL) &&
3191 GetContentClient()->renderer()->HandleNavigation(frame, request, type, 3191 GetContentClient()->renderer()->HandleNavigation(
3192 default_policy, 3192 this,
3193 is_redirect)) { 3193 static_cast<DocumentState*>(extraData),
3194 opener_id_,
3195 frame,
3196 request, type,
3197 default_policy,
3198 is_redirect)) {
3194 return WebKit::WebNavigationPolicyIgnore; 3199 return WebKit::WebNavigationPolicyIgnore;
3195 } 3200 }
3196 3201
3197 Referrer referrer(GetReferrerFromRequest(frame, request)); 3202 Referrer referrer(GetReferrerFromRequest(frame, request));
3198 3203
3199 if (is_swapped_out_) { 3204 if (is_swapped_out_) {
3200 if (request.url() != GURL(kSwappedOutURL)) { 3205 if (request.url() != GURL(kSwappedOutURL)) {
3201 // Targeted links may try to navigate a swapped out frame. Allow the 3206 // Targeted links may try to navigate a swapped out frame. Allow the
3202 // browser process to navigate the tab instead. Note that it is also 3207 // browser process to navigate the tab instead. Note that it is also
3203 // possible for non-targeted navigations (from this view) to arrive 3208 // possible for non-targeted navigations (from this view) to arrive
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after
6559 for (size_t i = 0; i < icon_urls.size(); i++) { 6564 for (size_t i = 0; i < icon_urls.size(); i++) {
6560 WebURL url = icon_urls[i].iconURL(); 6565 WebURL url = icon_urls[i].iconURL();
6561 if (!url.isEmpty()) 6566 if (!url.isEmpty())
6562 urls.push_back(FaviconURL(url, 6567 urls.push_back(FaviconURL(url,
6563 ToFaviconType(icon_urls[i].iconType()))); 6568 ToFaviconType(icon_urls[i].iconType())));
6564 } 6569 }
6565 SendUpdateFaviconURL(urls); 6570 SendUpdateFaviconURL(urls);
6566 } 6571 }
6567 6572
6568 } // namespace content 6573 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698