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

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

Issue 11293157: Add a new ContentRendererClient::HandleNavigation callback in RenderViewImpl::decidePolicyForNaviga… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« 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/bind.h" 10 #include "base/bind.h"
(...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2667 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer, 2667 Send(new ViewHostMsg_DownloadUrl(routing_id_, request.url(), referrer,
2668 suggested_name)); 2668 suggested_name));
2669 } else { 2669 } else {
2670 OpenURL(frame, request.url(), referrer, policy); 2670 OpenURL(frame, request.url(), referrer, policy);
2671 } 2671 }
2672 } 2672 }
2673 2673
2674 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( 2674 WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
2675 WebFrame* frame, const WebURLRequest& request, WebNavigationType type, 2675 WebFrame* frame, const WebURLRequest& request, WebNavigationType type,
2676 const WebNode&, WebNavigationPolicy default_policy, bool is_redirect) { 2676 const WebNode&, WebNavigationPolicy default_policy, bool is_redirect) {
2677 if (request.url() != GURL(kSwappedOutURL) &&
2678 GetContentClient()->renderer()->HandleNavigation(frame, request, type,
2679 default_policy,
2680 is_redirect)) {
2681 return WebKit::WebNavigationPolicyIgnore;
2682 }
2683
2677 Referrer referrer( 2684 Referrer referrer(
2678 GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))), 2685 GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))),
2679 GetReferrerPolicyFromRequest(frame, request)); 2686 GetReferrerPolicyFromRequest(frame, request));
2680 2687
2681 if (is_swapped_out_) { 2688 if (is_swapped_out_) {
2682 if (request.url() != GURL(kSwappedOutURL)) { 2689 if (request.url() != GURL(kSwappedOutURL)) {
2683 // Targeted links may try to navigate a swapped out frame. Allow the 2690 // Targeted links may try to navigate a swapped out frame. Allow the
2684 // browser process to navigate the tab instead. Note that it is also 2691 // browser process to navigate the tab instead. Note that it is also
2685 // possible for non-targeted navigations (from this view) to arrive 2692 // possible for non-targeted navigations (from this view) to arrive
2686 // here just after we are swapped out. It's ok to send them to the 2693 // here just after we are swapped out. It's ok to send them to the
(...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after
6343 } 6350 }
6344 #endif 6351 #endif
6345 6352
6346 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6353 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6347 TransportDIB::Handle dib_handle) { 6354 TransportDIB::Handle dib_handle) {
6348 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6355 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6349 RenderProcess::current()->ReleaseTransportDIB(dib); 6356 RenderProcess::current()->ReleaseTransportDIB(dib);
6350 } 6357 }
6351 6358
6352 } // namespace content 6359 } // 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