| 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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 AppListControllerDelegate::~AppListControllerDelegate() {} | 50 AppListControllerDelegate::~AppListControllerDelegate() {} |
| 51 | 51 |
| 52 bool AppListControllerDelegate::ForceNativeDesktop() const { | 52 bool AppListControllerDelegate::ForceNativeDesktop() const { |
| 53 return false; | 53 return false; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void AppListControllerDelegate::ViewClosing() {} | 56 void AppListControllerDelegate::ViewClosing() {} |
| 57 | 57 |
| 58 gfx::Rect AppListControllerDelegate::GetAppListBounds() { | 58 gfx::Size AppListControllerDelegate::GetAppListSize() { |
| 59 return gfx::Rect(); | 59 return gfx::Size(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void AppListControllerDelegate::OnShowChildDialog() { | 62 void AppListControllerDelegate::OnShowChildDialog() { |
| 63 } | 63 } |
| 64 void AppListControllerDelegate::OnCloseChildDialog() { | 64 void AppListControllerDelegate::OnCloseChildDialog() { |
| 65 } | 65 } |
| 66 | 66 |
| 67 std::string AppListControllerDelegate::AppListSourceToString( | 67 std::string AppListControllerDelegate::AppListSourceToString( |
| 68 AppListSource source) { | 68 AppListSource source) { |
| 69 switch (source) { | 69 switch (source) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 DCHECK(extension); | 102 DCHECK(extension); |
| 103 | 103 |
| 104 OnShowChildDialog(); | 104 OnShowChildDialog(); |
| 105 | 105 |
| 106 UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches", | 106 UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches", |
| 107 AppInfoLaunchSource::FROM_APP_LIST, | 107 AppInfoLaunchSource::FROM_APP_LIST, |
| 108 AppInfoLaunchSource::NUM_LAUNCH_SOURCES); | 108 AppInfoLaunchSource::NUM_LAUNCH_SOURCES); |
| 109 | 109 |
| 110 // Since the AppListControllerDelegate is a leaky singleton, passing its raw | 110 // Since the AppListControllerDelegate is a leaky singleton, passing its raw |
| 111 // pointer around is OK. | 111 // pointer around is OK. |
| 112 ShowAppInfoInAppList( | 112 ShowAppInfoModally( |
| 113 GetAppListWindow(), | 113 GetDialogHost(), |
| 114 GetAppListBounds(), | 114 GetAppListSize(), |
| 115 profile, | 115 profile, |
| 116 extension, | 116 extension, |
| 117 base::Bind(&AppListControllerDelegate::OnCloseChildDialog, | 117 base::Bind(&AppListControllerDelegate::OnCloseChildDialog, |
| 118 base::Unretained(this))); | 118 base::Unretained(this))); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void AppListControllerDelegate::UninstallApp(Profile* profile, | 121 void AppListControllerDelegate::UninstallApp(Profile* profile, |
| 122 const std::string& app_id) { | 122 const std::string& app_id) { |
| 123 // ExtensionUninstall deletes itself when done or aborted. | 123 // ExtensionUninstall deletes itself when done or aborted. |
| 124 ExtensionUninstaller* uninstaller = | 124 ExtensionUninstaller* uninstaller = |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 out_apps->InsertAll(registry->enabled_extensions()); | 213 out_apps->InsertAll(registry->enabled_extensions()); |
| 214 out_apps->InsertAll(registry->disabled_extensions()); | 214 out_apps->InsertAll(registry->disabled_extensions()); |
| 215 out_apps->InsertAll(registry->terminated_extensions()); | 215 out_apps->InsertAll(registry->terminated_extensions()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void AppListControllerDelegate::OnSearchStarted() { | 218 void AppListControllerDelegate::OnSearchStarted() { |
| 219 #if defined(ENABLE_RLZ) | 219 #if defined(ENABLE_RLZ) |
| 220 RLZTracker::RecordAppListSearch(); | 220 RLZTracker::RecordAppListSearch(); |
| 221 #endif | 221 #endif |
| 222 } | 222 } |
| OLD | NEW |