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

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: Reorder declaration 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 // IME may want to interact with the native view of [NativeWidget A] rather 952 // IME may want to interact with the native view of [NativeWidget A] rather
953 // than that of [NativeWidget B]. This is why we need to call 953 // than that of [NativeWidget B]. This is why we need to call
954 // GetTopLevelWidget() here. 954 // GetTopLevelWidget() here.
955 return GetWidget()->GetTopLevelWidget()->GetNativeView(); 955 return GetWidget()->GetTopLevelWidget()->GetNativeView();
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 ui::TextInputMode NativeTextfieldViews::GetTextInputMode() const {
963 return ui::TEXT_INPUT_MODE_DEFAULT;
964 }
965
962 bool NativeTextfieldViews::CanComposeInline() const { 966 bool NativeTextfieldViews::CanComposeInline() const {
963 return true; 967 return true;
964 } 968 }
965 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;
(...skipping 522 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
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.h ('k') | ui/views/ime/input_method_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698