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

Unified Diff: ash/shelf/shelf_window_watcher_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/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/shell/window_watcher_shelf_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_window_watcher_item_delegate.cc
diff --git a/ash/shelf/shelf_window_watcher_item_delegate.cc b/ash/shelf/shelf_window_watcher_item_delegate.cc
index 43398d85350bf4e86c152ca78679c449b19cb878..001b25f187721c4be75e33e27fd677f56c67fa09 100644
--- a/ash/shelf/shelf_window_watcher_item_delegate.cc
+++ b/ash/shelf/shelf_window_watcher_item_delegate.cc
@@ -4,6 +4,8 @@
#include "ash/shelf/shelf_window_watcher_item_delegate.h"
+#include <utility>
+
#include "ash/public/cpp/window_properties.h"
#include "ash/shelf/shelf_controller.h"
#include "ash/shelf/shelf_model.h"
@@ -40,28 +42,28 @@ void ShelfWindowWatcherItemDelegate::ItemSelected(
std::unique_ptr<ui::Event> event,
int64_t display_id,
ShelfLaunchSource source,
- const ItemSelectedCallback& callback) {
+ ItemSelectedCallback callback) {
// Move panels attached on another display to the current display.
if (GetShelfItemType(shelf_id()) == TYPE_APP_PANEL &&
window_->aura_window()->GetProperty(kPanelAttachedKey) &&
wm::MoveWindowToDisplay(window_->aura_window(), display_id)) {
window_->Activate();
- callback.Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
+ std::move(callback).Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
return;
}
if (window_->IsActive()) {
if (event && event->type() == ui::ET_KEY_RELEASED) {
window_->Animate(::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
- callback.Run(SHELF_ACTION_NONE, base::nullopt);
+ std::move(callback).Run(SHELF_ACTION_NONE, base::nullopt);
return;
}
window_->Minimize();
- callback.Run(SHELF_ACTION_WINDOW_MINIMIZED, base::nullopt);
+ std::move(callback).Run(SHELF_ACTION_WINDOW_MINIMIZED, base::nullopt);
return;
}
window_->Activate();
- callback.Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
+ std::move(callback).Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
}
void ShelfWindowWatcherItemDelegate::ExecuteCommand(uint32_t command_id,
« no previous file with comments | « ash/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/shell/window_watcher_shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698