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

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

Issue 185623002: Add Hide and Show to the app list SearchBoxView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares_contents_switcher
Patch Set: Created 6 years, 10 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/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 0b75097bf82750b8fc66c25de9405bfb03d7b361..121d57aeabfdf03865b478674f956db2c4e92e85 100644
--- a/ui/app_list/views/app_list_main_view.cc
+++ b/ui/app_list/views/app_list_main_view.cc
@@ -20,6 +20,7 @@
#include "ui/app_list/pagination_model.h"
#include "ui/app_list/search_box_model.h"
#include "ui/app_list/views/app_list_item_view.h"
+#include "ui/app_list/views/app_list_view.h"
#include "ui/app_list/views/contents_switcher_view.h"
#include "ui/app_list/views/contents_view.h"
#include "ui/app_list/views/search_box_view.h"
@@ -79,12 +80,14 @@ class AppListMainView::IconLoader : public AppListItemObserver {
////////////////////////////////////////////////////////////////////////////////
// AppListMainView:
-AppListMainView::AppListMainView(AppListViewDelegate* delegate,
+AppListMainView::AppListMainView(AppListView* app_list_view,
+ AppListViewDelegate* delegate,
PaginationModel* pagination_model,
gfx::NativeView parent)
: delegate_(delegate),
pagination_model_(pagination_model),
model_(delegate->GetModel()),
+ app_list_view_(app_list_view),
search_box_view_(NULL),
contents_view_(NULL),
weak_ptr_factory_(this) {
@@ -230,6 +233,13 @@ void AppListMainView::QueryChanged(SearchBoxView* sender) {
delegate_->StopSearch();
}
+void AppListMainView::SearchBoxVisibilityChanged(SearchBoxView* sender) {
+ // Repaint the AppListView's background which will repaint the background for
+ // the search box.
+ if (app_list_view_)
+ app_list_view_->RepaintBackground();
+}
+
void AppListMainView::OpenResult(SearchResult* result,
bool auto_launch,
int event_flags) {

Powered by Google App Engine
This is Rietveld 408576698