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

Side by Side Diff: ui/app_list/views/contents_view.cc

Issue 297643002: Add tiles to the experimental app list start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/contents_view.h" 5 #include "ui/app_list/views/contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 new AppsContainerView(app_list_main_view, pagination_model, model); 70 new AppsContainerView(app_list_main_view, pagination_model, model);
71 AddChildView(apps_container_view_); 71 AddChildView(apps_container_view_);
72 view_model_->Add(apps_container_view_, kIndexAppsContainer); 72 view_model_->Add(apps_container_view_, kIndexAppsContainer);
73 73
74 SearchResultListView* search_results_view = new SearchResultListView( 74 SearchResultListView* search_results_view = new SearchResultListView(
75 app_list_main_view, view_delegate); 75 app_list_main_view, view_delegate);
76 AddChildView(search_results_view); 76 AddChildView(search_results_view);
77 view_model_->Add(search_results_view, kIndexSearchResults); 77 view_model_->Add(search_results_view, kIndexSearchResults);
78 78
79 if (app_list::switches::IsExperimentalAppListEnabled()) { 79 if (app_list::switches::IsExperimentalAppListEnabled()) {
80 content::WebContents* start_page_contents =
81 view_delegate->GetStartPageContents();
82 StartPageView* start_page_view = 80 StartPageView* start_page_view =
83 new StartPageView(app_list_main_view, start_page_contents); 81 new StartPageView(app_list_main_view, view_delegate);
84 AddChildView(start_page_view); 82 AddChildView(start_page_view);
85 view_model_->Add(start_page_view, kIndexStartPage); 83 view_model_->Add(start_page_view, kIndexStartPage);
86 } 84 }
87 85
88 GetSearchResultListView(view_model_.get())->SetResults(model->results()); 86 GetSearchResultListView(view_model_.get())->SetResults(model->results());
89 } 87 }
90 88
91 ContentsView::~ContentsView() { 89 ContentsView::~ContentsView() {
92 } 90 }
93 91
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 if (!pagination_model_->has_transition()) { 310 if (!pagination_model_->has_transition()) {
313 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1, 311 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1,
314 true); 312 true);
315 } 313 }
316 event->SetHandled(); 314 event->SetHandled();
317 event->StopPropagation(); 315 event->StopPropagation();
318 } 316 }
319 } 317 }
320 318
321 } // namespace app_list 319 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698