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

Side by Side Diff: chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc

Issue 790783003: [Password Generation] Fix breakage that prevents filling of generated passwords (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_password_manager_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/password_generation_popup_controller_impl.h " 5 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h "
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 password_selected_ = selected; 143 password_selected_ = selected;
144 view_->PasswordSelectionUpdated(); 144 view_->PasswordSelectionUpdated();
145 view_->UpdateBoundsAndRedrawPopup(); 145 view_->UpdateBoundsAndRedrawPopup();
146 } 146 }
147 147
148 void PasswordGenerationPopupControllerImpl::PasswordAccepted() { 148 void PasswordGenerationPopupControllerImpl::PasswordAccepted() {
149 if (!display_password_) 149 if (!display_password_)
150 return; 150 return;
151 151
152 web_contents()->GetRenderViewHost()->Send( 152 driver_->GeneratedPasswordAccepted(current_password_);
153 new AutofillMsg_GeneratedPasswordAccepted(
154 web_contents()->GetRenderViewHost()->GetRoutingID(),
155 current_password_));
156 password_manager_->SetFormHasGeneratedPassword(driver_, form_); 153 password_manager_->SetFormHasGeneratedPassword(driver_, form_);
157 Hide(); 154 Hide();
158 } 155 }
159 156
160 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() { 157 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() {
161 // Minimum width in pixels. 158 // Minimum width in pixels.
162 const int minimum_width = 350; 159 const int minimum_width = 350;
163 160
164 // If the width of the field is longer than the minimum, use that instead. 161 // If the width of the field is longer than the minimum, use that instead.
165 return std::max(minimum_width, 162 return std::max(minimum_width,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 274
278 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 275 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
279 return help_text_; 276 return help_text_;
280 } 277 }
281 278
282 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 279 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
283 return link_range_; 280 return link_range_;
284 } 281 }
285 282
286 } // namespace autofill 283 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_password_manager_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698