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

Side by Side Diff: ui/views/controls/textfield/native_textfield_gtk.h

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 unified diff | Download patch | Annotate | Revision Log
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 UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 26 matching lines...) Expand all
37 virtual void UpdateText() OVERRIDE; 37 virtual void UpdateText() OVERRIDE;
38 virtual void AppendText(const string16& text) OVERRIDE; 38 virtual void AppendText(const string16& text) OVERRIDE;
39 virtual string16 GetSelectedText() const OVERRIDE; 39 virtual string16 GetSelectedText() const OVERRIDE;
40 virtual void SelectAll() OVERRIDE; 40 virtual void SelectAll() OVERRIDE;
41 virtual void ClearSelection() OVERRIDE; 41 virtual void ClearSelection() OVERRIDE;
42 virtual void UpdateBorder() OVERRIDE; 42 virtual void UpdateBorder() OVERRIDE;
43 virtual void UpdateTextColor() OVERRIDE; 43 virtual void UpdateTextColor() OVERRIDE;
44 virtual void UpdateBackgroundColor() OVERRIDE; 44 virtual void UpdateBackgroundColor() OVERRIDE;
45 virtual void UpdateReadOnly() OVERRIDE; 45 virtual void UpdateReadOnly() OVERRIDE;
46 virtual void UpdateFont() OVERRIDE; 46 virtual void UpdateFont() OVERRIDE;
47 virtual void UpdateIsPassword() OVERRIDE; 47 virtual void UpdateIsObscured() OVERRIDE;
48 virtual void UpdateEnabled() OVERRIDE; 48 virtual void UpdateEnabled() OVERRIDE;
49 virtual gfx::Insets CalculateInsets() OVERRIDE; 49 virtual gfx::Insets CalculateInsets() OVERRIDE;
50 virtual void UpdateHorizontalMargins() OVERRIDE; 50 virtual void UpdateHorizontalMargins() OVERRIDE;
51 virtual void UpdateVerticalMargins() OVERRIDE; 51 virtual void UpdateVerticalMargins() OVERRIDE;
52 virtual bool SetFocus() OVERRIDE; 52 virtual bool SetFocus() OVERRIDE;
53 virtual View* GetView() OVERRIDE; 53 virtual View* GetView() OVERRIDE;
54 virtual gfx::NativeView GetTestingHandle() const OVERRIDE; 54 virtual gfx::NativeView GetTestingHandle() const OVERRIDE;
55 virtual bool IsIMEComposing() const OVERRIDE; 55 virtual bool IsIMEComposing() const OVERRIDE;
56 virtual void GetSelectedRange(ui::Range* range) const OVERRIDE; 56 virtual void GetSelectedRange(ui::Range* range) const OVERRIDE;
57 virtual void SelectRange(const ui::Range& range) OVERRIDE; 57 virtual void SelectRange(const ui::Range& range) OVERRIDE;
58 virtual void GetSelectionModel(gfx::SelectionModel* sel) const OVERRIDE; 58 virtual void GetSelectionModel(gfx::SelectionModel* sel) const OVERRIDE;
59 virtual void SelectSelectionModel(const gfx::SelectionModel& sel) OVERRIDE; 59 virtual void SelectSelectionModel(const gfx::SelectionModel& sel) OVERRIDE;
60 virtual size_t GetCursorPosition() const OVERRIDE; 60 virtual size_t GetCursorPosition() const OVERRIDE;
61 virtual bool HandleKeyPressed(const views::KeyEvent& e) OVERRIDE; 61 virtual bool HandleKeyPressed(const views::KeyEvent& e) OVERRIDE;
62 virtual bool HandleKeyReleased(const views::KeyEvent& e) OVERRIDE; 62 virtual bool HandleKeyReleased(const views::KeyEvent& e) OVERRIDE;
63 virtual void HandleFocus() OVERRIDE; 63 virtual void HandleFocus() OVERRIDE;
64 virtual void HandleBlur() OVERRIDE; 64 virtual void HandleBlur() OVERRIDE;
65 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; 65 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
66 virtual void ApplyStyleRange(const gfx::StyleRange& style) OVERRIDE; 66 virtual void ApplyStyleRange(const gfx::StyleRange& style) OVERRIDE;
67 virtual void ApplyDefaultStyle() OVERRIDE; 67 virtual void ApplyDefaultStyle() OVERRIDE;
68 virtual void ClearEditHistory() OVERRIDE; 68 virtual void ClearEditHistory() OVERRIDE;
69 virtual int GetFontHeight() OVERRIDE; 69 virtual int GetFontHeight() OVERRIDE;
70 70
71 // Overridden from NativeControlGtk: 71 // Overridden from NativeControlGtk:
72 virtual void CreateNativeControl() OVERRIDE; 72 virtual void CreateNativeControl() OVERRIDE;
73 virtual void NativeControlCreated(GtkWidget* widget) OVERRIDE; 73 virtual void NativeControlCreated(GtkWidget* widget) OVERRIDE;
74 74
75 // Returns true if the textfield is for password. 75 // Returns true if the textfield is obscured (shown as *****).
76 bool IsPassword(); 76 bool IsObscured();
77 77
78 private: 78 private:
79 // Gtk signal callbacks. 79 // Gtk signal callbacks.
80 CHROMEGTK_CALLBACK_0(NativeTextfieldGtk, void, OnActivate); 80 CHROMEGTK_CALLBACK_0(NativeTextfieldGtk, void, OnActivate);
81 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnButtonPressEvent, 81 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnButtonPressEvent,
82 GdkEventButton*); 82 GdkEventButton*);
83 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnButtonReleaseEventAfter, 83 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnButtonReleaseEventAfter,
84 GdkEventButton*); 84 GdkEventButton*);
85 CHROMEG_CALLBACK_0(NativeTextfieldGtk, void, OnChanged, GObject*); 85 CHROMEG_CALLBACK_0(NativeTextfieldGtk, void, OnChanged, GObject*);
86 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnKeyPressEvent, 86 CHROMEGTK_CALLBACK_1(NativeTextfieldGtk, gboolean, OnKeyPressEvent,
(...skipping 10 matching lines...) Expand all
97 // The actual paste clipboard action might be performed later if the 97 // The actual paste clipboard action might be performed later if the
98 // clipboard is not empty. 98 // clipboard is not empty.
99 bool paste_clipboard_requested_; 99 bool paste_clipboard_requested_;
100 100
101 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldGtk); 101 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldGtk);
102 }; 102 };
103 103
104 } // namespace views 104 } // namespace views
105 105
106 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_ 106 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_view.cc ('k') | ui/views/controls/textfield/native_textfield_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698