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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2058693002: Do not suppress referrers for '<a ... rel="noopener">'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 // When the opener is suppressed, the original renderer cannot access the 2063 // When the opener is suppressed, the original renderer cannot access the
2064 // new window. As a result, we need to show and navigate the window here. 2064 // new window. As a result, we need to show and navigate the window here.
2065 bool was_blocked = false; 2065 bool was_blocked = false;
2066 if (delegate_) { 2066 if (delegate_) {
2067 gfx::Rect initial_rect; 2067 gfx::Rect initial_rect;
2068 delegate_->AddNewContents( 2068 delegate_->AddNewContents(
2069 this, new_contents, params.disposition, initial_rect, 2069 this, new_contents, params.disposition, initial_rect,
2070 params.user_gesture, &was_blocked); 2070 params.user_gesture, &was_blocked);
2071 } 2071 }
2072 if (!was_blocked) { 2072 if (!was_blocked) {
2073 OpenURLParams open_params(params.target_url, 2073 OpenURLParams open_params(params.target_url, params.referrer, CURRENT_TAB,
Mike West 2016/06/10 08:26:06 This is the only behavioral change in this patch;
2074 Referrer(),
2075 CURRENT_TAB,
2076 ui::PAGE_TRANSITION_LINK, 2074 ui::PAGE_TRANSITION_LINK,
2077 true /* is_renderer_initiated */); 2075 true /* is_renderer_initiated */);
2078 open_params.user_gesture = params.user_gesture; 2076 open_params.user_gesture = params.user_gesture;
2079 2077
2080 if (delegate_ && !is_guest && 2078 if (delegate_ && !is_guest &&
2081 !delegate_->ShouldResumeRequestsForCreatedWindow()) { 2079 !delegate_->ShouldResumeRequestsForCreatedWindow()) {
2082 // We are in asynchronous add new contents path, delay opening url 2080 // We are in asynchronous add new contents path, delay opening url
2083 new_contents->delayed_open_url_params_.reset( 2081 new_contents->delayed_open_url_params_.reset(
2084 new OpenURLParams(open_params)); 2082 new OpenURLParams(open_params));
2085 } else { 2083 } else {
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5130 for (RenderViewHost* render_view_host : render_view_host_set) 5128 for (RenderViewHost* render_view_host : render_view_host_set)
5131 render_view_host->OnWebkitPreferencesChanged(); 5129 render_view_host->OnWebkitPreferencesChanged();
5132 } 5130 }
5133 5131
5134 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5132 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5135 JavaScriptDialogManager* dialog_manager) { 5133 JavaScriptDialogManager* dialog_manager) {
5136 dialog_manager_ = dialog_manager; 5134 dialog_manager_ = dialog_manager;
5137 } 5135 }
5138 5136
5139 } // namespace content 5137 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698