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

Unified Diff: ash/common/shelf/shelf_window_watcher.cc

Issue 2718563008: mash: Use mojo for ShelfItemDelegate and [app] MenuItem. (Closed)
Patch Set: Address comments. Created 3 years, 9 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: ash/common/shelf/shelf_window_watcher.cc
diff --git a/ash/common/shelf/shelf_window_watcher.cc b/ash/common/shelf/shelf_window_watcher.cc
index 7a00df9d0f3af50728835d8dd96b9ca530a02e36..5681e4361967703f36deb42cec422381daec7d05 100644
--- a/ash/common/shelf/shelf_window_watcher.cc
+++ b/ash/common/shelf/shelf_window_watcher.cc
@@ -156,9 +156,9 @@ void ShelfWindowWatcher::AddShelfItem(aura::Window* window) {
ShelfID id = model_->next_id();
UpdateShelfItemForWindow(&item, window);
window->SetProperty(kShelfIDKey, id);
- std::unique_ptr<ShelfItemDelegate> item_delegate(
- new ShelfWindowWatcherItemDelegate(id, WmWindow::Get(window)));
- model_->SetShelfItemDelegate(id, std::move(item_delegate));
+ model_->SetShelfItemDelegate(id,
+ base::MakeUnique<ShelfWindowWatcherItemDelegate>(
+ id, WmWindow::Get(window)));
// Panels are inserted on the left so as not to push all existing panels over.
model_->AddAt(item.type == TYPE_APP_PANEL ? 0 : model_->item_count(), item);
}

Powered by Google App Engine
This is Rietveld 408576698