Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: ui/views/controls/textfield/textfield.h

Issue 2286433002: views: Textfield gets password reveal duration from ViewsDelegate (Closed)
Patch Set: no setter Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 void RevealPasswordChar(int index); 381 void RevealPasswordChar(int index);
382 382
383 void CreateTouchSelectionControllerAndNotifyIt(); 383 void CreateTouchSelectionControllerAndNotifyIt();
384 384
385 // Updates the selection clipboard to any non-empty text selection. 385 // Updates the selection clipboard to any non-empty text selection.
386 void UpdateSelectionClipboard() const; 386 void UpdateSelectionClipboard() const;
387 387
388 // Pastes the selection clipboard for the specified mouse event. 388 // Pastes the selection clipboard for the specified mouse event.
389 void PasteSelectionClipboard(const ui::MouseEvent& event); 389 void PasteSelectionClipboard(const ui::MouseEvent& event);
390 390
391 // Gets the password reveal duration.
392 base::TimeDelta GetPasswordRevealDuration();
393
391 // The text model. 394 // The text model.
392 std::unique_ptr<TextfieldModel> model_; 395 std::unique_ptr<TextfieldModel> model_;
393 396
394 // This is the current listener for events from this Textfield. 397 // This is the current listener for events from this Textfield.
395 TextfieldController* controller_; 398 TextfieldController* controller_;
396 399
397 // An edit command to execute on the next key event. When set to a valid 400 // An edit command to execute on the next key event. When set to a valid
398 // value, the key event is still passed to |controller_|, but otherwise 401 // value, the key event is still passed to |controller_|, but otherwise
399 // ignored in favor of the edit command. Set via 402 // ignored in favor of the edit command. Set via
400 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see 403 // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see
(...skipping 26 matching lines...) Expand all
427 430
428 // The accessible name of the text field. 431 // The accessible name of the text field.
429 base::string16 accessible_name_; 432 base::string16 accessible_name_;
430 433
431 // The input type of this text field. 434 // The input type of this text field.
432 ui::TextInputType text_input_type_; 435 ui::TextInputType text_input_type_;
433 436
434 // The input flags of this text field. 437 // The input flags of this text field.
435 int text_input_flags_; 438 int text_input_flags_;
436 439
437 // The duration and timer to reveal the last typed password character. 440 // The timer to reveal the last typed password character.
438 base::TimeDelta password_reveal_duration_;
439 base::OneShotTimer password_reveal_timer_; 441 base::OneShotTimer password_reveal_timer_;
440 442
441 // Tracks whether a user action is being performed; i.e. OnBeforeUserAction() 443 // Tracks whether a user action is being performed; i.e. OnBeforeUserAction()
442 // has been called, but OnAfterUserAction() has not yet been called. 444 // has been called, but OnAfterUserAction() has not yet been called.
443 bool performing_user_action_; 445 bool performing_user_action_;
444 446
445 // True if InputMethod::CancelComposition() should not be called. 447 // True if InputMethod::CancelComposition() should not be called.
446 bool skip_input_method_cancel_composition_; 448 bool skip_input_method_cancel_composition_;
447 449
448 // The text editing cursor repaint timer and visibility. 450 // The text editing cursor repaint timer and visibility.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 486
485 // Used to bind callback functions to this object. 487 // Used to bind callback functions to this object.
486 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 488 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
487 489
488 DISALLOW_COPY_AND_ASSIGN(Textfield); 490 DISALLOW_COPY_AND_ASSIGN(Textfield);
489 }; 491 };
490 492
491 } // namespace views 493 } // namespace views
492 494
493 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 495 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield.cc » ('j') | ui/views/controls/textfield/textfield.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698