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

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

Issue 441873004: App list: Infrastructure now supports multiple custom launcher pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 9057abc8524f7ac4f61f83e91a398fd17a2fc8d2..650115c386fd04c58da920133a1ad9edc9e35bf6 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -5,6 +5,7 @@
#include "ui/app_list/views/contents_view.h"
#include <algorithm>
+#include <vector>
#include "base/logging.h"
#include "grit/ui_resources.h"
@@ -56,10 +57,14 @@ void ContentsView::InitNamedPages(AppListModel* model,
DCHECK(model);
if (app_list::switches::IsExperimentalAppListEnabled()) {
- views::View* custom_page_view =
- view_delegate->CreateCustomPageWebView(GetLocalBounds().size());
- if (custom_page_view)
- AddLauncherPage(custom_page_view, IDR_APP_LIST_NOTIFICATIONS_ICON);
+ std::vector<views::View*> custom_page_views =
+ view_delegate->CreateCustomPageWebViews(GetLocalBounds().size());
+ for (std::vector<views::View*>::const_iterator it =
+ custom_page_views.begin();
+ it != custom_page_views.end();
+ ++it) {
+ AddLauncherPage(*it, IDR_APP_LIST_NOTIFICATIONS_ICON);
+ }
start_page_view_ = new StartPageView(app_list_main_view_, view_delegate);
AddLauncherPage(

Powered by Google App Engine
This is Rietveld 408576698