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

Unified Diff: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc

Issue 2867673004: Use OnceCallback on Mojo interfaces in //ash (Closed)
Patch Set: count -> container_count Created 3 years, 7 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/ash/launcher/app_window_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
index 6bd16023d2ce427112c65db9acc99343ffcaeccf..11032d2c9b43aa5320f6e96f104a30d2836894fb 100644
--- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h"
#include <algorithm>
+#include <utility>
#include "ash/wm/window_util.h"
#include "base/memory/ptr_util.h"
@@ -75,9 +76,9 @@ void AppWindowLauncherItemController::ItemSelected(
std::unique_ptr<ui::Event> event,
int64_t display_id,
ash::ShelfLaunchSource source,
- const ItemSelectedCallback& callback) {
+ ItemSelectedCallback callback) {
if (windows_.empty()) {
- callback.Run(ash::SHELF_ACTION_NONE, base::nullopt);
+ std::move(callback).Run(ash::SHELF_ACTION_NONE, base::nullopt);
return;
}
@@ -93,7 +94,8 @@ void AppWindowLauncherItemController::ItemSelected(
action = ShowAndActivateOrMinimize(window_to_show);
}
- callback.Run(action, GetAppMenuItems(event ? event->flags() : ui::EF_NONE));
+ std::move(callback).Run(
+ action, GetAppMenuItems(event ? event->flags() : ui::EF_NONE));
}
void AppWindowLauncherItemController::ExecuteCommand(uint32_t command_id,

Powered by Google App Engine
This is Rietveld 408576698