Index: athena/home/home_card_impl.cc |
diff --git a/athena/home/home_card_impl.cc b/athena/home/home_card_impl.cc |
index 13723afb1794e51d0868bd5d677382f29f0a308e..3ff85661fdd6786b1c1cd15512ccb5631ef0578b 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/screen/public/screen_manager.h" |
#include "ui/app_list/pagination_model.h" |
#include "ui/app_list/views/app_list_view.h" |
@@ -70,19 +71,22 @@ class HomeCardLayoutManager : public aura::LayoutManager { |
class HomeCardImpl : public HomeCard { |
public: |
- HomeCardImpl(); |
+ HomeCardImpl(AppModelBuilder* model_builder); |
virtual ~HomeCardImpl(); |
void Init(); |
private: |
+ 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; |
} |
@@ -100,7 +104,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 */, |
@@ -114,8 +118,8 @@ void HomeCardImpl::Init() { |
} // namespace |
// static |
-HomeCard* HomeCard::Create() { |
- (new HomeCardImpl())->Init(); |
+HomeCard* HomeCard::Create(AppModelBuilder* model_builder) { |
+ (new HomeCardImpl(model_builder))->Init(); |
DCHECK(instance); |
return instance; |
} |