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

Unified Diff: athena/home/home_card_impl.cc

Issue 311113005: AppModelBuilder to athena. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 | « athena/home/app_list_view_delegate.cc ('k') | athena/home/public/app_model_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/home_card_impl.cc
diff --git a/athena/home/home_card_impl.cc b/athena/home/home_card_impl.cc
index 4e97e9ace898180a21afbeda25bdafe5989273ec..fba79682c7ac0c2b835b3dbea6dfc0478a069d1d 100644
--- a/athena/home/home_card_impl.cc
+++ b/athena/home/home_card_impl.cc
@@ -5,6 +5,7 @@
#include "athena/home/public/home_card.h"
#include "athena/home/app_list_view_delegate.h"
+#include "athena/home/public/app_model_builder.h"
#include "athena/input/public/accelerator_manager.h"
#include "athena/screen/public/screen_manager.h"
#include "ui/app_list/pagination_model.h"
@@ -71,7 +72,7 @@ class HomeCardLayoutManager : public aura::LayoutManager {
class HomeCardImpl : public HomeCard, public AcceleratorHandler {
public:
- HomeCardImpl();
+ explicit HomeCardImpl(AppModelBuilder* model_builder);
virtual ~HomeCardImpl();
void Init();
@@ -91,13 +92,16 @@ class HomeCardImpl : public HomeCard, public AcceleratorHandler {
return true;
}
+ scoped_ptr<AppModelBuilder> model_builder_;
+
views::Widget* home_card_widget_;
DISALLOW_COPY_AND_ASSIGN(HomeCardImpl);
};
-HomeCardImpl::HomeCardImpl()
- : home_card_widget_(NULL) {
+HomeCardImpl::HomeCardImpl(AppModelBuilder* model_builder)
+ : model_builder_(model_builder),
+ home_card_widget_(NULL) {
DCHECK(!instance);
instance = this;
}
@@ -117,7 +121,7 @@ void HomeCardImpl::Init() {
wm::SetChildWindowVisibilityChangesAnimated(container);
app_list::AppListView* view = new app_list::AppListView(
- new AppListViewDelegate);
+ new AppListViewDelegate(model_builder_.get()));
view->InitAsBubbleAtFixedLocation(
container,
0 /* initial_apps_page */,
@@ -140,8 +144,8 @@ void HomeCardImpl::InstallAccelerators() {
} // namespace
// static
-HomeCard* HomeCard::Create() {
- (new HomeCardImpl())->Init();
+HomeCard* HomeCard::Create(AppModelBuilder* model_builder) {
+ (new HomeCardImpl(model_builder))->Init();
DCHECK(instance);
return instance;
}
« no previous file with comments | « athena/home/app_list_view_delegate.cc ('k') | athena/home/public/app_model_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698