diff options
Diffstat (limited to 'views/controls/textfield')
-rw-r--r-- | views/controls/textfield/native_textfield_views.cc | 8 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_views.h | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/views/controls/textfield/native_textfield_views.cc b/views/controls/textfield/native_textfield_views.cc index 4950ebe..775308a 100644 --- a/views/controls/textfield/native_textfield_views.cc +++ b/views/controls/textfield/native_textfield_views.cc @@ -122,10 +122,6 @@ void NativeTextfieldViews::OnPaint(gfx::Canvas* canvas) { OnPaintBorder(canvas); } -void NativeTextfieldViews::OnBoundsChanged() { - UpdateCursorBoundsAndTextOffset(); -} - void NativeTextfieldViews::OnFocus() { NOTREACHED(); } @@ -406,6 +402,10 @@ void NativeTextfieldViews::SetEnableTextfieldViews(bool enabled) { textfield_view_enabled = enabled; } +void NativeTextfieldViews::OnBoundsChanged(const gfx::Rect& previous_bounds) { + UpdateCursorBoundsAndTextOffset(); +} + /////////////////////////////////////////////////////////////////////////////// // NativeTextfieldViews private: diff --git a/views/controls/textfield/native_textfield_views.h b/views/controls/textfield/native_textfield_views.h index 488551d..5a21596 100644 --- a/views/controls/textfield/native_textfield_views.h +++ b/views/controls/textfield/native_textfield_views.h @@ -54,7 +54,6 @@ class NativeTextfieldViews : public views::View, virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; - virtual void OnBoundsChanged() OVERRIDE; virtual void OnFocus() OVERRIDE; virtual void OnBlur() OVERRIDE; virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, @@ -119,6 +118,9 @@ class NativeTextfieldViews : public views::View, NONE, }; + protected: + // View override. + virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; private: friend class NativeTextfieldViewsTest; |