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 12 matching lines...) Expand all Loading... | |
23 void AppListServiceViews::OnViewBeingDestroyed() { | 23 void AppListServiceViews::OnViewBeingDestroyed() { |
24 can_dismiss_ = true; | 24 can_dismiss_ = true; |
25 shower_.HandleViewBeingDestroyed(); | 25 shower_.HandleViewBeingDestroyed(); |
26 } | 26 } |
27 | 27 |
28 void AppListServiceViews::Init(Profile* initial_profile) { | 28 void AppListServiceViews::Init(Profile* initial_profile) { |
29 PerformStartupChecks(initial_profile); | 29 PerformStartupChecks(initial_profile); |
30 } | 30 } |
31 | 31 |
32 void AppListServiceViews::ShowForProfile(Profile* requested_profile) { | 32 void AppListServiceViews::ShowForProfile(Profile* requested_profile) { |
33 // App list profiles should not be off-the-record. | |
34 DCHECK(!requested_profile->IsOffTheRecord()); | |
Mike Lerman
2015/04/22 13:27:39
Also please check requested_profile->IsGuestSessio
Matt Giuca
2015/04/24 04:51:04
Done.
| |
35 | |
33 ShowForProfileInternal(requested_profile, | 36 ShowForProfileInternal(requested_profile, |
34 app_list::AppListModel::INVALID_STATE); | 37 app_list::AppListModel::INVALID_STATE); |
35 } | 38 } |
36 | 39 |
37 void AppListServiceViews::ShowForAppInstall(Profile* profile, | 40 void AppListServiceViews::ShowForAppInstall(Profile* profile, |
38 const std::string& extension_id, | 41 const std::string& extension_id, |
39 bool start_discovery_tracking) { | 42 bool start_discovery_tracking) { |
40 if (app_list::switches::IsExperimentalAppListEnabled()) | 43 if (app_list::switches::IsExperimentalAppListEnabled()) |
41 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS); | 44 ShowForProfileInternal(profile, app_list::AppListModel::STATE_APPS); |
42 | 45 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 if (state != app_list::AppListModel::INVALID_STATE) { | 108 if (state != app_list::AppListModel::INVALID_STATE) { |
106 app_list::ContentsView* contents_view = | 109 app_list::ContentsView* contents_view = |
107 shower_.app_list()->app_list_main_view()->contents_view(); | 110 shower_.app_list()->app_list_main_view()->contents_view(); |
108 contents_view->SetActiveState(state, | 111 contents_view->SetActiveState(state, |
109 shower_.IsAppListVisible() /* animate */); | 112 shower_.IsAppListVisible() /* animate */); |
110 } | 113 } |
111 | 114 |
112 shower_.ShowForCurrentProfile(); | 115 shower_.ShowForCurrentProfile(); |
113 RecordAppListLaunch(); | 116 RecordAppListLaunch(); |
114 } | 117 } |
OLD | NEW |