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

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

Issue 542823002: [Password Generation] Update text for generation popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 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/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 web_contents()->GetRenderViewHost()->Send( 149 web_contents()->GetRenderViewHost()->Send(
150 new AutofillMsg_GeneratedPasswordAccepted( 150 new AutofillMsg_GeneratedPasswordAccepted(
151 web_contents()->GetRenderViewHost()->GetRoutingID(), 151 web_contents()->GetRenderViewHost()->GetRoutingID(),
152 current_password_)); 152 current_password_));
153 password_manager_->SetFormHasGeneratedPassword(form_); 153 password_manager_->SetFormHasGeneratedPassword(form_);
154 Hide(); 154 Hide();
155 } 155 }
156 156
157 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() { 157 int PasswordGenerationPopupControllerImpl::GetMinimumWidth() {
158 // Minimum width in pixels. 158 // Minimum width in pixels.
159 const int minimum_width = 360; 159 const int minimum_width = 350;
160 160
161 // 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.
162 return std::max(minimum_width, 162 return std::max(minimum_width,
163 controller_common_.RoundedElementBounds().width()); 163 controller_common_.RoundedElementBounds().width());
164 } 164 }
165 165
166 void PasswordGenerationPopupControllerImpl::CalculateBounds() { 166 void PasswordGenerationPopupControllerImpl::CalculateBounds() {
167 gfx::Size bounds = view_->GetPreferredSizeOfPasswordView(); 167 gfx::Size bounds = view_->GetPreferredSizeOfPasswordView();
168 168
169 popup_bounds_ = controller_common_.GetPopupBounds(bounds.width(), 169 popup_bounds_ = controller_common_.GetPopupBounds(bounds.width(),
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() { 265 const base::string16& PasswordGenerationPopupControllerImpl::HelpText() {
266 return help_text_; 266 return help_text_;
267 } 267 }
268 268
269 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() { 269 const gfx::Range& PasswordGenerationPopupControllerImpl::HelpTextLinkRange() {
270 return link_range_; 270 return link_range_;
271 } 271 }
272 272
273 } // namespace autofill 273 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698