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

Unified Diff: ash/wm/session_state_animator.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/wm/session_state_animator.h ('k') | ash/wm/session_state_animator_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 60a822554e6a5dbd03d2685160c5de2702473251..d453cf74930c0624721329f5542c933e01f22ca7 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -4,6 +4,8 @@
#include "ash/wm/session_state_animator.h"
+#include <utility>
+
#include "ash/ash_switches.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
@@ -38,11 +40,11 @@ const int SessionStateAnimator::kAllNonRootContainersMask =
SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS;
SessionStateAnimator::AnimationSequence::AnimationSequence(
- base::Closure callback)
+ base::OnceClosure callback)
: sequence_ended_(false),
animation_completed_(false),
invoke_callback_(false),
- callback_(callback) {}
+ callback_(std::move(callback)) {}
SessionStateAnimator::AnimationSequence::~AnimationSequence() {}
@@ -66,7 +68,7 @@ void SessionStateAnimator::AnimationSequence::OnAnimationAborted() {
void SessionStateAnimator::AnimationSequence::CleanupIfSequenceCompleted() {
if (sequence_ended_ && animation_completed_) {
if (invoke_callback_)
- callback_.Run();
+ std::move(callback_).Run();
delete this;
}
}
« no previous file with comments | « ash/wm/session_state_animator.h ('k') | ash/wm/session_state_animator_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698