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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 class VIEWS_EXPORT Textfield : public View, | 38 class VIEWS_EXPORT Textfield : public View, |
39 public TextfieldModel::Delegate, | 39 public TextfieldModel::Delegate, |
40 public ContextMenuController, | 40 public ContextMenuController, |
41 public DragController, | 41 public DragController, |
42 public ui::TouchEditable, | 42 public ui::TouchEditable, |
43 public ui::TextInputClient { | 43 public ui::TextInputClient { |
44 public: | 44 public: |
45 // The textfield's class name. | 45 // The textfield's class name. |
46 static const char kViewClassName[]; | 46 static const char kViewClassName[]; |
47 | 47 |
| 48 // The preferred size of the padding to be used around textfield text. |
| 49 static const int kTextPadding; |
| 50 |
48 // Returns the text cursor blink time in milliseconds, or 0 for no blinking. | 51 // Returns the text cursor blink time in milliseconds, or 0 for no blinking. |
49 static size_t GetCaretBlinkMs(); | 52 static size_t GetCaretBlinkMs(); |
50 | 53 |
51 Textfield(); | 54 Textfield(); |
52 virtual ~Textfield(); | 55 virtual ~Textfield(); |
53 | 56 |
54 // Set the controller for this textfield. | 57 // Set the controller for this textfield. |
55 void set_controller(TextfieldController* controller) { | 58 void set_controller(TextfieldController* controller) { |
56 controller_ = controller; | 59 controller_ = controller; |
57 } | 60 } |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 | 471 |
469 // Used to bind callback functions to this object. | 472 // Used to bind callback functions to this object. |
470 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 473 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
471 | 474 |
472 DISALLOW_COPY_AND_ASSIGN(Textfield); | 475 DISALLOW_COPY_AND_ASSIGN(Textfield); |
473 }; | 476 }; |
474 | 477 |
475 } // namespace views | 478 } // namespace views |
476 | 479 |
477 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 480 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |