| OLD | NEW |
| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void StartPageView::OnContainerSelected(bool from_bottom) { | 178 void StartPageView::OnContainerSelected(bool from_bottom) { |
| 179 } | 179 } |
| 180 | 180 |
| 181 gfx::Rect StartPageView::GetSearchBoxBounds() const { | 181 gfx::Rect StartPageView::GetSearchBoxBounds() const { |
| 182 return search_box_spacer_view_->bounds(); | 182 return search_box_spacer_view_->bounds(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 int StartPageView::Update() { | 185 int StartPageView::Update() { |
| 186 std::vector<SearchResult*> display_results = | 186 std::vector<SearchResult*> display_results = |
| 187 AppListModel::FilterSearchResultsByDisplayType( | 187 AppListModel::FilterSearchResultsByDisplayType( |
| 188 results(), SearchResult::DISPLAY_TILE, kNumStartPageTiles); | 188 results(), SearchResult::DISPLAY_RECOMMENDATION, kNumStartPageTiles); |
| 189 | 189 |
| 190 // Update the tile item results. | 190 // Update the tile item results. |
| 191 for (size_t i = 0; i < search_result_tile_views_.size(); ++i) { | 191 for (size_t i = 0; i < search_result_tile_views_.size(); ++i) { |
| 192 SearchResult* item = NULL; | 192 SearchResult* item = NULL; |
| 193 if (i < display_results.size()) | 193 if (i < display_results.size()) |
| 194 item = display_results[i]; | 194 item = display_results[i]; |
| 195 search_result_tile_views_[i]->SetSearchResult(item); | 195 search_result_tile_views_[i]->SetSearchResult(item); |
| 196 } | 196 } |
| 197 | 197 |
| 198 tiles_container_->Layout(); | 198 tiles_container_->Layout(); |
| 199 Layout(); | 199 Layout(); |
| 200 return display_results.size(); | 200 return display_results.size(); |
| 201 } | 201 } |
| 202 | 202 |
| 203 void StartPageView::UpdateSelectedIndex(int old_selected, int new_selected) { | 203 void StartPageView::UpdateSelectedIndex(int old_selected, int new_selected) { |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace app_list | 206 } // namespace app_list |
| OLD | NEW |