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

Unified Diff: chrome/renderer/autofill/password_generation_manager.cc

Issue 10705006: Focus should be moved to the next input field after we generate the password. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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: chrome/renderer/autofill/password_generation_manager.cc
diff --git a/chrome/renderer/autofill/password_generation_manager.cc b/chrome/renderer/autofill/password_generation_manager.cc
index ac937607972b59d44288add572cc93f4b96ad5e3..1e7b6faa4c0a52336247bf0bdcb3778790bdf348 100644
--- a/chrome/renderer/autofill/password_generation_manager.cc
+++ b/chrome/renderer/autofill/password_generation_manager.cc
@@ -56,8 +56,9 @@ bool GetAccountCreationPasswordFields(
PasswordGenerationManager::PasswordGenerationManager(
content::RenderView* render_view)
: content::RenderViewObserver(render_view),
+ render_view_(render_view),
enabled_(false) {
- render_view->GetWebView()->addTextFieldDecoratorClient(this);
+ render_view_->GetWebView()->addTextFieldDecoratorClient(this);
}
PasswordGenerationManager::~PasswordGenerationManager() {}
@@ -189,6 +190,9 @@ void PasswordGenerationManager::OnPasswordAccepted(const string16& password) {
it != passwords_.end(); ++it) {
it->setValue(password);
it->setAutofilled(true);
+ // Advance focus to the next input field. We assume password fields in
+ // an account creation form are always adjacent.
+ render_view_->GetWebView()->advanceFocus(false);
}
}

Powered by Google App Engine
This is Rietveld 408576698