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

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/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/profile_sync_service.h" 9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/profile_sync_service_factory.h" 10 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 popup_controller_ = 137 popup_controller_ =
138 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate( 138 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
139 popup_controller_, 139 popup_controller_,
140 element_bounds_in_screen_space, 140 element_bounds_in_screen_space,
141 form, 141 form,
142 password_generator_.get(), 142 password_generator_.get(),
143 PasswordManager::FromWebContents(web_contents()), 143 PasswordManager::FromWebContents(web_contents()),
144 observer_, 144 observer_,
145 web_contents(), 145 web_contents(),
146 web_contents()->GetView()->GetNativeView()); 146 web_contents()->GetView()->GetNativeView());
147 popup_controller_->Show(); 147 popup_controller_->Show(true /* display_password */);
148 #endif // #if defined(USE_AURA) 148 #endif // #if defined(USE_AURA)
149 } 149 }
150 150
151 void PasswordGenerationManager::OnShowPasswordEditingPopup( 151 void PasswordGenerationManager::OnShowPasswordEditingPopup(
152 const gfx::RectF& bounds) { 152 const gfx::RectF& bounds) {
153 // TODO(gcasto): Enable this. 153 // Only implemented for Aura right now.
154 #if defined(USE_AURA)
155 gfx::RectF element_bounds_in_screen_space = GetBoundsInScreenSpace(bounds);
156
157 popup_controller_ =
158 autofill::PasswordGenerationPopupControllerImpl::GetOrCreate(
159 popup_controller_,
160 element_bounds_in_screen_space,
161 NULL,
162 NULL,
163 NULL,
164 observer_,
165 web_contents(),
166 web_contents()->GetView()->GetNativeView());
167 popup_controller_->Show(false /* display_password */);
168 #endif // #if defined(USE_AURA)
154 } 169 }
155 170
156 void PasswordGenerationManager::OnHidePasswordGenerationPopup() { 171 void PasswordGenerationManager::OnHidePasswordGenerationPopup() {
157 HidePopup(); 172 HidePopup();
158 } 173 }
159 174
160 void PasswordGenerationManager::HidePopup() { 175 void PasswordGenerationManager::HidePopup() {
161 if (popup_controller_) 176 if (popup_controller_)
162 popup_controller_->HideAndDestroy(); 177 popup_controller_->HideAndDestroy();
163 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698