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

Side by Side Diff: ui/app_list/views/app_list_main_view.cc

Issue 2933673002: Preparing to making answer-card independent of fullscreen. (Closed)
Patch Set: CR comments Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/app_list_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // AppListMainView: 45 // AppListMainView:
46 46
47 AppListMainView::AppListMainView(AppListViewDelegate* delegate, 47 AppListMainView::AppListMainView(AppListViewDelegate* delegate,
48 AppListView* app_list_view) 48 AppListView* app_list_view)
49 : delegate_(delegate), 49 : delegate_(delegate),
50 model_(delegate->GetModel()), 50 model_(delegate->GetModel()),
51 search_box_view_(nullptr), 51 search_box_view_(nullptr),
52 contents_view_(nullptr), 52 contents_view_(nullptr),
53 app_list_view_(app_list_view) { 53 app_list_view_(app_list_view) {
54 SetLayoutManager( 54 SetLayoutManager(
55 features::IsAnswerCardEnabled() 55 new views::BoxLayout(views::BoxLayout::kVertical, gfx::Insets(), 0));
56 ? static_cast<views::LayoutManager*>(new views::FillLayout)
57 : static_cast<views::LayoutManager*>(new views::BoxLayout(
58 views::BoxLayout::kVertical, gfx::Insets(), 0)));
59 model_->AddObserver(this); 56 model_->AddObserver(this);
60 } 57 }
61 58
62 AppListMainView::~AppListMainView() { 59 AppListMainView::~AppListMainView() {
63 model_->RemoveObserver(this); 60 model_->RemoveObserver(this);
64 } 61 }
65 62
66 void AppListMainView::Init(gfx::NativeView parent, 63 void AppListMainView::Init(gfx::NativeView parent,
67 int initial_apps_page, 64 int initial_apps_page,
68 SearchBoxView* search_box_view) { 65 SearchBoxView* search_box_view) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 contents_view_->search_results_page_view()->SetSelection(select); 212 contents_view_->search_results_page_view()->SetSelection(select);
216 } 213 }
217 214
218 void AppListMainView::OnResultInstalled(SearchResult* result) { 215 void AppListMainView::OnResultInstalled(SearchResult* result) {
219 // Clears the search to show the apps grid. The last installed app 216 // Clears the search to show the apps grid. The last installed app
220 // should be highlighted and made visible already. 217 // should be highlighted and made visible already.
221 search_box_view_->ClearSearch(); 218 search_box_view_->ClearSearch();
222 } 219 }
223 220
224 } // namespace app_list 221 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698