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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 8748001: Make text input type and password visibility bit independent in Textfield (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 6c62fa727cb4e787bff6a96a407d03d79089611e..08dcc1472dc643893350d4459f77e8d609d8065d 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -52,7 +52,12 @@ class VIEWS_EXPORT Textfield : public View {
};
Textfield();
+
+ // The initial text input type is set to TEXT_INPUT_TYPE_PASSWORD
+ // if STYLE_OBSCURED is set in |style|. Otherwise it is set to
+ // TEXT_INPUT_TYPE_TEXT.
explicit Textfield(StyleFlags style);
+
virtual ~Textfield();
// TextfieldController accessors
@@ -64,14 +69,16 @@ class VIEWS_EXPORT Textfield : public View {
void SetReadOnly(bool read_only);
// Gets/sets the STYLE_OBSCURED bit, controlling whether characters in this
- // Textfield are displayed as asterisks/bullets.
+ // Textfield are displayed as asterisks/bullets. This does not affect the
+ // text input type.
// TODO(bryeung): Currently SetObscured is only used in
// chrome/browser/chromeos/options/wifi_config_view.cc, which is being
// converted to WebUI. Please remove it when that happens.
bool IsObscured() const;
void SetObscured(bool obscured);
- // Gets/Sets the input type of this textfield.
+ // Gets/Sets the input type of this textfield. TEXT_INPUT_TYPE_PASSWORD
+ // disables the IME, but does not hide the text (use STYLE_OBSCURED for that).
ui::TextInputType GetTextInputType() const;
void SetTextInputType(ui::TextInputType type);

Powered by Google App Engine
This is Rietveld 408576698