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/bind.h" | 10 #include "base/bind.h" |
(...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 (GetContentClient()->renderer()->HandleNavigation(frame, request, type, | |
Charlie Reis
2012/11/08 19:06:12
We do not want to do this when request.url() == GU
Marshall
2012/11/08 19:15:59
Done.
| |
2678 default_policy, | |
2679 is_redirect)) { | |
2680 return WebKit::WebNavigationPolicyIgnore; | |
2681 } | |
2682 | |
2677 Referrer referrer( | 2683 Referrer referrer( |
2678 GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))), | 2684 GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))), |
2679 GetReferrerPolicyFromRequest(frame, request)); | 2685 GetReferrerPolicyFromRequest(frame, request)); |
2680 | 2686 |
2681 if (is_swapped_out_) { | 2687 if (is_swapped_out_) { |
2682 if (request.url() != GURL(kSwappedOutURL)) { | 2688 if (request.url() != GURL(kSwappedOutURL)) { |
2683 // Targeted links may try to navigate a swapped out frame. Allow the | 2689 // 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 | 2690 // browser process to navigate the tab instead. Note that it is also |
2685 // possible for non-targeted navigations (from this view) to arrive | 2691 // 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 | 2692 // 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 Loading... | |
6343 } | 6349 } |
6344 #endif | 6350 #endif |
6345 | 6351 |
6346 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6352 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
6347 TransportDIB::Handle dib_handle) { | 6353 TransportDIB::Handle dib_handle) { |
6348 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6354 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
6349 RenderProcess::current()->ReleaseTransportDIB(dib); | 6355 RenderProcess::current()->ReleaseTransportDIB(dib); |
6350 } | 6356 } |
6351 | 6357 |
6352 } // namespace content | 6358 } // namespace content |
OLD | NEW |