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

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: Better 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 4b3aad578b663d633050f99dbc7f96ea9ead5470..4d38b5b3c27d60da54c5497749c0c96973bb9b17 100644
--- a/components/autofill/content/renderer/password_generation_agent.h
+++ b/components/autofill/content/renderer/password_generation_agent.h
@@ -38,6 +38,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;
@@ -63,6 +66,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