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

Unified Diff: ui/gfx/render_text.h

Issue 8747001: Reintroduce password support to NativeTextfieldViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rerebase Created 9 years, 1 month 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
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index da3607d9e11f8ed7109d2033f28903f7171b9d19..4b29f8f8ef77d3fc1ffc571237d9742e94d6a4a4 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -42,6 +42,7 @@ struct UI_EXPORT StyleRange {
SkColor foreground;
bool strike;
bool underline;
+ bool password; // make all glyphs look the same (password mode)
ui::Range range;
};
@@ -73,6 +74,10 @@ class UI_EXPORT RenderText {
const string16& text() const { return text_; }
void SetText(const string16& text);
+ // Like text() except that regions with the password property set are
+ // replaced with asterisks or bullets.
+ string16 GetCensoredText() const;
+
const SelectionModel& selection_model() const { return selection_model_; }
bool cursor_visible() const { return cursor_visible_; }
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698