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

Unified Diff: ui/app_list/views/app_list_view.cc

Issue 302803002: Refactor app list so AppsGridView owns the PaginationModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error (conflict). Created 6 years, 7 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 | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3583380be3fcf742b49cb087d11e89a0f04d03fc..2412584208e979402e55ac0b2e79b51fab737330 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/speech_ui_model.h"
#include "ui/app_list/views/app_list_background.h"
#include "ui/app_list/views/app_list_folder_view.h"
@@ -165,26 +164,26 @@ AppListView::~AppListView() {
void AppListView::InitAsBubbleAttachedToAnchor(
gfx::NativeView parent,
- PaginationModel* pagination_model,
+ int initial_apps_page,
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);
+ parent, initial_apps_page, arrow, border_accepts_events, anchor_offset);
}
void AppListView::InitAsBubbleAtFixedLocation(
gfx::NativeView parent,
- PaginationModel* pagination_model,
+ int initial_apps_page,
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());
+ parent, initial_apps_page, arrow, border_accepts_events, gfx::Vector2d());
}
void AppListView::SetBubbleArrow(views::BubbleBorder::Arrow arrow) {
@@ -284,14 +283,20 @@ HWND AppListView::GetHWND() const {
}
#endif
+PaginationModel* AppListView::GetAppsPaginationModel() {
+ return app_list_main_view_->contents_view()
+ ->apps_container_view()
+ ->apps_grid_view()
+ ->pagination_model();
+}
+
void AppListView::InitAsBubbleInternal(gfx::NativeView parent,
- PaginationModel* pagination_model,
+ int initial_apps_page,
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(), initial_apps_page, parent);
AddChildView(app_list_main_view_);
#if defined(USE_AURA)
app_list_main_view_->SetPaintToLayer(true);
« no previous file with comments | « ui/app_list/views/app_list_view.h ('k') | ui/app_list/views/app_list_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698