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

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

Issue 147533005: [Password Generation] Update UI to match final mocks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replace_password_generation_ui
Patch Set: Created 6 years, 10 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.cc
diff --git a/components/autofill/content/renderer/password_generation_agent.cc b/components/autofill/content/renderer/password_generation_agent.cc
index f7e01d1ea6ab243b0ff2cf142aa2d1cc14f03e3d..ad25f765187cefb3f44ec6c56c60b054356d06b6 100644
--- a/components/autofill/content/renderer/password_generation_agent.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -282,7 +282,9 @@ void PasswordGenerationAgent::DetermineGenerationElement() {
}
void PasswordGenerationAgent::FocusedNodeChanged(const blink::WebNode& node) {
- // TODO(gcasto): Re-hide generation_element text.
+ if (!generation_element_.isNull())
+ generation_element_.setShouldRevealPassword(false);
+
if (node.isNull() || !node.isElementNode())
return;
@@ -295,7 +297,7 @@ void PasswordGenerationAgent::FocusedNodeChanged(const blink::WebNode& node) {
return;
if (password_is_generated_) {
- // TODO(gcasto): Make characters visible.
+ generation_element_.setShouldRevealPassword(true);
ShowEditingPopup();
}
@@ -319,8 +321,11 @@ bool PasswordGenerationAgent::TextDidChangeInTextField(
password_generation::PASSWORD_DELETED);
}
+ // Do not treat the password as generated.
// TODO(gcasto): Set PasswordForm::type in the browser to TYPE_NORMAL.
password_is_generated_ = false;
+ generation_element_.setShouldRevealPassword(false);
+
// Offer generation again.
ShowGenerationPopup();
} else if (!password_is_generated_) {

Powered by Google App Engine
This is Rietveld 408576698