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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2724433002: Remove the retargeting notification (Closed)
Patch Set: Remove the retargeting notification Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 54a733eb163cf4165cebf0c2ad42255141c200eb..8dd4d83a348dc6e6679ea0060fede8cbbbc5ee9c 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2138,6 +2138,19 @@ void WebContentsImpl::CreateNewWindow(
params.frame_name, params.target_url, new_contents);
}
+ RenderFrameHost* source_render_frame_host =
+ RenderFrameHost::FromID(render_process_id, params.opener_render_frame_id);
+
+ if (source_render_frame_host) {
+ for (auto& observer : observers_) {
+ observer.DidOpenRequestedURL(new_contents, source_render_frame_host,
+ params.target_url, params.referrer,
+ params.disposition, ui::PAGE_TRANSITION_LINK,
+ false, // started_from_context_menu
+ true); // not_yet_in_tabstrip
+ }
+ }
+
if (params.opener_suppressed) {
// When the opener is suppressed, the original renderer cannot access the
// new window. As a result, we need to show and navigate the window here.
@@ -2600,7 +2613,7 @@ WebContents* WebContentsImpl::OpenURL(const OpenURLParams& params) {
observer.DidOpenRequestedURL(new_contents, source_render_frame_host,
params.url, params.referrer,
params.disposition, params.transition,
- params.started_from_context_menu);
+ params.started_from_context_menu, false);
}
}

Powered by Google App Engine
This is Rietveld 408576698