| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual ~Textfield(); | 56 virtual ~Textfield(); |
| 57 | 57 |
| 58 // TextfieldController accessors | 58 // TextfieldController accessors |
| 59 void SetController(TextfieldController* controller); | 59 void SetController(TextfieldController* controller); |
| 60 TextfieldController* GetController() const; | 60 TextfieldController* GetController() const; |
| 61 | 61 |
| 62 // Gets/Sets whether or not the Textfield is read-only. | 62 // Gets/Sets whether or not the Textfield is read-only. |
| 63 bool read_only() const { return read_only_; } | 63 bool read_only() const { return read_only_; } |
| 64 void SetReadOnly(bool read_only); | 64 void SetReadOnly(bool read_only); |
| 65 | 65 |
| 66 // Gets/Sets whether or not this Textfield is a password field. | 66 // Gets whether or not this Textfield is a password field. This property |
| 67 // TODO(bryeung): Currently this is only used in | 67 // can be set by calling SetTextInputType. |
| 68 // chrome/browser/chromeos/options/wifi_config_view.cc, which is being | |
| 69 // converted to WebUI. Please remove this when that happens. | |
| 70 bool IsPassword() const; | 68 bool IsPassword() const; |
| 71 void SetPassword(bool password); | |
| 72 | 69 |
| 73 // Gets/Sets the input type of this textfield. | 70 // Gets/Sets the input type of this textfield. |
| 74 ui::TextInputType GetTextInputType() const; | 71 ui::TextInputType GetTextInputType() const; |
| 75 void SetTextInputType(ui::TextInputType type); | 72 void SetTextInputType(ui::TextInputType type); |
| 76 | 73 |
| 77 // Gets/Sets the text currently displayed in the Textfield. | 74 // Gets/Sets the text currently displayed in the Textfield. |
| 78 const string16& text() const { return text_; } | 75 const string16& text() const { return text_; } |
| 79 | 76 |
| 80 // Sets the text currently displayed in the Textfield. This doesn't | 77 // Sets the text currently displayed in the Textfield. This doesn't |
| 81 // change the cursor position if the current cursor is within the | 78 // change the cursor position if the current cursor is within the |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 303 |
| 307 // The input type of this text field. | 304 // The input type of this text field. |
| 308 ui::TextInputType text_input_type_; | 305 ui::TextInputType text_input_type_; |
| 309 | 306 |
| 310 DISALLOW_COPY_AND_ASSIGN(Textfield); | 307 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 311 }; | 308 }; |
| 312 | 309 |
| 313 } // namespace views | 310 } // namespace views |
| 314 | 311 |
| 315 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 312 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |