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

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

Issue 2067993002: Revert of 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, params.referrer, CURRENT_TAB, 2073 OpenURLParams open_params(params.target_url,
2074 Referrer(),
2075 CURRENT_TAB,
2074 ui::PAGE_TRANSITION_LINK, 2076 ui::PAGE_TRANSITION_LINK,
2075 true /* is_renderer_initiated */); 2077 true /* is_renderer_initiated */);
2076 open_params.user_gesture = params.user_gesture; 2078 open_params.user_gesture = params.user_gesture;
2077 2079
2078 if (delegate_ && !is_guest && 2080 if (delegate_ && !is_guest &&
2079 !delegate_->ShouldResumeRequestsForCreatedWindow()) { 2081 !delegate_->ShouldResumeRequestsForCreatedWindow()) {
2080 // We are in asynchronous add new contents path, delay opening url 2082 // We are in asynchronous add new contents path, delay opening url
2081 new_contents->delayed_open_url_params_.reset( 2083 new_contents->delayed_open_url_params_.reset(
2082 new OpenURLParams(open_params)); 2084 new OpenURLParams(open_params));
2083 } else { 2085 } else {
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5128 for (RenderViewHost* render_view_host : render_view_host_set) 5130 for (RenderViewHost* render_view_host : render_view_host_set)
5129 render_view_host->OnWebkitPreferencesChanged(); 5131 render_view_host->OnWebkitPreferencesChanged();
5130 } 5132 }
5131 5133
5132 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5134 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5133 JavaScriptDialogManager* dialog_manager) { 5135 JavaScriptDialogManager* dialog_manager) {
5134 dialog_manager_ = dialog_manager; 5136 dialog_manager_ = dialog_manager;
5135 } 5137 }
5136 5138
5137 } // namespace content 5139 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698