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

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

Issue 503693002: Remove the search icon from the search box in the experimental app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7bb48a68e68a1b6bd6f2dec6bc616537c9eda2bf..07979ba456915f174a5b6878c8043e3b5709828d 100644
--- a/ui/app_list/views/search_box_view.cc
+++ b/ui/app_list/views/search_box_view.cc
@@ -83,13 +83,16 @@ SearchBoxView::SearchBoxView(SearchBoxViewDelegate* delegate,
: delegate_(delegate),
view_delegate_(view_delegate),
model_(NULL),
- icon_view_(new views::ImageView),
+ icon_view_(NULL),
speech_button_(NULL),
search_box_(new views::Textfield),
contents_view_(NULL) {
- AddChildView(icon_view_);
- if (switches::IsExperimentalAppListEnabled())
+ if (switches::IsExperimentalAppListEnabled()) {
set_background(new SearchBoxBackground());
+ } else {
+ icon_view_ = new views::ImageView;
+ AddChildView(icon_view_);
+ }
views::BoxLayout* layout = new views::BoxLayout(
views::BoxLayout::kHorizontal, kPadding, 0, kPadding);
@@ -219,7 +222,8 @@ void SearchBoxView::OnMenuButtonClicked(View* source, const gfx::Point& point) {
}
void SearchBoxView::IconChanged() {
- icon_view_->SetImage(model_->search_box()->icon());
+ if (icon_view_)
+ icon_view_->SetImage(model_->search_box()->icon());
}
void SearchBoxView::SpeechRecognitionButtonPropChanged() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698