Chromium Code Reviews| 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_util.h" | 8 #include "chrome/browser/extensions/extension_util.h" |
| 9 #include "chrome/browser/extensions/install_tracker_factory.h" | 9 #include "chrome/browser/extensions/install_tracker_factory.h" |
| 10 #include "chrome/browser/extensions/launch_util.h" | 10 #include "chrome/browser/extensions/launch_util.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 DCHECK(service); | 89 DCHECK(service); |
| 90 const extensions::Extension* extension = service->GetInstalledExtension( | 90 const extensions::Extension* extension = service->GetInstalledExtension( |
| 91 extension_id); | 91 extension_id); |
| 92 DCHECK(extension); | 92 DCHECK(extension); |
| 93 | 93 |
| 94 gfx::NativeWindow parent_window = GetAppListWindow(); | 94 gfx::NativeWindow parent_window = GetAppListWindow(); |
| 95 if (!parent_window) | 95 if (!parent_window) |
| 96 return; | 96 return; |
| 97 | 97 |
| 98 OnShowExtensionPrompt(); | 98 OnShowExtensionPrompt(); |
| 99 ShowChromeAppInfoDialog( | 99 ShowAppInfoDialog( |
|
Matt Giuca
2014/03/04 04:51:12
Whoops, I didn't realise my asking you to do this
| |
| 100 parent_window, profile, extension, | 100 parent_window, |
| 101 profile, | |
| 102 extension, | |
| 101 base::Bind(&AppListControllerDelegate::OnCloseExtensionPrompt, | 103 base::Bind(&AppListControllerDelegate::OnCloseExtensionPrompt, |
| 102 base::Unretained(this))); | 104 base::Unretained(this))); |
| 103 } | 105 } |
| 104 | 106 |
| 105 void AppListControllerDelegate::UninstallApp(Profile* profile, | 107 void AppListControllerDelegate::UninstallApp(Profile* profile, |
| 106 const std::string& app_id) { | 108 const std::string& app_id) { |
| 107 // ExtensionUninstall deletes itself when done or aborted. | 109 // ExtensionUninstall deletes itself when done or aborted. |
| 108 ExtensionUninstaller* uninstaller = | 110 ExtensionUninstaller* uninstaller = |
| 109 new ExtensionUninstaller(profile, app_id, this); | 111 new ExtensionUninstaller(profile, app_id, this); |
| 110 uninstaller->Run(); | 112 uninstaller->Run(); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 } | 212 } |
| 211 | 213 |
| 212 void AppListControllerDelegate::GetApps(Profile* profile, | 214 void AppListControllerDelegate::GetApps(Profile* profile, |
| 213 extensions::ExtensionSet* out_apps) { | 215 extensions::ExtensionSet* out_apps) { |
| 214 ExtensionRegistry* registry = ExtensionRegistry::Get(profile); | 216 ExtensionRegistry* registry = ExtensionRegistry::Get(profile); |
| 215 DCHECK(registry); | 217 DCHECK(registry); |
| 216 out_apps->InsertAll(registry->enabled_extensions()); | 218 out_apps->InsertAll(registry->enabled_extensions()); |
| 217 out_apps->InsertAll(registry->disabled_extensions()); | 219 out_apps->InsertAll(registry->disabled_extensions()); |
| 218 out_apps->InsertAll(registry->terminated_extensions()); | 220 out_apps->InsertAll(registry->terminated_extensions()); |
| 219 } | 221 } |
| OLD | NEW |