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

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
Index: athena/home/home_card_impl.cc
diff --git a/athena/home/home_card_impl.cc b/athena/home/home_card_impl.cc
index 949d5512d4e158be816cb91bb5bd3cff28e85757..5ca70e8f1ebc27437b964beaec367d82e88329fa 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/input/public/input_manager.h"
#include "athena/screen/public/screen_manager.h"
@@ -72,7 +73,7 @@ class HomeCardLayoutManager : public aura::LayoutManager {
class HomeCardImpl : public HomeCard, public AcceleratorHandler {
public:
- HomeCardImpl();
+ HomeCardImpl(AppModelBuilder* model_builder);
oshima 2014/06/09 22:24:38 explicit
Jun Mukai 2014/06/09 22:35:25 Done.
virtual ~HomeCardImpl();
void Init();
@@ -92,13 +93,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;
}
@@ -118,7 +122,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 */,
@@ -141,8 +145,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;
}

Powered by Google App Engine
This is Rietveld 408576698