| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE; | 191 virtual bool GetSelectionRange(gfx::Range* range) const OVERRIDE; |
| 192 virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; | 192 virtual bool SetSelectionRange(const gfx::Range& range) OVERRIDE; |
| 193 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; | 193 virtual bool DeleteRange(const gfx::Range& range) OVERRIDE; |
| 194 virtual bool GetTextFromRange(const gfx::Range& range, | 194 virtual bool GetTextFromRange(const gfx::Range& range, |
| 195 string16* text) const OVERRIDE; | 195 string16* text) const OVERRIDE; |
| 196 virtual void OnInputMethodChanged() OVERRIDE; | 196 virtual void OnInputMethodChanged() OVERRIDE; |
| 197 virtual bool ChangeTextDirectionAndLayoutAlignment( | 197 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 198 base::i18n::TextDirection direction) OVERRIDE; | 198 base::i18n::TextDirection direction) OVERRIDE; |
| 199 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; | 199 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; |
| 200 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; | 200 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; |
| 201 virtual void OnCandidateWindowShow() OVERRIDE {} |
| 202 virtual void OnCandidateWindowUpdate() OVERRIDE {} |
| 203 virtual void OnCandidateWindowHide() OVERRIDE {} |
| 201 | 204 |
| 202 // Overridden from TextfieldViewsModel::Delegate: | 205 // Overridden from TextfieldViewsModel::Delegate: |
| 203 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; | 206 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; |
| 204 | 207 |
| 205 // Returns the TextfieldViewsModel's text/cursor/selection rendering model. | 208 // Returns the TextfieldViewsModel's text/cursor/selection rendering model. |
| 206 gfx::RenderText* GetRenderText() const; | 209 gfx::RenderText* GetRenderText() const; |
| 207 | 210 |
| 208 // Converts |text| according to textfield style, e.g. lower case if | 211 // Converts |text| according to textfield style, e.g. lower case if |
| 209 // |textfield_| has STYLE_LOWERCASE style. | 212 // |textfield_| has STYLE_LOWERCASE style. |
| 210 string16 GetTextForDisplay(const string16& text); | 213 string16 GetTextForDisplay(const string16& text); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 // obscured text. When the timer is running, the last typed char is shown | 336 // obscured text. When the timer is running, the last typed char is shown |
| 334 // and when the time expires, the last typed char is obscured. | 337 // and when the time expires, the last typed char is obscured. |
| 335 base::OneShotTimer<NativeTextfieldViews> obscured_reveal_timer_; | 338 base::OneShotTimer<NativeTextfieldViews> obscured_reveal_timer_; |
| 336 | 339 |
| 337 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); | 340 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); |
| 338 }; | 341 }; |
| 339 | 342 |
| 340 } // namespace views | 343 } // namespace views |
| 341 | 344 |
| 342 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ | 345 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ |
| OLD | NEW |