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

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

Issue 335343002: Add a DummySearchBoxView to the experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments 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 9837ae2a2d7c275e971506d4e99cedd675662aca..c5de719d64ac467c243925401ff7ebee2fe1f37d 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -174,15 +174,19 @@ void AppListMainView::ModelChanged() {
}
void AppListMainView::UpdateSearchBoxVisibility() {
- search_box_view_->SetVisible(
+ bool visible =
!contents_view_->IsNamedPageActive(ContentsView::NAMED_PAGE_START) ||
- contents_view_->IsShowingSearchResults());
+ contents_view_->IsShowingSearchResults();
+ search_box_view_->SetVisible(visible);
+ if (visible)
+ search_box_view_->search_box()->RequestFocus();
}
-void AppListMainView::OnStartPageSearchButtonPressed() {
+void AppListMainView::OnStartPageSearchTextfieldChanged(
+ const base::string16& new_contents) {
search_box_view_->SetVisible(true);
- search_box_view_->search_box()->SetText(base::string16());
- search_box_view_->RequestFocus();
+ search_box_view_->search_box()->SetText(new_contents);
+ search_box_view_->search_box()->RequestFocus();
}
void AppListMainView::SetDragAndDropHostOfCurrentAppList(
« 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