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

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

Issue 11421204: Use native theme colors for textfields; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Textfield cursor visibility accessors for better NativeTextfieldViews impl. Created 8 years 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_views.h
diff --git a/ui/views/controls/textfield/native_textfield_views.h b/ui/views/controls/textfield/native_textfield_views.h
index 822bab88ed1f5598aa95eb225adba69a070e12b5..379e159ffc9fa0783b84cd1fbf4926608388b779 100644
--- a/ui/views/controls/textfield/native_textfield_views.h
+++ b/ui/views/controls/textfield/native_textfield_views.h
@@ -106,7 +106,6 @@ class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView,
virtual void UpdateBorder() OVERRIDE;
virtual void UpdateTextColor() OVERRIDE;
virtual void UpdateBackgroundColor() OVERRIDE;
- virtual void UpdateCursorColor() OVERRIDE;
virtual void UpdateReadOnly() OVERRIDE;
virtual void UpdateFont() OVERRIDE;
virtual void UpdateIsObscured() OVERRIDE;
@@ -123,6 +122,8 @@ class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView,
virtual void GetSelectionModel(gfx::SelectionModel* sel) const OVERRIDE;
virtual void SelectSelectionModel(const gfx::SelectionModel& sel) OVERRIDE;
virtual size_t GetCursorPosition() const OVERRIDE;
+ virtual bool GetCursorVisible() const OVERRIDE;
+ virtual void SetCursorVisible(bool visible) OVERRIDE;
virtual bool HandleKeyPressed(const ui::KeyEvent& e) OVERRIDE;
virtual bool HandleKeyReleased(const ui::KeyEvent& e) OVERRIDE;
virtual void HandleFocus() OVERRIDE;
@@ -191,6 +192,9 @@ class VIEWS_EXPORT NativeTextfieldViews : public TouchSelectionClientView,
// |textfield_| has STYLE_LOWERCASE style.
string16 GetTextForDisplay(const string16& text);
+ // Updates any colors that have not been explicitly set from the theme.
+ void UpdateColorsFromTheme(const ui::NativeTheme* theme);
+
// A callback function to periodically update the cursor state.
void UpdateCursor();

Powered by Google App Engine
This is Rietveld 408576698