OLD | NEW |
---|---|
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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(); | 182 Layout(); |
183 PreferredSizeChanged(); | |
Matt Giuca
2014/11/13 00:08:52
Just to clarify: This has no *real* effect right n
calamity
2014/11/13 03:44:50
It happened to not be needed before because the SR
| |
183 UpdateAutoLaunchState(); | 184 UpdateAutoLaunchState(); |
184 } | 185 } |
185 | 186 |
186 void SearchResultListView::ForceAutoLaunchForTest() { | 187 void SearchResultListView::ForceAutoLaunchForTest() { |
187 if (auto_launch_animation_) | 188 if (auto_launch_animation_) |
188 AnimationEnded(auto_launch_animation_.get()); | 189 AnimationEnded(auto_launch_animation_.get()); |
189 } | 190 } |
190 | 191 |
191 void SearchResultListView::Layout() { | 192 void SearchResultListView::Layout() { |
192 results_container_->SetBoundsRect(GetLocalBounds()); | 193 results_container_->SetBoundsRect(GetLocalBounds()); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 if (delegate_ && view->result()) | 250 if (delegate_ && view->result()) |
250 delegate_->OnResultInstalled(view->result()); | 251 delegate_->OnResultInstalled(view->result()); |
251 } | 252 } |
252 | 253 |
253 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { | 254 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { |
254 if (delegate_ && view->result()) | 255 if (delegate_ && view->result()) |
255 delegate_->OnResultUninstalled(view->result()); | 256 delegate_->OnResultUninstalled(view->result()); |
256 } | 257 } |
257 | 258 |
258 } // namespace app_list | 259 } // namespace app_list |
OLD | NEW |