| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index b78531b24dcc3d46317e6e1fb898677aa5908944..80856925be3bfc6d04e4ec8af06918bd57dc4fc5 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -2864,7 +2864,13 @@ void RenderViewImpl::loadURLExternally(
|
| WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
|
| WebFrame* frame, const WebURLRequest& request, WebNavigationType type,
|
| WebNavigationPolicy default_policy, bool is_redirect) {
|
| - if (request.url() != GURL(kSwappedOutURL) &&
|
| + // Webkit is asking whether to navigate to a new URL.
|
| + // This is fine normally, except if we're showing UI from one security
|
| + // context and they're trying to navigate to a different context.
|
| +
|
| + const GURL& url = request.url();
|
| +
|
| + if (url != GURL(kSwappedOutURL) &&
|
| GetContentClient()->renderer()->HandleNavigation(frame, request, type,
|
| default_policy,
|
| is_redirect)) {
|
| @@ -2876,7 +2882,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
|
| GetReferrerPolicyFromRequest(frame, request));
|
|
|
| if (is_swapped_out_) {
|
| - if (request.url() != GURL(kSwappedOutURL)) {
|
| + if (url != GURL(kSwappedOutURL)) {
|
| // Targeted links may try to navigate a swapped out frame. Allow the
|
| // browser process to navigate the tab instead. Note that it is also
|
| // possible for non-targeted navigations (from this view) to arrive
|
| @@ -2885,7 +2891,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
|
| // TODO(creis): Ensure this supports targeted form submissions when
|
| // fixing http://crbug.com/101395.
|
| if (frame->parent() == NULL) {
|
| - OpenURL(frame, request.url(), referrer, default_policy);
|
| + OpenURL(frame, url, referrer, default_policy);
|
| return WebKit::WebNavigationPolicyIgnore; // Suppress the load here.
|
| }
|
|
|
| @@ -2898,11 +2904,6 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation(
|
| return default_policy;
|
| }
|
|
|
| - // Webkit is asking whether to navigate to a new URL.
|
| - // This is fine normally, except if we're showing UI from one security
|
| - // context and they're trying to navigate to a different context.
|
| - const GURL& url = request.url();
|
| -
|
| // A content initiated navigation may have originated from a link-click,
|
| // script, drag-n-drop operation, etc.
|
| bool is_content_initiated =
|
|
|