| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/app_list/app_list_service_views.h" | 5 #include "chrome/browser/ui/app_list/app_list_service_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/apps/scoped_keep_alive.h" | 7 #include "chrome/browser/apps/scoped_keep_alive.h" |
| 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" | 8 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
| 9 #include "ui/app_list/app_list_switches.h" | 9 #include "ui/app_list/app_list_switches.h" |
| 10 #include "ui/app_list/views/app_list_main_view.h" | 10 #include "ui/app_list/views/app_list_main_view.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 app_list::AppListModel::State state) { | 98 app_list::AppListModel::State state) { |
| 99 DCHECK(profile); | 99 DCHECK(profile); |
| 100 | 100 |
| 101 ScopedKeepAlive keep_alive; | 101 ScopedKeepAlive keep_alive; |
| 102 | 102 |
| 103 CreateForProfile(profile); | 103 CreateForProfile(profile); |
| 104 | 104 |
| 105 if (state != app_list::AppListModel::INVALID_STATE) { | 105 if (state != app_list::AppListModel::INVALID_STATE) { |
| 106 app_list::ContentsView* contents_view = | 106 app_list::ContentsView* contents_view = |
| 107 shower_.app_list()->app_list_main_view()->contents_view(); | 107 shower_.app_list()->app_list_main_view()->contents_view(); |
| 108 contents_view->SetActivePage(contents_view->GetPageIndexForState(state), | 108 contents_view->SetActiveState(state, |
| 109 shower_.IsAppListVisible() /* animate */); | 109 shower_.IsAppListVisible() /* animate */); |
| 110 } | 110 } |
| 111 | 111 |
| 112 shower_.ShowForCurrentProfile(); | 112 shower_.ShowForCurrentProfile(); |
| 113 RecordAppListLaunch(); | 113 RecordAppListLaunch(); |
| 114 } | 114 } |
| OLD | NEW |