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

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

Issue 657653002: Move app list search box into AppListView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_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_view.cc
diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc
index 112338f6db7ab0fb001f2ab790ee2bc485056af0..d8229e408965df2a14f9ee52afaf36f6ca94a744 100644
--- a/ui/app_list/views/app_list_view.cc
+++ b/ui/app_list/views/app_list_view.cc
@@ -151,6 +151,7 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver {
AppListView::AppListView(AppListViewDelegate* delegate)
: delegate_(delegate),
app_list_main_view_(NULL),
+ search_box_view_(NULL),
speech_view_(NULL),
experimental_banner_view_(NULL),
overlay_view_(NULL),
@@ -332,7 +333,14 @@ void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
app_list_main_view_->SetPaintToLayer(true);
app_list_main_view_->SetFillsBoundsOpaquely(false);
app_list_main_view_->layer()->SetMasksToBounds(true);
- app_list_main_view_->Init(parent, initial_apps_page);
+
+ search_box_view_ = new SearchBoxView(app_list_main_view_, delegate_);
+ search_box_view_->SetPaintToLayer(true);
+ search_box_view_->SetFillsBoundsOpaquely(false);
+ search_box_view_->layer()->SetMasksToBounds(true);
+ AddChildView(search_box_view_);
+
+ app_list_main_view_->Init(parent, initial_apps_page, search_box_view_);
// Speech recognition is available only when the start page exists.
if (delegate_ && delegate_->IsSpeechRecognitionEnabled()) {
@@ -493,6 +501,9 @@ bool AppListView::AcceleratorPressed(const ui::Accelerator& accelerator) {
}
void AppListView::Layout() {
+ search_box_view_->SetBoundsRect(
+ app_list_main_view_->contents_view()->GetDefaultSearchBoxBounds());
+
const gfx::Rect contents_bounds = GetContentsBounds();
app_list_main_view_->SetBoundsRect(contents_bounds);
« no previous file with comments | « ui/app_list/views/app_list_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