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

Side by Side Diff: chrome/browser/chromeos/options/passphrase_textfield.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
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/vpn_config_view.cc » ('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 (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/chromeos/options/passphrase_textfield.h" 5 #include "chrome/browser/chromeos/options/passphrase_textfield.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 8
9 namespace chromeos { 9 namespace chromeos {
10 10
11 PassphraseTextfield::PassphraseTextfield() 11 PassphraseTextfield::PassphraseTextfield()
12 : Textfield(views::Textfield::STYLE_OBSCURED), 12 : Textfield(),
13 show_fake_(false), 13 show_fake_(false),
14 changed_(true) { 14 changed_(true) {
15 SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
15 } 16 }
16 17
17 void PassphraseTextfield::SetShowFake(bool show_fake) { 18 void PassphraseTextfield::SetShowFake(bool show_fake) {
18 show_fake_ = show_fake; 19 show_fake_ = show_fake;
19 if (show_fake_) 20 if (show_fake_)
20 SetFakePassphrase(); 21 SetFakePassphrase();
21 else 22 else
22 ClearFakePassphrase(); 23 ClearFakePassphrase();
23 } 24 }
24 25
(...skipping 21 matching lines...) Expand all
46 SetText(fake_passphrase); 47 SetText(fake_passphrase);
47 changed_ = false; 48 changed_ = false;
48 } 49 }
49 50
50 void PassphraseTextfield::ClearFakePassphrase() { 51 void PassphraseTextfield::ClearFakePassphrase() {
51 SetText(base::string16()); 52 SetText(base::string16());
52 changed_ = true; 53 changed_ = true;
53 } 54 }
54 55
55 } // namespace chromeos 56 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/vpn_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698