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

Side by Side 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: Comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/password_manager/password_generation_manager.h" 5 #include "chrome/browser/password_manager/password_generation_manager.h"
6 6
7 #include "chrome/browser/password_manager/password_manager.h" 7 #include "chrome/browser/password_manager/password_manager.h"
8 #include "chrome/browser/password_manager/password_manager_client.h" 8 #include "chrome/browser/password_manager/password_manager_client.h"
9 #include "chrome/browser/password_manager/password_manager_driver.h" 9 #include "chrome/browser/password_manager/password_manager_driver.h"
10 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h " 10 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h "
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 popup_controller_ = 107 popup_controller_ =
108 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate( 108 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
109 popup_controller_, 109 popup_controller_,
110 element_bounds_in_screen_space, 110 element_bounds_in_screen_space,
111 form, 111 form,
112 password_generator_.get(), 112 password_generator_.get(),
113 driver_->GetPasswordManager(), 113 driver_->GetPasswordManager(),
114 observer_, 114 observer_,
115 web_contents_, 115 web_contents_,
116 web_contents_->GetView()->GetNativeView()); 116 web_contents_->GetView()->GetNativeView());
117 popup_controller_->Show(); 117 popup_controller_->Show(true /* display_password */);
118 #endif // #if defined(USE_AURA) 118 #endif // #if defined(USE_AURA)
119 } 119 }
120 120
121 void PasswordGenerationManager::OnShowPasswordEditingPopup( 121 void PasswordGenerationManager::OnShowPasswordEditingPopup(
122 const gfx::RectF& bounds) { 122 const gfx::RectF& bounds,
123 // TODO(gcasto): Enable this. 123 const autofill::PasswordForm& form) {
124 // Only implemented for Aura right now.
125 #if defined(USE_AURA)
126 gfx::RectF element_bounds_in_screen_space = GetBoundsInScreenSpace(bounds);
127
128 popup_controller_ =
129 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
130 popup_controller_,
131 element_bounds_in_screen_space,
132 form,
133 password_generator_.get(),
134 driver_->GetPasswordManager(),
135 observer_,
136 web_contents_,
137 web_contents_->GetView()->GetNativeView());
138 popup_controller_->Show(false /* display_password */);
139 #endif // #if defined(USE_AURA)
124 } 140 }
125 141
126 void PasswordGenerationManager::OnHidePasswordGenerationPopup() { 142 void PasswordGenerationManager::OnHidePasswordGenerationPopup() {
127 HidePopup(); 143 HidePopup();
128 } 144 }
129 145
130 void PasswordGenerationManager::HidePopup() { 146 void PasswordGenerationManager::HidePopup() {
131 if (popup_controller_) 147 if (popup_controller_)
132 popup_controller_->HideAndDestroy(); 148 popup_controller_->HideAndDestroy();
133 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698