OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/controls/textfield/native_textfield_views.h" | 5 #include "views/controls/textfield/native_textfield_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "grit/app_strings.h" | 13 #include "grit/ui_strings.h" |
14 #include "ui/base/clipboard/clipboard.h" | 14 #include "ui/base/clipboard/clipboard.h" |
15 #include "ui/base/dragdrop/drag_drop_types.h" | 15 #include "ui/base/dragdrop/drag_drop_types.h" |
16 #include "ui/base/range/range.h" | 16 #include "ui/base/range/range.h" |
17 #include "ui/gfx/canvas.h" | 17 #include "ui/gfx/canvas.h" |
18 #include "ui/gfx/insets.h" | 18 #include "ui/gfx/insets.h" |
19 #include "views/background.h" | 19 #include "views/background.h" |
20 #include "views/border.h" | 20 #include "views/border.h" |
21 #include "views/controls/focusable_border.h" | 21 #include "views/controls/focusable_border.h" |
22 #include "views/controls/menu/menu_item_view.h" | 22 #include "views/controls/menu/menu_item_view.h" |
23 #include "views/controls/menu/menu_model_adapter.h" | 23 #include "views/controls/menu/menu_model_adapter.h" |
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 // Filter out all control characters, including tab and new line characters, | 1091 // Filter out all control characters, including tab and new line characters, |
1092 // and all characters with Alt modifier. But we need to allow characters with | 1092 // and all characters with Alt modifier. But we need to allow characters with |
1093 // AltGr modifier. | 1093 // AltGr modifier. |
1094 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different | 1094 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different |
1095 // flag that we don't care about. | 1095 // flag that we don't care about. |
1096 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && | 1096 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && |
1097 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; | 1097 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; |
1098 } | 1098 } |
1099 | 1099 |
1100 } // namespace views | 1100 } // namespace views |
OLD | NEW |