Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(832)

Unified Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/app_list_service_mac.mm
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index 141c8a3a1afc5cf8b90e263217d6946387e4fc1a..5f66fbba08a85e7b55ef9f0c490ad629d93398bf 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -392,9 +392,8 @@ void AppListServiceMac::CreateForProfile(Profile* requested_profile) {
if (!window_controller_)
window_controller_.reset([[AppListWindowController alloc] init]);
- scoped_ptr<app_list::AppListViewDelegate> delegate(
- new AppListViewDelegate(profile_, GetControllerDelegate()));
- [[window_controller_ appListViewController] setDelegate:delegate.Pass()];
+ [[window_controller_ appListViewController]
+ setDelegate:GetViewDelegate(profile_)];
}
void AppListServiceMac::ShowForProfile(Profile* requested_profile) {
@@ -457,8 +456,7 @@ void AppListServiceMac::DestroyAppList() {
// but mac supports a visible app list with a NULL profile, so there's also no
// need to tear it down completely.
DismissAppList();
- [[window_controller_ appListViewController]
- setDelegate:scoped_ptr<app_list::AppListViewDelegate>()];
+ [[window_controller_ appListViewController] setDelegate:NULL];
profile_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698