blob: d12c11c763adc27a850fd65a1b5e8ee86528b4eb [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/macros.h"
#include "base/time/time.h"
namespace ui {
class LayerAnimator;
namespace test {
class MultiLayerAnimatorTestControllerDelegate;
// Test API class to control multiple LayerAnimators.
class MultiLayerAnimatorTestController {
explicit MultiLayerAnimatorTestController(
MultiLayerAnimatorTestControllerDelegate* delegate);
virtual ~MultiLayerAnimatorTestController();
// Disables the animation timers when |disable_timers| is true.
void SetDisableAnimationTimers(bool disable_timers);
// Returns true if any animations are active.
bool HasActiveAnimations() const;
// Completes all running animations.
void CompleteAnimations();
// Get a list of all the LayerAnimator's used. Delegates to |delegate_|.
std::vector<LayerAnimator*> GetLayerAnimators();
std::vector<LayerAnimator*> GetLayerAnimators() const;
// Progresses all running LayerAnimationSequences by the given |duration|.
// NOTE: This function will NOT progress LayerAnimationSequences that are
// queued, only the running ones will be progressed.
void StepAnimations(const base::TimeDelta& duration);
MultiLayerAnimatorTestControllerDelegate* delegate_;
} // namespace test
} // namespace ui