OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_list_main_view.h" | 5 #include "ui/app_list/views/app_list_main_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/callback.h" | 10 #include "base/callback.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 pending_icon_loaders_.begin(), pending_icon_loaders_.end(), loader); | 197 pending_icon_loaders_.begin(), pending_icon_loaders_.end(), loader); |
198 DCHECK(it != pending_icon_loaders_.end()); | 198 DCHECK(it != pending_icon_loaders_.end()); |
199 pending_icon_loaders_.erase(it); | 199 pending_icon_loaders_.erase(it); |
200 | 200 |
201 if (pending_icon_loaders_.empty() && icon_loading_wait_timer_.IsRunning()) { | 201 if (pending_icon_loaders_.empty() && icon_loading_wait_timer_.IsRunning()) { |
202 icon_loading_wait_timer_.Stop(); | 202 icon_loading_wait_timer_.Stop(); |
203 GetWidget()->Show(); | 203 GetWidget()->Show(); |
204 } | 204 } |
205 } | 205 } |
206 | 206 |
| 207 void AppListMainView::ChildVisibilityChanged(views::View* child) { |
| 208 // Repaint the AppListView's background which will repaint the background for |
| 209 // the search box. |
| 210 if (child == search_box_view_ && parent()) |
| 211 parent()->SchedulePaint(); |
| 212 } |
| 213 |
207 void AppListMainView::ActivateApp(AppListItem* item, int event_flags) { | 214 void AppListMainView::ActivateApp(AppListItem* item, int event_flags) { |
208 // TODO(jennyz): Activate the folder via AppListModel notification. | 215 // TODO(jennyz): Activate the folder via AppListModel notification. |
209 if (item->GetItemType() == AppListFolderItem::kItemType) | 216 if (item->GetItemType() == AppListFolderItem::kItemType) |
210 contents_view_->ShowFolderContent(static_cast<AppListFolderItem*>(item)); | 217 contents_view_->ShowFolderContent(static_cast<AppListFolderItem*>(item)); |
211 else | 218 else |
212 item->Activate(event_flags); | 219 item->Activate(event_flags); |
213 } | 220 } |
214 | 221 |
215 void AppListMainView::GetShortcutPathForApp( | 222 void AppListMainView::GetShortcutPathForApp( |
216 const std::string& app_id, | 223 const std::string& app_id, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // Resubmit the query via a posted task so that all observers for the | 259 // Resubmit the query via a posted task so that all observers for the |
253 // uninstall notification are notified. | 260 // uninstall notification are notified. |
254 base::MessageLoop::current()->PostTask( | 261 base::MessageLoop::current()->PostTask( |
255 FROM_HERE, | 262 FROM_HERE, |
256 base::Bind(&AppListMainView::QueryChanged, | 263 base::Bind(&AppListMainView::QueryChanged, |
257 weak_ptr_factory_.GetWeakPtr(), | 264 weak_ptr_factory_.GetWeakPtr(), |
258 search_box_view_)); | 265 search_box_view_)); |
259 } | 266 } |
260 | 267 |
261 } // namespace app_list | 268 } // namespace app_list |
OLD | NEW |