Index: components/autofill/content/renderer/autofill_agent.h |
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h |
index fd3cbef81a9d02c2c4976db43b307c9eebdf4f8b..f22ca0c31a7c371838f8bf772a3b23006b590ede 100644 |
--- a/components/autofill/content/renderer/autofill_agent.h |
+++ b/components/autofill/content/renderer/autofill_agent.h |
@@ -73,6 +73,10 @@ class AutofillAgent : public content::RenderFrameObserver, |
LegacyAutofillAgent(content::RenderView* render_view, AutofillAgent* agent); |
~LegacyAutofillAgent() override; |
+ // Shuts the LegacyAutofillAgent down on RenderFrame deletion. Safe to call |
+ // multiple times. |
+ void Shutdown(); |
+ |
private: |
// content::RenderViewObserver: |
void OnDestruct() override; |
@@ -121,6 +125,11 @@ class AutofillAgent : public content::RenderFrameObserver, |
void WillSubmitForm(const blink::WebFormElement& form) override; |
void DidChangeScrollOffset() override; |
void FocusedNodeChanged(const blink::WebNode& node) override; |
+ void OnDestruct() override; |
+ |
+ // Shuts the AutofillAgent down on RenderFrame deletion. Safe to call multiple |
+ // times. |
+ void Shutdown(); |
// Pass-through from LegacyAutofillAgent. This correlates with the |
// RenderViewObserver method. |