| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 363 |
| 364 // Updates the painted background color. | 364 // Updates the painted background color. |
| 365 void UpdateBackgroundColor(); | 365 void UpdateBackgroundColor(); |
| 366 | 366 |
| 367 // Updates the border per the state of |invalid_|. | 367 // Updates the border per the state of |invalid_|. |
| 368 void UpdateBorder(); | 368 void UpdateBorder(); |
| 369 | 369 |
| 370 // Does necessary updates when the text and/or cursor position changes. | 370 // Does necessary updates when the text and/or cursor position changes. |
| 371 void UpdateAfterChange(bool text_changed, bool cursor_changed); | 371 void UpdateAfterChange(bool text_changed, bool cursor_changed); |
| 372 | 372 |
| 373 // Updates cursor visibility and blinks the cursor if needed. |
| 374 void ShowCursor(); |
| 375 |
| 373 // A callback function to periodically update the cursor node_data. | 376 // A callback function to periodically update the cursor node_data. |
| 374 void UpdateCursor(); | 377 void UpdateCursorVisibility(); |
| 375 | 378 |
| 376 // Update the cursor position in the text field. | 379 // Update the cursor position in the text field. |
| 377 void UpdateCursorView(); | 380 void UpdateCursorViewPosition(); |
| 378 | 381 |
| 379 void PaintTextAndCursor(gfx::Canvas* canvas); | 382 void PaintTextAndCursor(gfx::Canvas* canvas); |
| 380 | 383 |
| 381 // Helper function to call MoveCursorTo on the TextfieldModel. | 384 // Helper function to call MoveCursorTo on the TextfieldModel. |
| 382 void MoveCursorTo(const gfx::Point& point, bool select); | 385 void MoveCursorTo(const gfx::Point& point, bool select); |
| 383 | 386 |
| 384 // Convenience method to notify the InputMethod and TouchSelectionController. | 387 // Convenience method to notify the InputMethod and TouchSelectionController. |
| 385 void OnCaretBoundsChanged(); | 388 void OnCaretBoundsChanged(); |
| 386 | 389 |
| 387 // Convenience method to call TextfieldController::OnBeforeUserAction(); | 390 // Convenience method to call TextfieldController::OnBeforeUserAction(); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 532 |
| 530 // Used to bind callback functions to this object. | 533 // Used to bind callback functions to this object. |
| 531 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 534 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
| 532 | 535 |
| 533 DISALLOW_COPY_AND_ASSIGN(Textfield); | 536 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 534 }; | 537 }; |
| 535 | 538 |
| 536 } // namespace views | 539 } // namespace views |
| 537 | 540 |
| 538 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 541 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |