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

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

Issue 1029543002: Make the textfield in app_list and find_bar not support suggestions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 controller_ = controller; 59 controller_ = controller;
60 } 60 }
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 // Sets the input type; displays only asterisks for TEXT_INPUT_TYPE_PASSWORD. 66 // Sets the input type; displays only asterisks for TEXT_INPUT_TYPE_PASSWORD.
67 void SetTextInputType(ui::TextInputType type); 67 void SetTextInputType(ui::TextInputType type);
68 68
69 // Sets the input flags so that the system input methods can turn on/off some
70 // features. The flags is the bit map of ui::TextInputFlags.
71 void SetTextInputFlags(int flags);
72
69 // Gets the text currently displayed in the Textfield. 73 // Gets the text currently displayed in the Textfield.
70 const base::string16& text() const { return model_->text(); } 74 const base::string16& text() const { return model_->text(); }
71 75
72 // Sets the text currently displayed in the Textfield. This doesn't 76 // Sets the text currently displayed in the Textfield. This doesn't
73 // change the cursor position if the current cursor is within the 77 // change the cursor position if the current cursor is within the
74 // new text's range, or moves the cursor to the end if the cursor is 78 // new text's range, or moves the cursor to the end if the cursor is
75 // out of the new text's range. 79 // out of the new text's range.
76 void SetText(const base::string16& new_text); 80 void SetText(const base::string16& new_text);
77 81
78 // Appends the given string to the previously-existing text in the field. 82 // Appends the given string to the previously-existing text in the field.
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 428
425 // Placeholder text color. 429 // Placeholder text color.
426 SkColor placeholder_text_color_; 430 SkColor placeholder_text_color_;
427 431
428 // The accessible name of the text field. 432 // The accessible name of the text field.
429 base::string16 accessible_name_; 433 base::string16 accessible_name_;
430 434
431 // The input type of this text field. 435 // The input type of this text field.
432 ui::TextInputType text_input_type_; 436 ui::TextInputType text_input_type_;
433 437
438 // The input flags of this text field.
439 int text_input_flags_;
440
434 // The duration and timer to reveal the last typed password character. 441 // The duration and timer to reveal the last typed password character.
435 base::TimeDelta password_reveal_duration_; 442 base::TimeDelta password_reveal_duration_;
436 base::OneShotTimer<Textfield> password_reveal_timer_; 443 base::OneShotTimer<Textfield> password_reveal_timer_;
437 444
438 // Tracks whether a user action is being performed; i.e. OnBeforeUserAction() 445 // Tracks whether a user action is being performed; i.e. OnBeforeUserAction()
439 // has been called, but OnAfterUserAction() has not yet been called. 446 // has been called, but OnAfterUserAction() has not yet been called.
440 bool performing_user_action_; 447 bool performing_user_action_;
441 448
442 // True if InputMethod::CancelComposition() should not be called. 449 // True if InputMethod::CancelComposition() should not be called.
443 bool skip_input_method_cancel_composition_; 450 bool skip_input_method_cancel_composition_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 487
481 // Used to bind callback functions to this object. 488 // Used to bind callback functions to this object.
482 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 489 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
483 490
484 DISALLOW_COPY_AND_ASSIGN(Textfield); 491 DISALLOW_COPY_AND_ASSIGN(Textfield);
485 }; 492 };
486 493
487 } // namespace views 494 } // namespace views
488 495
489 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 496 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698