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

Unified Diff: ui/views/controls/textfield/native_textfield_gtk.cc

Issue 9117012: Rename visual style "password" to "obscured" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright 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/native_textfield_gtk.cc
diff --git a/ui/views/controls/textfield/native_textfield_gtk.cc b/ui/views/controls/textfield/native_textfield_gtk.cc
index 0316568b552a1e0f6ad16cc08523320248722a02..79d416b9e0ce78ea4453f5b85dd99637dc83b9d0 100644
--- a/ui/views/controls/textfield/native_textfield_gtk.cc
+++ b/ui/views/controls/textfield/native_textfield_gtk.cc
@@ -23,8 +23,8 @@
namespace views {
-// A character used to hide a text in password mode.
-static const char kPasswordChar = '*';
+// A character used to hide a text in obscured mode.
+static const char kObscuredChar = '*';
// Border width for GtkTextView.
const int kTextViewBorderWidth = 4;
@@ -166,10 +166,10 @@ void NativeTextfieldGtk::UpdateFont() {
pango_font_description_free(pfd);
}
-void NativeTextfieldGtk::UpdateIsPassword() {
+void NativeTextfieldGtk::UpdateIsObscured() {
if (!native_view())
return;
- gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsPassword());
+ gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsObscured());
}
void NativeTextfieldGtk::UpdateEnabled() {
@@ -399,7 +399,7 @@ void NativeTextfieldGtk::OnPasteClipboard(GtkWidget* widget) {
void NativeTextfieldGtk::CreateNativeControl() {
NativeControlCreated(gtk_views_entry_new(this));
gtk_entry_set_invisible_char(GTK_ENTRY(native_view()),
- static_cast<gunichar>(kPasswordChar));
+ static_cast<gunichar>(kObscuredChar));
textfield_->UpdateAllProperties();
}
@@ -424,8 +424,8 @@ void NativeTextfieldGtk::NativeControlCreated(GtkWidget* widget) {
G_CALLBACK(OnKeyPressEventAfterThunk), this);
}
-bool NativeTextfieldGtk::IsPassword() {
- return textfield_->IsPassword();
+bool NativeTextfieldGtk::IsObscured() {
+ return textfield_->IsObscured();
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « ui/views/controls/textfield/native_textfield_gtk.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698