Chromium Code Reviews| Index: ui/app_list/views/app_list_view.cc |
| diff --git a/ui/app_list/views/app_list_view.cc b/ui/app_list/views/app_list_view.cc |
| index e1da9a150cde08af5f355a71d37fcc411e989f74..74030728e309aa594aa8c71542ffd93dbd52e2ea 100644 |
| --- a/ui/app_list/views/app_list_view.cc |
| +++ b/ui/app_list/views/app_list_view.cc |
| @@ -12,7 +12,6 @@ |
| #include "ui/app_list/app_list_constants.h" |
| #include "ui/app_list/app_list_model.h" |
| #include "ui/app_list/app_list_view_delegate.h" |
| -#include "ui/app_list/pagination_model.h" |
| #include "ui/app_list/signin_delegate.h" |
| #include "ui/app_list/speech_ui_model.h" |
| #include "ui/app_list/views/app_list_background.h" |
| @@ -168,26 +167,22 @@ AppListView::~AppListView() { |
| void AppListView::InitAsBubbleAttachedToAnchor( |
| gfx::NativeView parent, |
| - PaginationModel* pagination_model, |
| views::View* anchor, |
| const gfx::Vector2d& anchor_offset, |
| views::BubbleBorder::Arrow arrow, |
| bool border_accepts_events) { |
| SetAnchorView(anchor); |
| - InitAsBubbleInternal( |
| - parent, pagination_model, arrow, border_accepts_events, anchor_offset); |
| + InitAsBubbleInternal(parent, arrow, border_accepts_events, anchor_offset); |
| } |
| void AppListView::InitAsBubbleAtFixedLocation( |
| gfx::NativeView parent, |
| - PaginationModel* pagination_model, |
| const gfx::Point& anchor_point_in_screen, |
| views::BubbleBorder::Arrow arrow, |
| bool border_accepts_events) { |
| SetAnchorView(NULL); |
| SetAnchorRect(gfx::Rect(anchor_point_in_screen, gfx::Size())); |
| - InitAsBubbleInternal( |
| - parent, pagination_model, arrow, border_accepts_events, gfx::Vector2d()); |
| + InitAsBubbleInternal(parent, arrow, border_accepts_events, gfx::Vector2d()); |
| } |
| void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) { |
| @@ -293,14 +288,18 @@ HWND AppListView::GetHWND() const { |
| } |
| #endif |
| +PaginationModel* AppListView::GetAppsPaginationModel() { |
| + return app_list_main_view_->contents_view() |
| + ->apps_container_view() |
| + ->apps_grid_view() |
| + ->pagination_model(); |
|
xiyuan
2014/06/02 17:02:08
This repeats many times. Why not moving relevant G
Matt Giuca
2014/06/03 01:52:36
I really don't want to expose GetAppsPaginationMod
|
| +} |
| + |
| void AppListView::InitAsBubbleInternal(gfx::NativeView parent, |
| - PaginationModel* pagination_model, |
| views::BubbleBorder::Arrow arrow, |
| bool border_accepts_events, |
| const gfx::Vector2d& anchor_offset) { |
| - app_list_main_view_ = new AppListMainView(delegate_.get(), |
| - pagination_model, |
| - parent); |
| + app_list_main_view_ = new AppListMainView(delegate_.get(), parent); |
| AddChildView(app_list_main_view_); |
| #if defined(USE_AURA) |
| app_list_main_view_->SetPaintToLayer(true); |