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 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "ui/base/ime/text_input_type.h" | 21 #include "ui/base/ime/text_input_type.h" |
22 #include "ui/base/models/simple_menu_model.h" | 22 #include "ui/base/models/simple_menu_model.h" |
23 #include "ui/base/touch/touch_editing_controller.h" | 23 #include "ui/base/touch/touch_editing_controller.h" |
24 #include "ui/events/keycodes/keyboard_codes.h" | 24 #include "ui/events/keycodes/keyboard_codes.h" |
25 #include "ui/gfx/font_list.h" | 25 #include "ui/gfx/font_list.h" |
26 #include "ui/gfx/range/range.h" | 26 #include "ui/gfx/range/range.h" |
27 #include "ui/gfx/selection_model.h" | 27 #include "ui/gfx/selection_model.h" |
28 #include "ui/gfx/text_constants.h" | 28 #include "ui/gfx/text_constants.h" |
29 #include "ui/views/context_menu_controller.h" | 29 #include "ui/views/context_menu_controller.h" |
30 #include "ui/views/controls/textfield/textfield_model.h" | 30 #include "ui/views/controls/textfield/textfield_model.h" |
| 31 #include "ui/views/controls/textfield/views_text_context_menu.h" |
31 #include "ui/views/drag_controller.h" | 32 #include "ui/views/drag_controller.h" |
32 #include "ui/views/view.h" | 33 #include "ui/views/view.h" |
33 | 34 |
34 namespace views { | 35 namespace views { |
35 | 36 |
36 class MenuRunner; | 37 class MenuRunner; |
37 class Painter; | 38 class Painter; |
38 class TextfieldController; | 39 class TextfieldController; |
39 | 40 |
40 // A views/skia textfield implementation. No platform-specific code is used. | 41 // A views/skia textfield implementation. No platform-specific code is used. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 int drag_start_display_offset_; | 476 int drag_start_display_offset_; |
476 | 477 |
477 // Tracks if touch editing handles are hidden because user has started | 478 // Tracks if touch editing handles are hidden because user has started |
478 // scrolling. If |true|, handles are shown after scrolling ends. | 479 // scrolling. If |true|, handles are shown after scrolling ends. |
479 bool touch_handles_hidden_due_to_scroll_; | 480 bool touch_handles_hidden_due_to_scroll_; |
480 | 481 |
481 // Context menu related members. | 482 // Context menu related members. |
482 std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_; | 483 std::unique_ptr<ui::SimpleMenuModel> context_menu_contents_; |
483 std::unique_ptr<views::MenuRunner> context_menu_runner_; | 484 std::unique_ptr<views::MenuRunner> context_menu_runner_; |
484 | 485 |
| 486 std::unique_ptr<ViewsTextContextMenu> text_context_menu_; |
| 487 |
485 // Used to bind callback functions to this object. | 488 // Used to bind callback functions to this object. |
486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 489 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
487 | 490 |
488 DISALLOW_COPY_AND_ASSIGN(Textfield); | 491 DISALLOW_COPY_AND_ASSIGN(Textfield); |
489 }; | 492 }; |
490 | 493 |
491 } // namespace views | 494 } // namespace views |
492 | 495 |
493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 496 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |