| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 void SearchResultListView::ForceAutoLaunchForTest() { | 192 void SearchResultListView::ForceAutoLaunchForTest() { |
| 193 if (auto_launch_animation_) | 193 if (auto_launch_animation_) |
| 194 AnimationEnded(auto_launch_animation_.get()); | 194 AnimationEnded(auto_launch_animation_.get()); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void SearchResultListView::Layout() { | 197 void SearchResultListView::Layout() { |
| 198 results_container_->SetBoundsRect(GetLocalBounds()); | 198 results_container_->SetBoundsRect(GetLocalBounds()); |
| 199 } | 199 } |
| 200 | 200 |
| 201 gfx::Size SearchResultListView::GetPreferredSize() { | 201 gfx::Size SearchResultListView::GetPreferredSize() const { |
| 202 return results_container_->GetPreferredSize(); | 202 return results_container_->GetPreferredSize(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 int SearchResultListView::GetHeightForWidth(int w) { | 205 int SearchResultListView::GetHeightForWidth(int w) const { |
| 206 return results_container_->GetHeightForWidth(w); | 206 return results_container_->GetHeightForWidth(w); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void SearchResultListView::VisibilityChanged(views::View* starting_from, | 209 void SearchResultListView::VisibilityChanged(views::View* starting_from, |
| 210 bool is_visible) { | 210 bool is_visible) { |
| 211 if (is_visible) | 211 if (is_visible) |
| 212 UpdateAutoLaunchState(); | 212 UpdateAutoLaunchState(); |
| 213 else | 213 else |
| 214 CancelAutoLaunchTimeout(); | 214 CancelAutoLaunchTimeout(); |
| 215 } | 215 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 if (delegate_ && view->result()) | 277 if (delegate_ && view->result()) |
| 278 delegate_->OnResultInstalled(view->result()); | 278 delegate_->OnResultInstalled(view->result()); |
| 279 } | 279 } |
| 280 | 280 |
| 281 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { | 281 void SearchResultListView::OnSearchResultUninstalled(SearchResultView* view) { |
| 282 if (delegate_ && view->result()) | 282 if (delegate_ && view->result()) |
| 283 delegate_->OnResultUninstalled(view->result()); | 283 delegate_->OnResultUninstalled(view->result()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace app_list | 286 } // namespace app_list |
| OLD | NEW |