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

Unified Diff: ui/app_list/cocoa/app_list_view_controller.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: ui/app_list/cocoa/app_list_view_controller.mm
diff --git a/ui/app_list/cocoa/app_list_view_controller.mm b/ui/app_list/cocoa/app_list_view_controller.mm
index 0cc2f2d71199e8a0da0102ae31e93cc7d2236549..0ca22f46a0885c5e517d6f144bd30208edd8497f 100644
--- a/ui/app_list/cocoa/app_list_view_controller.mm
+++ b/ui/app_list/cocoa/app_list_view_controller.mm
@@ -154,10 +154,10 @@ void AppListModelObserverBridge::OnProfilesChanged() {
}
- (app_list::AppListViewDelegate*)delegate {
- return delegate_.get();
+ return delegate_;
}
-- (void)setDelegate:(scoped_ptr<app_list::AppListViewDelegate>)newDelegate {
+- (void)setDelegate:(app_list::AppListViewDelegate*)newDelegate {
if (delegate_) {
// Ensure the search box is cleared when switching profiles.
if ([self searchBoxModel])
@@ -169,7 +169,7 @@ void AppListModelObserverBridge::OnProfilesChanged() {
[appsSearchBoxController_ setDelegate:nil];
[appsGridController_ setDelegate:nil];
}
- delegate_.reset(newDelegate.release());
+ delegate_ = newDelegate;
if (delegate_) {
[loadingIndicator_ stopAnimation:self];
} else {
@@ -177,7 +177,7 @@ void AppListModelObserverBridge::OnProfilesChanged() {
return;
}
- [appsGridController_ setDelegate:delegate_.get()];
+ [appsGridController_ setDelegate:delegate_];
[appsSearchBoxController_ setDelegate:self];
[appsSearchResultsController_ setDelegate:self];
app_list_model_observer_bridge_.reset(
« no previous file with comments | « ui/app_list/cocoa/app_list_view_controller.h ('k') | ui/app_list/cocoa/app_list_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698