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/textfield.h" | 5 #include "ui/views/controls/textfield/textfield.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "grit/ui_strings.h" | 10 #include "grit/ui_strings.h" |
11 #include "ui/accessibility/ax_view_state.h" | 11 #include "ui/accessibility/ax_view_state.h" |
12 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 12 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
13 #include "ui/base/cursor/cursor.h" | 13 #include "ui/base/cursor/cursor.h" |
14 #include "ui/base/dragdrop/drag_drop_types.h" | 14 #include "ui/base/dragdrop/drag_drop_types.h" |
15 #include "ui/base/dragdrop/drag_utils.h" | 15 #include "ui/base/dragdrop/drag_utils.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/base/ui_base_switches_util.h" | 17 #include "ui/base/ui_base_switches_util.h" |
18 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 18 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
19 #include "ui/events/event.h" | 19 #include "ui/events/event.h" |
20 #include "ui/events/keycodes/keyboard_codes.h" | 20 #include "ui/events/keycodes/keyboard_codes.h" |
21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
22 #include "ui/gfx/display.h" | 22 #include "ui/gfx/display.h" |
23 #include "ui/gfx/insets.h" | 23 #include "ui/gfx/geometry/insets.h" |
24 #include "ui/gfx/screen.h" | 24 #include "ui/gfx/screen.h" |
25 #include "ui/native_theme/native_theme.h" | 25 #include "ui/native_theme/native_theme.h" |
26 #include "ui/views/background.h" | 26 #include "ui/views/background.h" |
27 #include "ui/views/controls/focusable_border.h" | 27 #include "ui/views/controls/focusable_border.h" |
28 #include "ui/views/controls/label.h" | 28 #include "ui/views/controls/label.h" |
29 #include "ui/views/controls/menu/menu_runner.h" | 29 #include "ui/views/controls/menu/menu_runner.h" |
30 #include "ui/views/controls/native/native_view_host.h" | 30 #include "ui/views/controls/native/native_view_host.h" |
31 #include "ui/views/controls/textfield/textfield_controller.h" | 31 #include "ui/views/controls/textfield/textfield_controller.h" |
32 #include "ui/views/drag_utils.h" | 32 #include "ui/views/drag_utils.h" |
33 #include "ui/views/ime/input_method.h" | 33 #include "ui/views/ime/input_method.h" |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 const size_t length = selection_clipboard_text.length(); | 1778 const size_t length = selection_clipboard_text.length(); |
1779 range = gfx::Range(range.start() + length, range.end() + length); | 1779 range = gfx::Range(range.start() + length, range.end() + length); |
1780 } | 1780 } |
1781 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); | 1781 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); |
1782 UpdateAfterChange(true, true); | 1782 UpdateAfterChange(true, true); |
1783 OnAfterUserAction(); | 1783 OnAfterUserAction(); |
1784 } | 1784 } |
1785 } | 1785 } |
1786 | 1786 |
1787 } // namespace views | 1787 } // namespace views |
OLD | NEW |