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

Side by Side Diff: ui/views/controls/textfield/native_textfield_views.cc

Issue 22401002: Add GetTextInputMode function to TextInputClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build failure on win Created 7 years, 4 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
OLDNEW
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 #include "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 956 }
957 957
958 ui::TextInputType NativeTextfieldViews::GetTextInputType() const { 958 ui::TextInputType NativeTextfieldViews::GetTextInputType() const {
959 return textfield_->GetTextInputType(); 959 return textfield_->GetTextInputType();
960 } 960 }
961 961
962 bool NativeTextfieldViews::CanComposeInline() const { 962 bool NativeTextfieldViews::CanComposeInline() const {
963 return true; 963 return true;
964 } 964 }
965 965
966 ui::TextInputMode NativeTextfieldViews::GetTextInputMode() const {
967 return ui::TEXT_INPUT_MODE_DEFAULT;
968 }
969
966 gfx::Rect NativeTextfieldViews::GetCaretBounds() { 970 gfx::Rect NativeTextfieldViews::GetCaretBounds() {
967 // TextInputClient::GetCaretBounds is expected to return a value in screen 971 // TextInputClient::GetCaretBounds is expected to return a value in screen
968 // coordinates. 972 // coordinates.
969 gfx::Rect rect = GetRenderText()->GetUpdatedCursorBounds(); 973 gfx::Rect rect = GetRenderText()->GetUpdatedCursorBounds();
970 ConvertRectToScreen(this, &rect); 974 ConvertRectToScreen(this, &rect);
971 return rect; 975 return rect;
972 } 976 }
973 977
974 bool NativeTextfieldViews::GetCompositionCharacterBounds(uint32 index, 978 bool NativeTextfieldViews::GetCompositionCharacterBounds(uint32 index,
975 gfx::Rect* rect) { 979 gfx::Rect* rect) {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 if (index != -1) { 1498 if (index != -1) {
1495 obscured_reveal_timer_.Start( 1499 obscured_reveal_timer_.Start(
1496 FROM_HERE, 1500 FROM_HERE,
1497 duration, 1501 duration,
1498 base::Bind(&NativeTextfieldViews::RevealObscuredChar, 1502 base::Bind(&NativeTextfieldViews::RevealObscuredChar,
1499 base::Unretained(this), -1, base::TimeDelta())); 1503 base::Unretained(this), -1, base::TimeDelta()));
1500 } 1504 }
1501 } 1505 }
1502 1506
1503 } // namespace views 1507 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698