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

Side by Side Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.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
« no previous file with comments | « chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc ('k') | no next file » | 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/views/autofill/password_generation_popup_view_views. h" 5 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_views. h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h" 8 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
9 #include "chrome/browser/ui/autofill/popup_constants.h" 9 #include "chrome/browser/ui/autofill/popup_constants.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 if (controller_->display_password()) 126 if (controller_->display_password())
127 CreatePasswordView(); 127 CreatePasswordView();
128 128
129 help_label_ = new views::StyledLabel(controller_->HelpText(), this); 129 help_label_ = new views::StyledLabel(controller_->HelpText(), this);
130 help_label_->SetBaseFontList(font_list_); 130 help_label_->SetBaseFontList(font_list_);
131 help_label_->SetLineHeight(20); 131 help_label_->SetLineHeight(20);
132 views::StyledLabel::RangeStyleInfo default_style; 132 views::StyledLabel::RangeStyleInfo default_style;
133 default_style.color = kExplanatoryTextColor; 133 default_style.color = kExplanatoryTextColor;
134 help_label_->SetDefaultStyle(default_style); 134 help_label_->SetDefaultStyle(default_style);
135 135
136 help_label_->AddStyleRange( 136 views::StyledLabel::RangeStyleInfo link_style =
137 controller_->HelpTextLinkRange(), 137 views::StyledLabel::RangeStyleInfo::CreateForLink();
138 views::StyledLabel::RangeStyleInfo::CreateForLink()); 138 link_style.disable_line_wrapping = false;
139 help_label_->AddStyleRange(controller_->HelpTextLinkRange(), link_style);
139 140
140 help_label_->set_background( 141 help_label_->set_background(
141 views::Background::CreateSolidBackground( 142 views::Background::CreateSolidBackground(
142 kExplanatoryTextBackgroundColor)); 143 kExplanatoryTextBackgroundColor));
143 help_label_->SetBorder(views::Border::CreateEmptyBorder( 144 help_label_->SetBorder(views::Border::CreateEmptyBorder(
144 PasswordGenerationPopupController::kHelpVerticalPadding - 145 PasswordGenerationPopupController::kHelpVerticalPadding -
145 kHelpVerticalOffset, 146 kHelpVerticalOffset,
146 PasswordGenerationPopupController::kHorizontalPadding, 147 PasswordGenerationPopupController::kHorizontalPadding,
147 PasswordGenerationPopupController::kHelpVerticalPadding - 148 PasswordGenerationPopupController::kHelpVerticalPadding -
148 kHelpVerticalOffset, 149 kHelpVerticalOffset,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 265
265 // If the top level widget can't be found, cancel the popup since we can't 266 // If the top level widget can't be found, cancel the popup since we can't
266 // fully set it up. 267 // fully set it up.
267 if (!observing_widget) 268 if (!observing_widget)
268 return NULL; 269 return NULL;
269 270
270 return new PasswordGenerationPopupViewViews(controller, observing_widget); 271 return new PasswordGenerationPopupViewViews(controller, observing_widget);
271 } 272 }
272 273
273 } // namespace autofill 274 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698