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

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

Issue 2724433002: Remove the retargeting notification (Closed)
Patch Set: Remove comments in safe browsing tests 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6749aafe832138b29352a637eb1107f508b56817..93fa595be3c986497352e9a0ec785ebee24a4f13 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); // renderer_initiated
+ }
+ }
+
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.
@@ -2609,7 +2622,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);
}
}
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698