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

Side by Side Diff: chrome/browser/chromeos/options/passphrase_textfield.h

Issue 23522013: Show ****** in wifi passphrase field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert stub changes Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/wifi_config_view.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 (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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_ 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ui/views/controls/textfield/textfield.h" 10 #include "ui/views/controls/textfield/textfield.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 class PassphraseTextfield : public views::Textfield { 14 class PassphraseTextfield : public views::Textfield {
15 public: 15 public:
16 PassphraseTextfield(); 16 PassphraseTextfield();
17 17
18 // If show_fake is true, then the text field will show a fake password. 18 // If show_fake is true, then the text field will show a fake password.
19 void SetShowFake(bool show_fake); 19 void SetShowFake(bool show_fake);
20 20
21 // Override views::Textfield so that when focus is gained, then clear out the 21 // Override views::Textfield so that when focus is gained, then clear out the
22 // fake password if appropriate. Replace it when focus is lost if the user has 22 // fake password if appropriate. Replace it when focus is lost if the user has
23 // not typed in a new password. 23 // not typed in a new password.
24 virtual void OnFocus() OVERRIDE; 24 virtual void OnFocus() OVERRIDE;
25 virtual void OnBlur() OVERRIDE; 25 virtual void OnBlur() OVERRIDE;
26 26
27 // Returns the passphrase. If it's unchanged, then returns an empty string. 27 // Returns the passphrase. If it's unchanged, then returns an empty string.
28 std::string GetPassphrase(); 28 std::string GetPassphrase();
29 29
30 bool show_fake() const { return show_fake_; }
31
30 private: 32 private:
31 void SetFakePassphrase(); 33 void SetFakePassphrase();
32 void ClearFakePassphrase(); 34 void ClearFakePassphrase();
33 35
34 bool show_fake_; 36 bool show_fake_;
35 bool changed_; 37 bool changed_;
36 }; 38 };
37 39
38 } // namespace chromeos 40 } // namespace chromeos
39 41
40 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_ 42 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_PASSPHRASE_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/options/wifi_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698