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

Unified Diff: chrome/browser/password_manager/password_generation_manager.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: Unittests 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: chrome/browser/password_manager/password_generation_manager.cc
diff --git a/chrome/browser/password_manager/password_generation_manager.cc b/chrome/browser/password_manager/password_generation_manager.cc
index e030b3b71cfaed7ee9747a2a100f058a28c7e302..2d895d3f31cbb27c115b13d5f491da2764dfab94 100644
--- a/chrome/browser/password_manager/password_generation_manager.cc
+++ b/chrome/browser/password_manager/password_generation_manager.cc
@@ -113,13 +113,29 @@ void PasswordGenerationManager::OnShowPasswordGenerationPopup(
observer_,
web_contents_,
web_contents_->GetView()->GetNativeView());
- popup_controller_->Show();
+ popup_controller_->Show(true /* display_password */);
#endif // #if defined(USE_AURA)
}
void PasswordGenerationManager::OnShowPasswordEditingPopup(
- const gfx::RectF& bounds) {
- // TODO(gcasto): Enable this.
+ const gfx::RectF& bounds,
+ const autofill::PasswordForm& form) {
+ // Only implemented for Aura right now.
+#if defined(USE_AURA)
+ gfx::RectF element_bounds_in_screen_space = GetBoundsInScreenSpace(bounds);
+
+ popup_controller_ =
+ autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
+ popup_controller_,
+ element_bounds_in_screen_space,
+ form,
+ password_generator_.get(),
+ driver_->GetPasswordManager(),
+ observer_,
+ web_contents_,
+ web_contents_->GetView()->GetNativeView());
+ popup_controller_->Show(false /* display_password */);
+#endif // #if defined(USE_AURA)
}
void PasswordGenerationManager::OnHidePasswordGenerationPopup() {

Powered by Google App Engine
This is Rietveld 408576698