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

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

Issue 682843004: Experimental app list: "All apps" button has a folder-like icon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ares-allapps-button
Patch Set: Fix compile on Windows (APP_LIST_EXPORT). Created 6 years, 1 month 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
« no previous file with comments | « ui/app_list/views/all_apps_tile_item_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/start_page_view.h" 5 #include "ui/app_list/views/start_page_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/app_list/app_list_constants.h" 8 #include "ui/app_list/app_list_constants.h"
9 #include "ui/app_list/app_list_item.h" 9 #include "ui/app_list/app_list_item.h"
10 #include "ui/app_list/app_list_model.h" 10 #include "ui/app_list/app_list_model.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Add SearchResultTileItemViews to the container. 138 // Add SearchResultTileItemViews to the container.
139 for (size_t i = 0; i < std::max(kNumStartPageTiles, kNumSearchResultTiles); 139 for (size_t i = 0; i < std::max(kNumStartPageTiles, kNumSearchResultTiles);
140 ++i) { 140 ++i) {
141 SearchResultTileItemView* tile_item = new SearchResultTileItemView(); 141 SearchResultTileItemView* tile_item = new SearchResultTileItemView();
142 tiles_container_->AddChildView(tile_item); 142 tiles_container_->AddChildView(tile_item);
143 search_result_tile_views_.push_back(tile_item); 143 search_result_tile_views_.push_back(tile_item);
144 } 144 }
145 145
146 // Also add a special "all apps" button to the end of the container. 146 // Also add a special "all apps" button to the end of the container.
147 all_apps_button_ = 147 all_apps_button_ = new AllAppsTileItemView(
148 new AllAppsTileItemView(app_list_main_view_->contents_view()); 148 app_list_main_view_->contents_view(),
149 view_delegate_->GetModel()->top_level_item_list());
150 all_apps_button_->UpdateIcon();
149 tiles_container_->AddChildView(all_apps_button_); 151 tiles_container_->AddChildView(all_apps_button_);
150 } 152 }
151 153
152 void StartPageView::SetModel(AppListModel* model) { 154 void StartPageView::SetModel(AppListModel* model) {
153 DCHECK(model); 155 DCHECK(model);
154 if (search_results_model_) 156 if (search_results_model_)
155 search_results_model_->RemoveObserver(this); 157 search_results_model_->RemoveObserver(this);
156 search_results_model_ = model->results(); 158 search_results_model_ = model->results();
157 search_results_model_->AddObserver(this); 159 search_results_model_->AddObserver(this);
158 results_view_->SetResults(search_results_model_); 160 results_view_->SetResults(search_results_model_);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 276
275 void StartPageView::ListItemMoved(size_t index, size_t target_index) { 277 void StartPageView::ListItemMoved(size_t index, size_t target_index) {
276 ScheduleUpdate(); 278 ScheduleUpdate();
277 } 279 }
278 280
279 void StartPageView::ListItemsChanged(size_t start, size_t count) { 281 void StartPageView::ListItemsChanged(size_t start, size_t count) {
280 ScheduleUpdate(); 282 ScheduleUpdate();
281 } 283 }
282 284
283 } // namespace app_list 285 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/all_apps_tile_item_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698