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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (icon_loading_wait_timer_.IsRunning()) | 179 if (icon_loading_wait_timer_.IsRunning()) |
180 return; | 180 return; |
181 | 181 |
182 icon_loading_wait_timer_.Start( | 182 icon_loading_wait_timer_.Start( |
183 FROM_HERE, | 183 FROM_HERE, |
184 base::TimeDelta::FromMilliseconds(kMaxIconLoadingWaitTimeInMs), | 184 base::TimeDelta::FromMilliseconds(kMaxIconLoadingWaitTimeInMs), |
185 this, &AppListMainView::OnIconLoadingWaitTimer); | 185 this, &AppListMainView::OnIconLoadingWaitTimer); |
186 } | 186 } |
187 | 187 |
188 void AppListMainView::ResetForShow() { | 188 void AppListMainView::ResetForShow() { |
| 189 if (switches::IsExperimentalAppListEnabled()) { |
| 190 contents_view_->SetActivePage(contents_view_->GetPageIndexForNamedPage( |
| 191 ContentsView::NAMED_PAGE_START)); |
| 192 } |
189 contents_view_->apps_container_view()->ResetForShowApps(); | 193 contents_view_->apps_container_view()->ResetForShowApps(); |
190 // We clear the search when hiding so when app list appears it is not showing | 194 // We clear the search when hiding so when app list appears it is not showing |
191 // search results. | 195 // search results. |
192 search_box_view_->ClearSearch(); | 196 search_box_view_->ClearSearch(); |
193 } | 197 } |
194 | 198 |
195 void AppListMainView::Close() { | 199 void AppListMainView::Close() { |
196 icon_loading_wait_timer_.Stop(); | 200 icon_loading_wait_timer_.Stop(); |
197 contents_view_->CancelDrag(); | 201 contents_view_->CancelDrag(); |
198 } | 202 } |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 // Resubmit the query via a posted task so that all observers for the | 345 // Resubmit the query via a posted task so that all observers for the |
342 // uninstall notification are notified. | 346 // uninstall notification are notified. |
343 base::MessageLoop::current()->PostTask( | 347 base::MessageLoop::current()->PostTask( |
344 FROM_HERE, | 348 FROM_HERE, |
345 base::Bind(&AppListMainView::QueryChanged, | 349 base::Bind(&AppListMainView::QueryChanged, |
346 weak_ptr_factory_.GetWeakPtr(), | 350 weak_ptr_factory_.GetWeakPtr(), |
347 search_box_view_)); | 351 search_box_view_)); |
348 } | 352 } |
349 | 353 |
350 } // namespace app_list | 354 } // namespace app_list |
OLD | NEW |