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

Unified Diff: components/autofill/content/renderer/password_generation_agent.h

Issue 662493002: [Password Generation] Enable generation for dynamically created forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 2 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/password_generation_agent.h
diff --git a/components/autofill/content/renderer/password_generation_agent.h b/components/autofill/content/renderer/password_generation_agent.h
index ce85e7e49f7d2577e4ecc51a3aa28a9be04da15b..d0b7097cf5d07ec31389c9d3a1c7a6dac7ba5fed 100644
--- a/components/autofill/content/renderer/password_generation_agent.h
+++ b/components/autofill/content/renderer/password_generation_agent.h
@@ -39,6 +39,9 @@ class PasswordGenerationAgent : public content::RenderViewObserver {
// Returns true if the newly focused node caused the generation UI to show.
bool FocusedNodeHasChanged(const blink::WebNode& node);
+ // Called when new form controls are inserted.
+ void OnDynamicFormsSeen(blink::WebLocalFrame* frame);
+
// The length that a password can be before the UI is hidden.
static const size_t kMaximumOfferSize = 5;
@@ -64,6 +67,10 @@ class PasswordGenerationAgent : public content::RenderViewObserver {
void OnAccountCreationFormsDetected(
const std::vector<autofill::FormData>& forms);
+ // Helper function that will try and populate |password_elements_| and
+ // |possible_account_creation_form_|.
+ void FindPossibleGenerationForm(blink::WebLocalFrame* frame);
+
// Helper function to decide if |passwords_| contains password fields for
// an account creation form. Sets |generation_element_| to the field that
// we want to trigger the generation UI on.

Powered by Google App Engine
This is Rietveld 408576698