Chromium Code Reviews| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 int GetDragSelectionDelay() const override; | 358 int GetDragSelectionDelay() const override; |
| 359 void OnBeforePointerAction() override; | 359 void OnBeforePointerAction() override; |
| 360 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; | 360 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; |
| 361 // Callers within Textfield should call UpdateAfterChange depending on the | 361 // Callers within Textfield should call UpdateAfterChange depending on the |
| 362 // return value. | 362 // return value. |
| 363 bool PasteSelectionClipboard() override; | 363 bool PasteSelectionClipboard() override; |
| 364 void UpdateSelectionClipboard() override; | 364 void UpdateSelectionClipboard() override; |
| 365 | 365 |
| 366 // Handles a request to change the value of this text field from software | 366 // Handles a request to change the value of this text field from software |
| 367 // using an accessibility API (typically automation software, screen readers | 367 // using an accessibility API (typically automation software, screen readers |
| 368 // don't normally use this). Sets the value and clears the selection. | 368 // don't normally use this). If |clear_first| is true, clears the existing |
|
msw
2016/10/27 17:55:09
nit: keep this consistent with any changes to the
Patti Lor
2016/10/31 00:35:05
Done.
| |
| 369 void AccessibilitySetValue(const base::string16& new_value); | 369 // value first and sets it to |new_value|. If false, deletes whatever's |
| 370 // selected and replaces it with |new_value|. The cursor is then placed at the | |
| 371 // end of |new_value|. | |
| 372 void AccessibilitySetValue(const base::string16& new_value, bool clear_first); | |
| 370 | 373 |
| 371 // Updates the painted background color. | 374 // Updates the painted background color. |
| 372 void UpdateBackgroundColor(); | 375 void UpdateBackgroundColor(); |
| 373 | 376 |
| 374 // Updates the border per the state of |invalid_|. | 377 // Updates the border per the state of |invalid_|. |
| 375 void UpdateBorder(); | 378 void UpdateBorder(); |
| 376 | 379 |
| 377 // Does necessary updates when the text and/or cursor position changes. | 380 // Does necessary updates when the text and/or cursor position changes. |
| 378 void UpdateAfterChange(bool text_changed, bool cursor_changed); | 381 void UpdateAfterChange(bool text_changed, bool cursor_changed); |
| 379 | 382 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 533 | 536 |
| 534 // Used to bind callback functions to this object. | 537 // Used to bind callback functions to this object. |
| 535 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 538 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
| 536 | 539 |
| 537 DISALLOW_COPY_AND_ASSIGN(Textfield); | 540 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 538 }; | 541 }; |
| 539 | 542 |
| 540 } // namespace views | 543 } // namespace views |
| 541 | 544 |
| 542 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 545 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |