| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 // Sets the default width of the text control. See default_width_in_chars_. | 144 // Sets the default width of the text control. See default_width_in_chars_. |
| 145 void set_default_width_in_chars(int default_width) { | 145 void set_default_width_in_chars(int default_width) { |
| 146 default_width_in_chars_ = default_width; | 146 default_width_in_chars_ = default_width; |
| 147 } | 147 } |
| 148 | 148 |
| 149 // Sets the text to display when empty. | 149 // Sets the text to display when empty. |
| 150 void set_placeholder_text(const base::string16& text) { | 150 void set_placeholder_text(const base::string16& text) { |
| 151 placeholder_text_ = text; | 151 placeholder_text_ = text; |
| 152 } | 152 } |
| 153 virtual base::string16 GetPlaceholderText() const; | 153 base::string16 GetPlaceholderText() const; |
| 154 | 154 |
| 155 SkColor placeholder_text_color() const { return placeholder_text_color_; } | 155 SkColor placeholder_text_color() const { return placeholder_text_color_; } |
| 156 void set_placeholder_text_color(SkColor color) { | 156 void set_placeholder_text_color(SkColor color) { |
| 157 placeholder_text_color_ = color; | 157 placeholder_text_color_ = color; |
| 158 } | 158 } |
| 159 | 159 |
| 160 // Get or set the horizontal alignment used for the button from the underlying | 160 // Get or set the horizontal alignment used for the button from the underlying |
| 161 // RenderText object. | 161 // RenderText object. |
| 162 gfx::HorizontalAlignment GetHorizontalAlignment() const; | 162 gfx::HorizontalAlignment GetHorizontalAlignment() const; |
| 163 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); | 163 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 484 |
| 485 // Used to bind callback functions to this object. | 485 // Used to bind callback functions to this object. |
| 486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
| 487 | 487 |
| 488 DISALLOW_COPY_AND_ASSIGN(Textfield); | 488 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 489 }; | 489 }; |
| 490 | 490 |
| 491 } // namespace views | 491 } // namespace views |
| 492 | 492 |
| 493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |