diff options
author | yukawa@chromium.org <yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 01:44:39 +0000 |
---|---|---|
committer | yukawa@chromium.org <yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-22 01:44:39 +0000 |
commit | cf6cc2ee0f6a8267d5246f490421ac39b40f5b1c (patch) | |
tree | a8e3dae80b8783ab160c4337af91783359994ce4 /ui/views/controls/textfield/native_textfield_views.cc | |
parent | f67e18a5392f142f6d85e880c060ef5838f6bec2 (diff) | |
download | chromium_src-cf6cc2ee0f6a8267d5246f490421ac39b40f5b1c.zip chromium_src-cf6cc2ee0f6a8267d5246f490421ac39b40f5b1c.tar.gz chromium_src-cf6cc2ee0f6a8267d5246f490421ac39b40f5b1c.tar.bz2 |
Mark getter methods in ui::InputMethod as const
This CL marks following methods as "const-method"
as a preparation to fix issue 164964.
- ui::TextInputClient::GetCaretBounds
- ui::TextInputClient::GetCompositionCharacterBounds
- ui::TextInputClient::HasCompositionText
- ui::TextInputClient::GetTextRange
- ui::TextInputClient::GetCompositionTextRang
- ui::TextInputClient::GetSelectionRange
- ui::TextInputClient::GetTextFromRange
BUG=164964
TEST=none
Review URL: https://codereview.chromium.org/27812003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230001 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/textfield/native_textfield_views.cc')
-rw-r--r-- | ui/views/controls/textfield/native_textfield_views.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index 69f9ef5..3632638 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -979,7 +979,7 @@ bool NativeTextfieldViews::CanComposeInline() const { return true; } -gfx::Rect NativeTextfieldViews::GetCaretBounds() { +gfx::Rect NativeTextfieldViews::GetCaretBounds() const { // TextInputClient::GetCaretBounds is expected to return a value in screen // coordinates. gfx::Rect rect = GetRenderText()->GetUpdatedCursorBounds(); @@ -987,8 +987,9 @@ gfx::Rect NativeTextfieldViews::GetCaretBounds() { return rect; } -bool NativeTextfieldViews::GetCompositionCharacterBounds(uint32 index, - gfx::Rect* rect) { +bool NativeTextfieldViews::GetCompositionCharacterBounds( + uint32 index, + gfx::Rect* rect) const { DCHECK(rect); if (!HasCompositionText()) return false; @@ -1017,11 +1018,11 @@ bool NativeTextfieldViews::GetCompositionCharacterBounds(uint32 index, return true; } -bool NativeTextfieldViews::HasCompositionText() { +bool NativeTextfieldViews::HasCompositionText() const { return model_->HasCompositionText(); } -bool NativeTextfieldViews::GetTextRange(gfx::Range* range) { +bool NativeTextfieldViews::GetTextRange(gfx::Range* range) const { if (!ImeEditingAllowed()) return false; @@ -1029,7 +1030,7 @@ bool NativeTextfieldViews::GetTextRange(gfx::Range* range) { return true; } -bool NativeTextfieldViews::GetCompositionTextRange(gfx::Range* range) { +bool NativeTextfieldViews::GetCompositionTextRange(gfx::Range* range) const { if (!ImeEditingAllowed()) return false; @@ -1037,7 +1038,7 @@ bool NativeTextfieldViews::GetCompositionTextRange(gfx::Range* range) { return true; } -bool NativeTextfieldViews::GetSelectionRange(gfx::Range* range) { +bool NativeTextfieldViews::GetSelectionRange(gfx::Range* range) const { if (!ImeEditingAllowed()) return false; *range = GetSelectedRange(); @@ -1070,7 +1071,7 @@ bool NativeTextfieldViews::DeleteRange(const gfx::Range& range) { bool NativeTextfieldViews::GetTextFromRange( const gfx::Range& range, - string16* text) { + string16* text) const { if (!ImeEditingAllowed() || !range.IsValid()) return false; |