OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
846 void NativeTextfieldViews::OnInputMethodChanged() { | 846 void NativeTextfieldViews::OnInputMethodChanged() { |
847 NOTIMPLEMENTED(); | 847 NOTIMPLEMENTED(); |
848 } | 848 } |
849 | 849 |
850 bool NativeTextfieldViews::ChangeTextDirectionAndLayoutAlignment( | 850 bool NativeTextfieldViews::ChangeTextDirectionAndLayoutAlignment( |
851 base::i18n::TextDirection direction) { | 851 base::i18n::TextDirection direction) { |
852 NOTIMPLEMENTED(); | 852 NOTIMPLEMENTED(); |
853 return false; | 853 return false; |
854 } | 854 } |
855 | 855 |
856 void NativeTextfieldViews::ExtendSelectionAndDelete(int before, int after) { | |
857 NOTIMPLEMENTED(); | |
Yusuke Sato
2012/09/14 05:56:16
ditto. crbug,com bug #.
horo
2012/09/14 06:28:02
Done.
| |
858 } | |
859 | |
856 void NativeTextfieldViews::OnCompositionTextConfirmedOrCleared() { | 860 void NativeTextfieldViews::OnCompositionTextConfirmedOrCleared() { |
857 if (skip_input_method_cancel_composition_) | 861 if (skip_input_method_cancel_composition_) |
858 return; | 862 return; |
859 DCHECK(textfield_->GetInputMethod()); | 863 DCHECK(textfield_->GetInputMethod()); |
860 textfield_->GetInputMethod()->CancelComposition(textfield_); | 864 textfield_->GetInputMethod()->CancelComposition(textfield_); |
861 } | 865 } |
862 | 866 |
863 gfx::RenderText* NativeTextfieldViews::GetRenderText() const { | 867 gfx::RenderText* NativeTextfieldViews::GetRenderText() const { |
864 return model_->render_text(); | 868 return model_->render_text(); |
865 } | 869 } |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1218 // Filter out all control characters, including tab and new line characters, | 1222 // Filter out all control characters, including tab and new line characters, |
1219 // and all characters with Alt modifier. But we need to allow characters with | 1223 // and all characters with Alt modifier. But we need to allow characters with |
1220 // AltGr modifier. | 1224 // AltGr modifier. |
1221 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different | 1225 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different |
1222 // flag that we don't care about. | 1226 // flag that we don't care about. |
1223 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && | 1227 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && |
1224 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; | 1228 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; |
1225 } | 1229 } |
1226 | 1230 |
1227 } // namespace views | 1231 } // namespace views |
OLD | NEW |