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

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: 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_delegate.h" 8 #include "chrome/browser/password_manager/password_manager_delegate.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/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 popup_controller_ = 124 popup_controller_ =
125 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate( 125 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
126 popup_controller_, 126 popup_controller_,
127 element_bounds_in_screen_space, 127 element_bounds_in_screen_space,
128 form, 128 form,
129 password_generator_.get(), 129 password_generator_.get(),
130 driver_->GetPasswordManager(), 130 driver_->GetPasswordManager(),
131 observer_, 131 observer_,
132 web_contents_, 132 web_contents_,
133 web_contents_->GetView()->GetNativeView()); 133 web_contents_->GetView()->GetNativeView());
134 popup_controller_->Show(); 134 popup_controller_->Show(true /* display_password */);
135 #endif // #if defined(USE_AURA) 135 #endif // #if defined(USE_AURA)
136 } 136 }
137 137
138 void PasswordGenerationManager::OnShowPasswordEditingPopup( 138 void PasswordGenerationManager::OnShowPasswordEditingPopup(
139 const gfx::RectF& bounds) { 139 const gfx::RectF& bounds,
140 // TODO(gcasto): Enable this. 140 const autofill::PasswordForm& form) {
141 // Only implemented for Aura right now.
142 #if defined(USE_AURA)
143 gfx::RectF element_bounds_in_screen_space = GetBoundsInScreenSpace(bounds);
144
145 popup_controller_ =
146 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
147 popup_controller_,
148 element_bounds_in_screen_space,
149 form,
150 password_generator_.get(),
151 driver_->GetPasswordManager(),
152 observer_,
153 web_contents_,
154 web_contents_->GetView()->GetNativeView());
155 popup_controller_->Show(false /* display_password */);
156 #endif // #if defined(USE_AURA)
141 } 157 }
142 158
143 void PasswordGenerationManager::OnHidePasswordGenerationPopup() { 159 void PasswordGenerationManager::OnHidePasswordGenerationPopup() {
144 HidePopup(); 160 HidePopup();
145 } 161 }
146 162
147 void PasswordGenerationManager::HidePopup() { 163 void PasswordGenerationManager::HidePopup() {
148 if (popup_controller_) 164 if (popup_controller_)
149 popup_controller_->HideAndDestroy(); 165 popup_controller_->HideAndDestroy();
150 } 166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698