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

Unified Diff: ui/gfx/render_text.h

Issue 2439693002: MacViews: Use bullets for displaying obscured text. (Closed)
Patch Set: Make kPasswordReplacementChar constexpr. Created 4 years, 2 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
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.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 a16d06351ea3d8770e2d3b3ae0e6482bb200d594..1e58742b51c8a4cf8322378d9eccdb9ea8e43ef2 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -209,6 +209,16 @@ void ApplyRenderParams(const FontRenderParams& params,
// for rendering and translation between logical and visual data.
class GFX_EXPORT RenderText {
public:
+// The character used for displaying obscured text.
+// TODO(benrg): GTK uses the first of U+25CF, U+2022, U+2731, U+273A, '*'
+// that's available in the font (find_invisible_char() in gtkentry.c).
+// Use a bullet character on Mac.
+#if defined(OS_MACOSX)
+ static constexpr base::char16 kPasswordReplacementChar = 0x2022;
+#else
+ static constexpr base::char16 kPasswordReplacementChar = '*';
+#endif
+
virtual ~RenderText();
// Creates a platform-specific or cross-platform RenderText instance.
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698