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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 866633002: partial PageClickTracker migration to RenderFrameObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make test happy Created 5 years, 11 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: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 579433479322088ba71410a13d2d0ec589c8ecbb..33d8e72dbb7e72b771dd8d61ea0a13e8fa26e383 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -138,7 +138,6 @@ AutofillAgent::AutofillAgent(content::RenderFrame* render_frame,
password_autofill_agent_(password_autofill_agent),
password_generation_agent_(password_generation_agent),
legacy_(render_frame->GetRenderView(), this),
- page_click_tracker_(render_frame->GetRenderView(), this),
autofill_query_id_(0),
display_warning_if_disabled_(false),
was_query_node_autofilled_(false),
@@ -148,6 +147,10 @@ AutofillAgent::AutofillAgent(content::RenderFrame* render_frame,
is_popup_possibly_visible_(false),
weak_ptr_factory_(this) {
render_frame->GetWebFrame()->setAutofillClient(this);
+
+ // This owns itself, and will delete itself when |render_frame| is destructed
+ // (same as AutofillAgent).
+ new PageClickTracker(render_frame, this);
}
AutofillAgent::~AutofillAgent() {}
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | components/autofill/content/renderer/page_click_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698