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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
385 void RevealPasswordChar(int index); | 385 void RevealPasswordChar(int index); |
386 | 386 |
387 void CreateTouchSelectionControllerAndNotifyIt(); | 387 void CreateTouchSelectionControllerAndNotifyIt(); |
388 | 388 |
389 // Updates the selection clipboard to any non-empty text selection. | 389 // Updates the selection clipboard to any non-empty text selection. |
390 void UpdateSelectionClipboard() const; | 390 void UpdateSelectionClipboard() const; |
391 | 391 |
392 // Pastes the selection clipboard for the specified mouse event. | 392 // Pastes the selection clipboard for the specified mouse event. |
393 void PasteSelectionClipboard(const ui::MouseEvent& event); | 393 void PasteSelectionClipboard(const ui::MouseEvent& event); |
394 | 394 |
395 // Called whenever an editing operation fails to provide visual or audio | |
sky
2016/09/16 17:34:36
Why the visual/audio-feedback description? Isn't t
Elly Fong-Jones
2016/09/19 11:28:57
Done.
| |
396 // feedback to the user. | |
397 void OnEditFailed(); | |
398 | |
395 // The text model. | 399 // The text model. |
396 std::unique_ptr<TextfieldModel> model_; | 400 std::unique_ptr<TextfieldModel> model_; |
397 | 401 |
398 // This is the current listener for events from this Textfield. | 402 // This is the current listener for events from this Textfield. |
399 TextfieldController* controller_; | 403 TextfieldController* controller_; |
400 | 404 |
401 // An edit command to execute on the next key event. When set to a valid | 405 // An edit command to execute on the next key event. When set to a valid |
402 // value, the key event is still passed to |controller_|, but otherwise | 406 // value, the key event is still passed to |controller_|, but otherwise |
403 // ignored in favor of the edit command. Set via | 407 // ignored in favor of the edit command. Set via |
404 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see | 408 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
488 | 492 |
489 // Used to bind callback functions to this object. | 493 // Used to bind callback functions to this object. |
490 base::WeakPtrFactory<Textfield> weak_ptr_factory_; | 494 base::WeakPtrFactory<Textfield> weak_ptr_factory_; |
491 | 495 |
492 DISALLOW_COPY_AND_ASSIGN(Textfield); | 496 DISALLOW_COPY_AND_ASSIGN(Textfield); |
493 }; | 497 }; |
494 | 498 |
495 } // namespace views | 499 } // namespace views |
496 | 500 |
497 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 501 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |