#ifndef UI_COMPOSITOR_SCOPED_ANIMATION_DURATION_SCALE_MODE_H_
#define UI_COMPOSITOR_SCOPED_ANIMATION_DURATION_SCALE_MODE_H_
#include "base/basictypes.h"
#include "ui/compositor/compositor_export.h"
namespace ui {
class COMPOSITOR_EXPORT ScopedAnimationDurationScaleMode {
public:
enum DurationScaleMode {
NORMAL_DURATION,
FAST_DURATION,
SLOW_DURATION,
ZERO_DURATION
};
explicit ScopedAnimationDurationScaleMode(
DurationScaleMode scoped_duration_scale_mode)
: old_duration_scale_mode_(duration_scale_mode_) {
duration_scale_mode_ = scoped_duration_scale_mode;
}
~ScopedAnimationDurationScaleMode() {
duration_scale_mode_ = old_duration_scale_mode_;
}
static DurationScaleMode duration_scale_mode() {
return duration_scale_mode_;
}
private:
DurationScaleMode old_duration_scale_mode_;
static DurationScaleMode duration_scale_mode_;
DISALLOW_COPY_AND_ASSIGN(ScopedAnimationDurationScaleMode);
};
}
#endif