| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |