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

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

Issue 720663002: Move app list search tiles into SearchResultTileItemListView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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
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/search_result_list_view.h" 5 #include "ui/app_list/views/search_result_list_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 result_view->SetResult(display_results[i]); 172 result_view->SetResult(display_results[i]);
173 result_view->SetVisible(true); 173 result_view->SetVisible(true);
174 } else { 174 } else {
175 result_view->SetResult(NULL); 175 result_view->SetResult(NULL);
176 result_view->SetVisible(false); 176 result_view->SetVisible(false);
177 } 177 }
178 } 178 }
179 if (selected_index_ > last_visible_index_) 179 if (selected_index_ > last_visible_index_)
180 SetSelectedIndex(last_visible_index_); 180 SetSelectedIndex(last_visible_index_);
181 181
182 Layout();
183 UpdateAutoLaunchState(); 182 UpdateAutoLaunchState();
184 } 183 }
185 184
186 void SearchResultListView::ForceAutoLaunchForTest() { 185 void SearchResultListView::ForceAutoLaunchForTest() {
187 if (auto_launch_animation_) 186 if (auto_launch_animation_)
188 AnimationEnded(auto_launch_animation_.get()); 187 AnimationEnded(auto_launch_animation_.get());
189 } 188 }
190 189
191 void SearchResultListView::Layout() { 190 void SearchResultListView::Layout() {
192 results_container_->SetBoundsRect(GetLocalBounds()); 191 results_container_->SetBoundsRect(GetLocalBounds());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (delegate_ && view->result()) 248 if (delegate_ && view->result())
250 delegate_->OnResultInstalled(view->result()); 249 delegate_->OnResultInstalled(view->result());
251 } 250 }
252 251
253 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { 252 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) {
254 if (delegate_ && view->result()) 253 if (delegate_ && view->result())
255 delegate_->OnResultUninstalled(view->result()); 254 delegate_->OnResultUninstalled(view->result());
256 } 255 }
257 256
258 } // namespace app_list 257 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_container_view.cc ('k') | ui/app_list/views/search_result_page_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698