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; |
} |