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

Side by Side Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.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: Merge 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/autofill/tab_autofill_manager_delegate.h" 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" 9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h"
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" 10 #include "chrome/browser/autofill/personal_data_manager_factory.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void TabAutofillManagerDelegate::UpdateAutofillPopupDataListValues( 137 void TabAutofillManagerDelegate::UpdateAutofillPopupDataListValues(
138 const std::vector<base::string16>& values, 138 const std::vector<base::string16>& values,
139 const std::vector<base::string16>& labels) { 139 const std::vector<base::string16>& labels) {
140 if (popup_controller_.get()) 140 if (popup_controller_.get())
141 popup_controller_->UpdateDataListValues(values, labels); 141 popup_controller_->UpdateDataListValues(values, labels);
142 } 142 }
143 143
144 void TabAutofillManagerDelegate::HideAutofillPopup() { 144 void TabAutofillManagerDelegate::HideAutofillPopup() {
145 if (popup_controller_.get()) 145 if (popup_controller_.get())
146 popup_controller_->Hide(); 146 popup_controller_->Hide();
147
148 // Password generation popups behave in the same fashion and should also
149 // be hidden.
150 PasswordGenerationManager* generation_manager =
151 PasswordGenerationManager::FromWebContents(web_contents_);
152 if (generation_manager)
153 generation_manager->HidePopup();
147 } 154 }
148 155
149 bool TabAutofillManagerDelegate::IsAutocompleteEnabled() { 156 bool TabAutofillManagerDelegate::IsAutocompleteEnabled() {
150 // For browser, Autocomplete is always enabled as part of Autofill. 157 // For browser, Autocomplete is always enabled as part of Autofill.
151 return GetPrefs()->GetBoolean(prefs::kAutofillEnabled); 158 return GetPrefs()->GetBoolean(prefs::kAutofillEnabled);
152 } 159 }
153 160
154 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() { 161 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() {
155 if (dialog_controller_.get()) 162 if (dialog_controller_.get())
156 dialog_controller_->Hide(); 163 dialog_controller_->Hide();
(...skipping 22 matching lines...) Expand all
179 186
180 void TabAutofillManagerDelegate::DetectAccountCreationForms( 187 void TabAutofillManagerDelegate::DetectAccountCreationForms(
181 const std::vector<autofill::FormStructure*>& forms) { 188 const std::vector<autofill::FormStructure*>& forms) {
182 PasswordGenerationManager* manager = 189 PasswordGenerationManager* manager =
183 PasswordGenerationManager::FromWebContents(web_contents_); 190 PasswordGenerationManager::FromWebContents(web_contents_);
184 if (manager) 191 if (manager)
185 manager->DetectAccountCreationForms(forms); 192 manager->DetectAccountCreationForms(forms);
186 } 193 }
187 194
188 } // namespace autofill 195 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698