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

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

Issue 13976011: Revert FindBarView::SearchTextfieldView deletion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_view.cc
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 57251bfae92f93197f4c4ed230f2342e171adde7..28bb7ddb812558444627fc738b38f66dd92be2c8 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -81,7 +81,7 @@ FindBarView::FindBarView(FindBarHost* host)
set_id(VIEW_ID_FIND_IN_PAGE);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- find_text_ = new views::Textfield();
+ find_text_ = new SearchTextfieldView;
find_text_->set_id(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
find_text_->SetFont(rb.GetFont(ui::ResourceBundle::BaseFont));
find_text_->set_default_width_in_chars(kDefaultCharWidth);
@@ -498,6 +498,17 @@ bool FindBarView::FocusForwarderView::OnMousePressed(
return true;
}
+FindBarView::SearchTextfieldView::SearchTextfieldView() {}
+
+FindBarView::SearchTextfieldView::~SearchTextfieldView() {}
+
+void FindBarView::SearchTextfieldView::RequestFocus() {
Ben Goodger (Google) 2013/04/18 17:51:13 Can you do this in an OnFocus() handler? It'd be n
msw 2013/04/18 19:10:24 Done in https://codereview.chromium.org/13852009/
+ if (HasFocus())
+ return;
+ views::View::RequestFocus();
+ SelectAll(true);
+}
+
FindBarHost* FindBarView::find_bar_host() const {
return static_cast<FindBarHost*>(host());
}
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698