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

Unified Diff: ash/shell/window_watcher_shelf_item_delegate.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
« no previous file with comments | « ash/shell/window_watcher_shelf_item_delegate.h ('k') | ash/system/locale/locale_notification_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/window_watcher_shelf_item_delegate.cc
diff --git a/ash/shell/window_watcher_shelf_item_delegate.cc b/ash/shell/window_watcher_shelf_item_delegate.cc
index a62535b2fc63baa1e1883dd263f23fa45a6381c4..d21f46f29a18c665cac4196ebee3c407b22db90a 100644
--- a/ash/shell/window_watcher_shelf_item_delegate.cc
+++ b/ash/shell/window_watcher_shelf_item_delegate.cc
@@ -4,6 +4,8 @@
#include "ash/shell/window_watcher_shelf_item_delegate.h"
+#include <utility>
+
#include "ash/shell/window_watcher.h"
#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
@@ -25,13 +27,13 @@ void WindowWatcherShelfItemDelegate::ItemSelected(
std::unique_ptr<ui::Event> event,
int64_t display_id,
ShelfLaunchSource source,
- const ItemSelectedCallback& callback) {
+ ItemSelectedCallback callback) {
aura::Window* window = watcher_->GetWindowByID(shelf_id());
if (window->type() == ui::wm::WINDOW_TYPE_PANEL)
wm::MoveWindowToDisplay(window, display_id);
window->Show();
wm::ActivateWindow(window);
- callback.Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
+ std::move(callback).Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
}
void WindowWatcherShelfItemDelegate::ExecuteCommand(uint32_t command_id,
« no previous file with comments | « ash/shell/window_watcher_shelf_item_delegate.h ('k') | ash/system/locale/locale_notification_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698