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

Unified Diff: ui/app_list/views/search_box_view.cc

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix touch drag and drop unit test. Created 6 years, 11 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
Index: ui/app_list/views/search_box_view.cc
diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
index c9751777778319238c46a1b96db3544d119e4c78..455ebdf5ab513b7c738f231995f6c13d6548180a 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -64,7 +64,7 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
#endif
search_box_->RemoveBorder();
- search_box_->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
+ search_box_->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
search_box_->set_placeholder_text_color(kHintTextColor);
search_box_->SetController(this);
AddChildView(search_box_);
@@ -89,7 +89,7 @@ void SearchBoxView::ModelChanged() {
}
bool SearchBoxView::HasSearch() const {
- return !search_box_->text().empty();
+ return !search_box_->GetText().empty();
}
void SearchBoxView::ClearSearch() {
@@ -162,7 +162,7 @@ bool SearchBoxView::OnMouseWheel(const ui::MouseWheelEvent& event) {
void SearchBoxView::UpdateModel() {
// Temporarily remove from observer to ignore notifications caused by us.
model_->search_box()->RemoveObserver(this);
- model_->search_box()->SetText(search_box_->text());
+ model_->search_box()->SetText(search_box_->GetText());
model_->search_box()->SetSelectionModel(search_box_->GetSelectionModel());
model_->search_box()->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698