| 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/search_result_list_view.h" | 5 #include "ui/app_list/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.h" | 10 #include "base/message_loop.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 | 133 |
| 134 void SearchResultListView::ListItemsRemoved(size_t start, size_t count) { | 134 void SearchResultListView::ListItemsRemoved(size_t start, size_t count) { |
| 135 size_t last = std::min(start + count, static_cast<size_t>(child_count())); | 135 size_t last = std::min(start + count, static_cast<size_t>(child_count())); |
| 136 for (size_t i = start; i < last; ++i) | 136 for (size_t i = start; i < last; ++i) |
| 137 GetResultViewAt(i)->ClearResultNoRepaint(); | 137 GetResultViewAt(i)->ClearResultNoRepaint(); |
| 138 | 138 |
| 139 ScheduleUpdate(); | 139 ScheduleUpdate(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void SearchResultListView::ListItemMoved(size_t index, size_t target_index) { |
| 143 NOTREACHED(); |
| 144 } |
| 145 |
| 142 void SearchResultListView::ListItemsChanged(size_t start, size_t count) { | 146 void SearchResultListView::ListItemsChanged(size_t start, size_t count) { |
| 143 ScheduleUpdate(); | 147 ScheduleUpdate(); |
| 144 } | 148 } |
| 145 | 149 |
| 146 void SearchResultListView::SearchResultActivated(SearchResultView* view, | 150 void SearchResultListView::SearchResultActivated(SearchResultView* view, |
| 147 const ui::Event& event) { | 151 const ui::Event& event) { |
| 148 if (delegate_ && view->result()) | 152 if (delegate_ && view->result()) |
| 149 delegate_->OpenResult(*(view->result()), event.flags()); | 153 delegate_->OpenResult(*(view->result()), event.flags()); |
| 150 } | 154 } |
| 151 | 155 |
| 152 void SearchResultListView::SearchResultActionActivated(SearchResultView* view, | 156 void SearchResultListView::SearchResultActionActivated(SearchResultView* view, |
| 153 int action_index, | 157 int action_index, |
| 154 const ui::Event& event) { | 158 const ui::Event& event) { |
| 155 if (delegate_ && view->result()) { | 159 if (delegate_ && view->result()) { |
| 156 delegate_->InvokeResultAction( | 160 delegate_->InvokeResultAction( |
| 157 *(view->result()), action_index, event.flags()); | 161 *(view->result()), action_index, event.flags()); |
| 158 } | 162 } |
| 159 } | 163 } |
| 160 | 164 |
| 161 } // namespace app_list | 165 } // namespace app_list |
| OLD | NEW |