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

Side by Side Diff: chrome/browser/ui/views/password_generation_bubble_view.cc

Issue 138363004: Views Textfield fixes and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase. Created 6 years, 11 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 | Annotate | Revision Log
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/views/password_generation_bubble_view.h" 5 #include "chrome/browser/ui/views/password_generation_bubble_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/password_manager/password_manager.h" 8 #include "chrome/browser/password_manager/password_manager.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 regenerate_button_->SetImage( 161 regenerate_button_->SetImage(
162 views::CustomButton::STATE_HOVERED, 162 views::CustomButton::STATE_HOVERED,
163 theme_provider_->GetImageSkiaNamed(IDR_RELOAD)); 163 theme_provider_->GetImageSkiaNamed(IDR_RELOAD));
164 regenerate_button_->SetImage( 164 regenerate_button_->SetImage(
165 views::CustomButton::STATE_PRESSED, 165 views::CustomButton::STATE_PRESSED,
166 theme_provider_->GetImageSkiaNamed(IDR_RELOAD)); 166 theme_provider_->GetImageSkiaNamed(IDR_RELOAD));
167 167
168 textfield_ = new views::Textfield(); 168 textfield_ = new views::Textfield();
169 textfield_->set_default_width_in_chars(kDefaultTextFieldChars); 169 textfield_->set_default_width_in_chars(kDefaultTextFieldChars);
170 textfield_->SetText(base::ASCIIToUTF16(password_generator_->Generate())); 170 textfield_->SetText(base::ASCIIToUTF16(password_generator_->Generate()));
171 textfield_->SetController(this); 171 textfield_->set_controller(this);
172 172
173 textfield_wrapper_ = new TextfieldWrapper(textfield_, 173 textfield_wrapper_ = new TextfieldWrapper(textfield_,
174 regenerate_button_); 174 regenerate_button_);
175 AddChildView(textfield_wrapper_); 175 AddChildView(textfield_wrapper_);
176 176
177 accept_button_ = new views::LabelButton( 177 accept_button_ = new views::LabelButton(
178 this, 178 this,
179 l10n_util::GetStringUTF16(IDS_PASSWORD_GENERATION_BUTTON_TEXT)); 179 l10n_util::GetStringUTF16(IDS_PASSWORD_GENERATION_BUTTON_TEXT));
180 accept_button_->SetStyle(views::Button::STYLE_BUTTON); 180 accept_button_->SetStyle(views::Button::STYLE_BUTTON);
181 AddChildView(accept_button_); 181 AddChildView(accept_button_);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return false; 242 return false;
243 } 243 }
244 244
245 views::View* PasswordGenerationBubbleView::GetInitiallyFocusedView() { 245 views::View* PasswordGenerationBubbleView::GetInitiallyFocusedView() {
246 return textfield_; 246 return textfield_;
247 } 247 }
248 248
249 void PasswordGenerationBubbleView::WindowClosing() { 249 void PasswordGenerationBubbleView::WindowClosing() {
250 autofill::password_generation::LogUserActions(actions_); 250 autofill::password_generation::LogUserActions(actions_);
251 } 251 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/views/pdf_password_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698