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

Unified Diff: chrome/browser/ui/views/find_bar_view.cc

Issue 5553002: Fix Find regression where text is not selected once you... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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: chrome/browser/ui/views/find_bar_view.cc
===================================================================
--- chrome/browser/ui/views/find_bar_view.cc (revision 68336)
+++ chrome/browser/ui/views/find_bar_view.cc (working copy)
@@ -97,7 +97,7 @@
SetID(VIEW_ID_FIND_IN_PAGE);
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- find_text_ = new views::Textfield();
+ find_text_ = new SearchTextfieldView();
find_text_->SetID(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
find_text_->SetFont(rb.GetFont(ResourceBundle::BaseFont));
find_text_->set_default_width_in_chars(kDefaultCharWidth);
@@ -187,6 +187,10 @@
return find_text_->text();
}
+string16 FindBarView::GetFindSelectedText() const {
+ return find_text_->GetSelectedText();
+}
+
string16 FindBarView::GetMatchCountText() const {
return WideToUTF16Hack(match_count_text_->GetText());
}
@@ -541,6 +545,17 @@
return true;
}
+FindBarView::SearchTextfieldView::SearchTextfieldView() {
+}
+
+FindBarView::SearchTextfieldView::~SearchTextfieldView() {
+}
+
+void FindBarView::SearchTextfieldView::RequestFocus() {
+ views::View::RequestFocus();
+ SelectAll();
+}
+
FindBarHost* FindBarView::find_bar_host() const {
return static_cast<FindBarHost*>(host());
}
« chrome/browser/ui/views/find_bar_view.h ('K') | « chrome/browser/ui/views/find_bar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698