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

Unified Diff: views/controls/textfield/textfield.h

Issue 8368016: Rebase BookmarkBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Textfield::[set_]select_all_on_focus, use GetInitiallyFocusedView. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/textfield/textfield.h
diff --git a/views/controls/textfield/textfield.h b/views/controls/textfield/textfield.h
index 7e73caf94fd7c9c6d75a72ffc86557deabb2ef14..922f42f532e9494736ff287e457ce75ec82a4fad 100644
--- a/views/controls/textfield/textfield.h
+++ b/views/controls/textfield/textfield.h
@@ -157,6 +157,11 @@ class VIEWS_EXPORT Textfield : public View {
return text_to_display_when_empty_;
}
+ bool select_all_on_focus() const { return select_all_on_focus_; }
+ void set_select_all_on_focus(bool select_all_on_focus) {
+ select_all_on_focus_ = select_all_on_focus;
+ }
+
// Getter for the horizontal margins that were set. Returns false if
// horizontal margins weren't set.
bool GetHorizontalMargins(int* left, int* right);
@@ -300,6 +305,9 @@ class VIEWS_EXPORT Textfield : public View {
// Text to display when empty.
string16 text_to_display_when_empty_;
+ // If true, the textfield will select all text when focus is gained.
+ bool select_all_on_focus_;
+
// The accessible name of the text field.
string16 accessible_name_;

Powered by Google App Engine
This is Rietveld 408576698