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

Unified Diff: ui/app_list/views/contents_view.h

Issue 336313010: App List: Refactor ContentsSwitcherView so it doesn't hard-code pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: ui/app_list/views/contents_view.h
diff --git a/ui/app_list/views/contents_view.h b/ui/app_list/views/contents_view.h
index 20906743006f4853c7b5d3587f5c1206d34fc1f5..e8e65322406af53c4d7ed3dd270a10ba06baf56a 100644
--- a/ui/app_list/views/contents_view.h
+++ b/ui/app_list/views/contents_view.h
@@ -28,6 +28,7 @@ class AppListMainView;
class AppListModel;
class AppListViewDelegate;
class AppsContainerView;
+class ContentsSwitcherView;
class PaginationModel;
class SearchResultListView;
class StartPageView;
@@ -49,6 +50,7 @@ class APP_LIST_EXPORT ContentsView : public views::View,
};
ContentsView(AppListMainView* app_list_main_view,
+ ContentsSwitcherView* contents_switcher_view,
AppListModel* model,
AppListViewDelegate* view_delegate);
virtual ~ContentsView();
@@ -110,14 +112,16 @@ class APP_LIST_EXPORT ContentsView : public views::View,
void UpdatePageBounds();
// Adds |view| as a new page to the end of the list of launcher pages. The
- // view is inserted as a child of the ContentsView. There is no name
+ // view is inserted as a child of the ContentsView, and a button with
+ // |resource_id| is added to the ContentsSwitcherView. There is no name
// associated with the page. Returns the index of the new page.
- int AddLauncherPage(views::View* view);
+ int AddLauncherPage(views::View* view, int resource_id);
// Adds |view| as a new page to the end of the list of launcher pages. The
- // view is inserted as a child of the ContentsView. The page is associated
+ // view is inserted as a child of the ContentsView, and a button with
+ // |resource_id| is added to the ContentsSwitcherView. The page is associated
// with the name |named_page|. Returns the index of the new page.
- int AddLauncherPage(views::View* view, NamedPage named_page);
+ int AddLauncherPage(views::View* view, int resource_id, NamedPage named_page);
// Gets the PaginationModel owned by the AppsGridView.
// Note: This is different to |pagination_model_|, which manages top-level
@@ -134,6 +138,8 @@ class APP_LIST_EXPORT ContentsView : public views::View,
StartPageView* start_page_view_;
AppListMainView* app_list_main_view_; // Parent view, owns this.
+ // Sibling view, owned by |app_list_main_view_|.
+ ContentsSwitcherView* contents_switcher_view_;
scoped_ptr<views::ViewModel> view_model_;
// Maps NamedPage onto |view_model_| indices.

Powered by Google App Engine
This is Rietveld 408576698