OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller_delegate.h" | 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" |
6 | 6 |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/extensions/extension_system.h" | 8 #include "chrome/browser/extensions/extension_system.h" |
9 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
10 #include "chrome/browser/extensions/install_tracker_factory.h" | 10 #include "chrome/browser/extensions/install_tracker_factory.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 GetExtension(profile, app_id)); | 141 GetExtension(profile, app_id)); |
142 } | 142 } |
143 | 143 |
144 void AppListControllerDelegate::SetExtensionLaunchType( | 144 void AppListControllerDelegate::SetExtensionLaunchType( |
145 Profile* profile, | 145 Profile* profile, |
146 const std::string& extension_id, | 146 const std::string& extension_id, |
147 extensions::LaunchType launch_type) { | 147 extensions::LaunchType launch_type) { |
148 ExtensionService* service = | 148 ExtensionService* service = |
149 extensions::ExtensionSystem::Get(profile)->extension_service(); | 149 extensions::ExtensionSystem::Get(profile)->extension_service(); |
150 extensions::SetLaunchType( | 150 extensions::SetLaunchType( |
151 service->extension_prefs(), extension_id, launch_type); | 151 service, extension_id, launch_type); |
152 } | 152 } |
153 | 153 |
154 bool AppListControllerDelegate::IsExtensionInstalled( | 154 bool AppListControllerDelegate::IsExtensionInstalled( |
155 Profile* profile, const std::string& app_id) { | 155 Profile* profile, const std::string& app_id) { |
156 return !!GetExtension(profile, app_id); | 156 return !!GetExtension(profile, app_id); |
157 } | 157 } |
158 | 158 |
159 extensions::InstallTracker* AppListControllerDelegate::GetInstallTrackerFor( | 159 extensions::InstallTracker* AppListControllerDelegate::GetInstallTrackerFor( |
160 Profile* profile) { | 160 Profile* profile) { |
161 if (extensions::ExtensionSystem::Get(profile)->extension_service()) | 161 if (extensions::ExtensionSystem::Get(profile)->extension_service()) |
162 return extensions::InstallTrackerFactory::GetForProfile(profile); | 162 return extensions::InstallTrackerFactory::GetForProfile(profile); |
163 return NULL; | 163 return NULL; |
164 } | 164 } |
165 | 165 |
166 void AppListControllerDelegate::GetApps(Profile* profile, | 166 void AppListControllerDelegate::GetApps(Profile* profile, |
167 extensions::ExtensionSet* out_apps) { | 167 extensions::ExtensionSet* out_apps) { |
168 ExtensionRegistry* registry = ExtensionRegistry::Get(profile); | 168 ExtensionRegistry* registry = ExtensionRegistry::Get(profile); |
169 DCHECK(registry); | 169 DCHECK(registry); |
170 out_apps->InsertAll(registry->enabled_extensions()); | 170 out_apps->InsertAll(registry->enabled_extensions()); |
171 out_apps->InsertAll(registry->disabled_extensions()); | 171 out_apps->InsertAll(registry->disabled_extensions()); |
172 out_apps->InsertAll(registry->terminated_extensions()); | 172 out_apps->InsertAll(registry->terminated_extensions()); |
173 } | 173 } |
OLD | NEW |