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

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

Issue 307333002: Add search results to experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments, fix for breaking a test Created 6 years, 6 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 | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_main_view.cc
diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc
index 80158d8c036e796e5c282210f587e74a79e7e02b..8874bbeccc6d7db126e3298b2dd4f527848d391b 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -168,9 +168,10 @@ void AppListMainView::ModelChanged() {
Layout();
}
-void AppListMainView::OnContentsViewActivePageChanged() {
+void AppListMainView::UpdateSearchBoxVisibility() {
search_box_view_->SetVisible(
- !contents_view_->IsNamedPageActive(ContentsView::NAMED_PAGE_START));
+ !contents_view_->IsNamedPageActive(ContentsView::NAMED_PAGE_START) ||
+ contents_view_->IsShowingSearchResults());
}
void AppListMainView::OnStartPageSearchButtonPressed() {
@@ -266,6 +267,7 @@ void AppListMainView::QueryChanged(SearchBoxView* sender) {
base::TrimWhitespace(model_->search_box()->text(), base::TRIM_ALL, &query);
bool should_show_search = !query.empty();
contents_view_->ShowSearchResults(should_show_search);
+ UpdateSearchBoxVisibility();
if (should_show_search)
delegate_->StartSearch();
« no previous file with comments | « ui/app_list/views/app_list_main_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698