| Index: ui/app_list/apps_grid_view.h
|
| diff --git a/ui/app_list/app_list_model_view.h b/ui/app_list/apps_grid_view.h
|
| similarity index 79%
|
| rename from ui/app_list/app_list_model_view.h
|
| rename to ui/app_list/apps_grid_view.h
|
| index 89fc7f6f4a5f7550148fe4ed6cc11004b0b69d51..70132a8c9529cd68dbd72851afc89616d1f331e2 100644
|
| --- a/ui/app_list/app_list_model_view.h
|
| +++ b/ui/app_list/apps_grid_view.h
|
| @@ -2,11 +2,12 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef UI_APP_LIST_APP_LIST_MODEL_VIEW_H_
|
| -#define UI_APP_LIST_APP_LIST_MODEL_VIEW_H_
|
| +#ifndef UI_APP_LIST_APPS_GRID_VIEW_H_
|
| +#define UI_APP_LIST_APPS_GRID_VIEW_H_
|
| #pragma once
|
|
|
| #include "ui/app_list/app_list_export.h"
|
| +#include "ui/app_list/app_list_model.h"
|
| #include "ui/app_list/pagination_model_observer.h"
|
| #include "ui/base/models/list_model_observer.h"
|
| #include "ui/views/view.h"
|
| @@ -18,17 +19,16 @@ class ButtonListener;
|
| namespace app_list {
|
|
|
| class AppListItemView;
|
| -class AppListModel;
|
| class PaginationModel;
|
|
|
| -// AppListModelView displays the UI for an AppListModel.
|
| -class APP_LIST_EXPORT AppListModelView : public views::View,
|
| - public ui::ListModelObserver,
|
| - public PaginationModelObserver {
|
| +// AppsGridView displays a grid for AppListModel::Apps sub model.
|
| +class APP_LIST_EXPORT AppsGridView : public views::View,
|
| + public ui::ListModelObserver,
|
| + public PaginationModelObserver {
|
| public:
|
| - AppListModelView(views::ButtonListener* listener,
|
| + AppsGridView(views::ButtonListener* listener,
|
| PaginationModel* pagination_model);
|
| - virtual ~AppListModelView();
|
| + virtual ~AppsGridView();
|
|
|
| // Calculate preferred icon size, rows and cols for given |content_size| and
|
| // |num_of_tiles|.
|
| @@ -43,7 +43,7 @@ class APP_LIST_EXPORT AppListModelView : public views::View,
|
| void SetLayout(int icon_size, int cols, int rows_per_page);
|
|
|
| // Sets |model| to use. Note this does not take ownership of |model|.
|
| - void SetModel(AppListModel* model);
|
| + void SetModel(AppListModel::Apps* model);
|
|
|
| void SetSelectedItem(AppListItemView* item);
|
| void ClearSelectedItem(AppListItemView* item);
|
| @@ -79,7 +79,7 @@ class APP_LIST_EXPORT AppListModelView : public views::View,
|
| virtual void TotalPagesChanged() OVERRIDE;
|
| virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE;
|
|
|
| - AppListModel* model_; // Owned by parent AppListView.
|
| + AppListModel::Apps* model_; // Owned by AppListModel.
|
| views::ButtonListener* listener_;
|
| PaginationModel* pagination_model_; // Owned by AppListView.
|
|
|
| @@ -90,9 +90,9 @@ class APP_LIST_EXPORT AppListModelView : public views::View,
|
|
|
| int selected_item_index_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(AppListModelView);
|
| + DISALLOW_COPY_AND_ASSIGN(AppsGridView);
|
| };
|
|
|
| } // namespace app_list
|
|
|
| -#endif // UI_APP_LIST_APP_LIST_MODEL_VIEW_H_
|
| +#endif // UI_APP_LIST_APPS_GRID_VIEW_H_
|
|
|