| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/lifetime/keep_alive_types.h" | 9 #include "chrome/browser/lifetime/keep_alive_types.h" |
| 10 #include "chrome/browser/lifetime/scoped_keep_alive.h" | 10 #include "chrome/browser/lifetime/scoped_keep_alive.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 DCHECK(!requested_profile->IsOffTheRecord()); | 36 DCHECK(!requested_profile->IsOffTheRecord()); |
| 37 DCHECK(!requested_profile->IsGuestSession()); | 37 DCHECK(!requested_profile->IsGuestSession()); |
| 38 | 38 |
| 39 ShowForProfileInternal(requested_profile, | 39 ShowForProfileInternal(requested_profile, |
| 40 app_list::AppListModel::INVALID_STATE); | 40 app_list::AppListModel::INVALID_STATE); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void AppListServiceViews::ShowForAppInstall(Profile* profile, | 43 void AppListServiceViews::ShowForAppInstall(Profile* profile, |
| 44 const std::string& extension_id, | 44 const std::string& extension_id, |
| 45 bool start_discovery_tracking) { | 45 bool start_discovery_tracking) { |
| 46 if (app_list::switches::IsExperimentalAppListEnabled()) | 46 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS); |
| 47 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS); | |
| 48 | |
| 49 AppListServiceImpl::ShowForAppInstall(profile, extension_id, | 47 AppListServiceImpl::ShowForAppInstall(profile, extension_id, |
| 50 start_discovery_tracking); | 48 start_discovery_tracking); |
| 51 } | 49 } |
| 52 | 50 |
| 53 void AppListServiceViews::ShowForCustomLauncherPage(Profile* profile) { | 51 void AppListServiceViews::ShowForCustomLauncherPage(Profile* profile) { |
| 54 ShowForProfileInternal(profile, | 52 ShowForProfileInternal(profile, |
| 55 app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE); | 53 app_list::AppListModel::STATE_CUSTOM_LAUNCHER_PAGE); |
| 56 } | 54 } |
| 57 | 55 |
| 58 void AppListServiceViews::HideCustomLauncherPage() { | 56 void AppListServiceViews::HideCustomLauncherPage() { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 if (state != app_list::AppListModel::INVALID_STATE) { | 123 if (state != app_list::AppListModel::INVALID_STATE) { |
| 126 app_list::ContentsView* contents_view = | 124 app_list::ContentsView* contents_view = |
| 127 shower_.app_list()->app_list_main_view()->contents_view(); | 125 shower_.app_list()->app_list_main_view()->contents_view(); |
| 128 contents_view->SetActiveState(state, | 126 contents_view->SetActiveState(state, |
| 129 shower_.IsAppListVisible() /* animate */); | 127 shower_.IsAppListVisible() /* animate */); |
| 130 } | 128 } |
| 131 | 129 |
| 132 shower_.ShowForCurrentProfile(); | 130 shower_.ShowForCurrentProfile(); |
| 133 RecordAppListLaunch(); | 131 RecordAppListLaunch(); |
| 134 } | 132 } |
| OLD | NEW |